C# 클래스 Nez.TiledMapComponent

상속: RenderableComponent, IUpdatable
파일 보기 프로젝트 열기: prime31/Nez

공개 프로퍼티들

프로퍼티 타입 설명
collisionLayer Nez.Tiled.TiledTileLayer
layerIndicesToRender int[]
physicsLayer int
tiledMap TiledMap

공개 메소드들

메소드 설명
IUpdatable ( ) : void
TiledMapComponent ( TiledMap tiledMap, string collisionLayerName = null, bool shouldCreateColliders = true ) : System
addColliders ( ) : void
debugRender ( Graphics graphics ) : void
getColumnAtWorldPosition ( float xPos ) : int
getRowAtWorldPosition ( float yPos ) : int
getTileAtWorldPosition ( Vector2 worldPos ) : TiledTile

this method requires that you are using a collision layer setup in the constructor.

getTilesIntersectingBounds ( Rectangle bounds ) : List

gets all the non-empty tiles that intersect the passed in bounds for the collision layer. The returned List can be put back in the pool via ListPool.free.

onAddedToEntity ( ) : void
onEntityTransformChanged ( Transform comp ) : void
onRemovedFromEntity ( ) : void
removeColliders ( ) : void
render ( Graphics graphics, Camera camera ) : void
renderObjectGroup ( TiledObjectGroup group, Graphics graphics ) : void
setLayerToRender ( string layerName ) : void

sets this component to only render a single layer

setLayersToRender ( ) : void

sets which layers should be rendered by this component by name. If you know the indices you can set layerIndicesToRender directly.

메소드 상세

IUpdatable() 공개 메소드

public IUpdatable ( ) : void
리턴 void

TiledMapComponent() 공개 메소드

public TiledMapComponent ( TiledMap tiledMap, string collisionLayerName = null, bool shouldCreateColliders = true ) : System
tiledMap TiledMap
collisionLayerName string
shouldCreateColliders bool
리턴 System

addColliders() 공개 메소드

public addColliders ( ) : void
리턴 void

debugRender() 공개 메소드

public debugRender ( Graphics graphics ) : void
graphics Graphics
리턴 void

getColumnAtWorldPosition() 공개 메소드

public getColumnAtWorldPosition ( float xPos ) : int
xPos float
리턴 int

getRowAtWorldPosition() 공개 메소드

public getRowAtWorldPosition ( float yPos ) : int
yPos float
리턴 int

getTileAtWorldPosition() 공개 메소드

this method requires that you are using a collision layer setup in the constructor.
public getTileAtWorldPosition ( Vector2 worldPos ) : TiledTile
worldPos Vector2 World position.
리턴 Nez.Tiled.TiledTile

getTilesIntersectingBounds() 공개 메소드

gets all the non-empty tiles that intersect the passed in bounds for the collision layer. The returned List can be put back in the pool via ListPool.free.
public getTilesIntersectingBounds ( Rectangle bounds ) : List
bounds Microsoft.Xna.Framework.Rectangle Bounds.
리턴 List

onAddedToEntity() 공개 메소드

public onAddedToEntity ( ) : void
리턴 void

onEntityTransformChanged() 공개 메소드

public onEntityTransformChanged ( Transform comp ) : void
comp Transform
리턴 void

onRemovedFromEntity() 공개 메소드

public onRemovedFromEntity ( ) : void
리턴 void

removeColliders() 공개 메소드

public removeColliders ( ) : void
리턴 void

render() 공개 메소드

public render ( Graphics graphics, Camera camera ) : void
graphics Graphics
camera Camera
리턴 void

renderObjectGroup() 공개 메소드

public renderObjectGroup ( TiledObjectGroup group, Graphics graphics ) : void
group Nez.Tiled.TiledObjectGroup
graphics Graphics
리턴 void

setLayerToRender() 공개 메소드

sets this component to only render a single layer
public setLayerToRender ( string layerName ) : void
layerName string Layer name.
리턴 void

setLayersToRender() 공개 메소드

sets which layers should be rendered by this component by name. If you know the indices you can set layerIndicesToRender directly.
public setLayersToRender ( ) : void
리턴 void

프로퍼티 상세

collisionLayer 공개적으로 프로퍼티

public TiledTileLayer,Nez.Tiled collisionLayer
리턴 Nez.Tiled.TiledTileLayer

layerIndicesToRender 공개적으로 프로퍼티

if null, all layers will be rendered
public int[] layerIndicesToRender
리턴 int[]

physicsLayer 공개적으로 프로퍼티

public int physicsLayer
리턴 int

tiledMap 공개적으로 프로퍼티

public TiledMap tiledMap
리턴 TiledMap