C# 클래스 FuncWorks.XNA.XTiled.Map

An XTiled TMX Map
파일 보기 프로젝트 열기: Bacon41/PantheonPrototype 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Bounds Microsoft.Xna.Framework.Rectangle
Height Int32
LayerOrder LayerInfo[]
LoadTextures Boolean
ObjectLayers ObjectLayerList
Orientation MapOrientation
Properties Property>.Dictionary
SourceTiles Tile[]
TileHeight Int32
TileLayers TileLayerList
TileWidth Int32
Tilesets Tileset[]
Width Int32

공개 메소드들

메소드 설명
Draw ( SpriteBatch spriteBatch, Rectangle region ) : void

Draws all visible tile layers

Draw ( SpriteBatch spriteBatch, Rectangle region, System.Boolean drawHiddenLayers ) : void

Draws all visible tile layers

DrawLayer ( SpriteBatch spriteBatch, Int32 layerID, Rectangle region, System.Single layerDepth ) : void

Draws given tile layer

DrawMapObject ( SpriteBatch spriteBatch, Int32 objectLayerID, Int32 objectID, Rectangle region, System.Single layerDepth ) : void

Method to draw a MapObject

DrawObjectLayer ( SpriteBatch spriteBatch, Int32 objectLayerID, Rectangle region, System.Single layerDepth ) : void

Draws all objects on the given object layer

DrawRectangle ( SpriteBatch spriteBatch, Rectangle rect, Rectangle region, System.Single layerDepth, Color linecolor, Color fillColor ) : void

Method to draw a Rectangle

DrawTileObject ( SpriteBatch spriteBatch, Int32 objectLayerID, Int32 objectID, Rectangle region, System.Single layerDepth, Color color ) : void

Method to draw a MapObject that represents a tile object

DrawTileObject ( SpriteBatch spriteBatch, int objectLayerID, int objectID, Rectangle &region, float layerDepth, Color &color ) : void

Method to draw a MapObject that represents a tile object

GetObjectsInRegion ( Int32 objectLayerID, Rectangle region ) : IEnumerable

Returns a collection of MapObjects inside the given region

GetObjectsInRegion ( Rectangle region ) : IEnumerable

Returns a collection of MapObjects inside the given region

GetTilesInRegion ( Int32 tileLayerID, Rectangle region ) : IEnumerable

Returns a collection of TileData inside the given region

GetTilesInRegion ( Rectangle region ) : IEnumerable

Returns a collection of TileData inside the given region

InitObjectDrawing ( GraphicsDevice graphicsDevice ) : void

Enables rendering of map objects

Translate ( Point location, Rectangle relativeTo ) : Point

Translates a location to screen space

Translate ( Rectangle location, Rectangle relativeTo ) : Rectangle

Translates a location to screen space

Translate ( Vector2 location, Rectangle relativeTo ) : Vector2

Translates a location to screen space

Translate ( Point &location, Rectangle &relativeTo ) : void

Translates a location to screen space

Translate ( Rectangle &location, Rectangle &relativeTo ) : void

Translates a location to screen space

Translate ( Vector2 &location, Rectangle &relativeTo ) : void

Translates a location to screen space

비공개 메소드들

메소드 설명
CreatePolygonTextures ( ) : void
DrawLayer ( SpriteBatch spriteBatch, Int32 layerID, Rectangle &region, Int32 txMin, Int32 txMax, Int32 tyMin, Int32 tyMax, System.Single layerDepth ) : void

메소드 상세

Draw() 공개 메소드

Draws all visible tile layers
public Draw ( SpriteBatch spriteBatch, Rectangle region ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch XNA SpriteBatch instance; SpriteBatch.Begin() must be called before using this method
region Microsoft.Xna.Framework.Rectangle Region of the map in pixels to draw
리턴 void

Draw() 공개 메소드

Draws all visible tile layers
public Draw ( SpriteBatch spriteBatch, Rectangle region, System.Boolean drawHiddenLayers ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch XNA SpriteBatch instance; SpriteBatch.Begin() must be called before using this method
region Microsoft.Xna.Framework.Rectangle Region of the map in pixels to draw
drawHiddenLayers System.Boolean If true, draws layers regardless of TileLayer.Visible flag
리턴 void

DrawLayer() 공개 메소드

Draws given tile layer
public DrawLayer ( SpriteBatch spriteBatch, Int32 layerID, Rectangle region, System.Single layerDepth ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch XNA SpriteBatch instance; SpriteBatch.Begin() must be called before using this method
layerID System.Int32 Index of the layer to draw in the Map.TileLayers collection
region Microsoft.Xna.Framework.Rectangle Region of the map in pixels to draw
layerDepth System.Single LayerDepth value to pass to SpriteBatch
리턴 void

DrawMapObject() 공개 메소드

Method to draw a MapObject
public DrawMapObject ( SpriteBatch spriteBatch, Int32 objectLayerID, Int32 objectID, Rectangle region, System.Single layerDepth ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch XNA SpriteBatch instance; SpriteBatch.Begin() must be called before using this method
objectLayerID System.Int32 Index of the layer to draw in the Map.ObjectLayers collection
objectID System.Int32 Index of the object to draw in the Map.ObjectLayers.MapObjects collection
region Microsoft.Xna.Framework.Rectangle Region of the map in pixels to draw
layerDepth System.Single LayerDepth value to pass to SpriteBatch
리턴 void

DrawObjectLayer() 공개 메소드

Draws all objects on the given object layer
public DrawObjectLayer ( SpriteBatch spriteBatch, Int32 objectLayerID, Rectangle region, System.Single layerDepth ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch XNA SpriteBatch instance; SpriteBatch.Begin() must be called before using this method
objectLayerID System.Int32 Index of the layer to draw in the Map.ObjectLayers collection
region Microsoft.Xna.Framework.Rectangle Region of the map in pixels to draw
layerDepth System.Single LayerDepth value to pass to SpriteBatch
리턴 void

DrawRectangle() 공개 정적인 메소드

Method to draw a Rectangle
public static DrawRectangle ( SpriteBatch spriteBatch, Rectangle rect, Rectangle region, System.Single layerDepth, Color linecolor, Color fillColor ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch XNA SpriteBatch instance; SpriteBatch.Begin() must be called before using this method
rect Microsoft.Xna.Framework.Rectangle The Rectangle to draw, in map pixels
region Microsoft.Xna.Framework.Rectangle Region of the map in pixels currently visible
layerDepth System.Single LayerDepth value to pass to SpriteBatch
linecolor Color Color of the Rectangle border
fillColor Color Color to fill the Rectangle with
리턴 void

DrawTileObject() 공개 메소드

Method to draw a MapObject that represents a tile object
public DrawTileObject ( SpriteBatch spriteBatch, Int32 objectLayerID, Int32 objectID, Rectangle region, System.Single layerDepth, Color color ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch XNA SpriteBatch instance; SpriteBatch.Begin() must be called before using this method
objectLayerID System.Int32 Index of the layer to draw in the Map.ObjectLayers collection
objectID System.Int32 Index of the object to draw in the Map.ObjectLayers.MapObjects collection
region Microsoft.Xna.Framework.Rectangle Region of the map in pixels to draw
layerDepth System.Single LayerDepth value to pass to SpriteBatch
color Color Color of the object
리턴 void

DrawTileObject() 공개 메소드

Method to draw a MapObject that represents a tile object
public DrawTileObject ( SpriteBatch spriteBatch, int objectLayerID, int objectID, Rectangle &region, float layerDepth, Color &color ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch XNA SpriteBatch instance; SpriteBatch.Begin() must be called before using this method
objectLayerID int Index of the layer to draw in the Map.ObjectLayers collection
objectID int Index of the object to draw in the Map.ObjectLayers.MapObjects collection
region Microsoft.Xna.Framework.Rectangle Region of the map in pixels to draw
layerDepth float LayerDepth value to pass to SpriteBatch
color Color Color of the object
리턴 void

GetObjectsInRegion() 공개 메소드

Returns a collection of MapObjects inside the given region
public GetObjectsInRegion ( Int32 objectLayerID, Rectangle region ) : IEnumerable
objectLayerID System.Int32 The object layer to check
region Microsoft.Xna.Framework.Rectangle The region, in pixles, to check
리턴 IEnumerable

GetObjectsInRegion() 공개 메소드

Returns a collection of MapObjects inside the given region
public GetObjectsInRegion ( Rectangle region ) : IEnumerable
region Microsoft.Xna.Framework.Rectangle The region, in pixles, to check
리턴 IEnumerable

GetTilesInRegion() 공개 메소드

Returns a collection of TileData inside the given region
public GetTilesInRegion ( Int32 tileLayerID, Rectangle region ) : IEnumerable
tileLayerID System.Int32 The tile layer to check
region Microsoft.Xna.Framework.Rectangle The region, in pixles, to check
리턴 IEnumerable

GetTilesInRegion() 공개 메소드

Returns a collection of TileData inside the given region
public GetTilesInRegion ( Rectangle region ) : IEnumerable
region Microsoft.Xna.Framework.Rectangle The region, in pixles, to check
리턴 IEnumerable

InitObjectDrawing() 공개 정적인 메소드

Enables rendering of map objects
public static InitObjectDrawing ( GraphicsDevice graphicsDevice ) : void
graphicsDevice GraphicsDevice The graphics device to us in creating textures to support object rendering
리턴 void

Translate() 공개 정적인 메소드

Translates a location to screen space
public static Translate ( Point location, Rectangle relativeTo ) : Point
location Point The location in map pixel coordinates
relativeTo Rectangle Region of the map that is on screen
리턴 Point

Translate() 공개 정적인 메소드

Translates a location to screen space
public static Translate ( Rectangle location, Rectangle relativeTo ) : Rectangle
location Rectangle The location in map pixel coordinates
relativeTo Rectangle Region of the map that is on screen
리턴 Rectangle

Translate() 공개 정적인 메소드

Translates a location to screen space
public static Translate ( Vector2 location, Rectangle relativeTo ) : Vector2
location Vector2 The location in map pixel coordinates
relativeTo Rectangle Region of the map that is on screen
리턴 Vector2

Translate() 공개 정적인 메소드

Translates a location to screen space
public static Translate ( Point &location, Rectangle &relativeTo ) : void
location Point The location in map pixel coordinates
relativeTo Rectangle Region of the map that is on screen
리턴 void

Translate() 공개 정적인 메소드

Translates a location to screen space
public static Translate ( Rectangle &location, Rectangle &relativeTo ) : void
location Rectangle The location in map pixel coordinates
relativeTo Rectangle Region of the map that is on screen
리턴 void

Translate() 공개 정적인 메소드

Translates a location to screen space
public static Translate ( Vector2 &location, Rectangle &relativeTo ) : void
location Vector2 The location in map pixel coordinates
relativeTo Rectangle Region of the map that is on screen
리턴 void

프로퍼티 상세

Bounds 공개적으로 프로퍼티

Size of the map in pixels
public Rectangle,Microsoft.Xna.Framework Bounds
리턴 Microsoft.Xna.Framework.Rectangle

Height 공개적으로 프로퍼티

Height, in tiles, of the map
public Int32 Height
리턴 Int32

LayerOrder 공개적으로 프로퍼티

Order of tile and object layers combined, first is the bottom layer
public LayerInfo[] LayerOrder
리턴 LayerInfo[]

LoadTextures 공개적으로 프로퍼티

True if XTiled loaded tileset textures during map load
public Boolean LoadTextures
리턴 Boolean

ObjectLayers 공개적으로 프로퍼티

Ordered collection of object layers; first is the bottom layer
public ObjectLayerList ObjectLayers
리턴 ObjectLayerList

Orientation 공개적으로 프로퍼티

Orientation of the map.
public MapOrientation Orientation
리턴 MapOrientation

Properties 공개적으로 프로퍼티

Custom properties
public Dictionary Properties
리턴 Property>.Dictionary

SourceTiles 공개적으로 프로퍼티

List of all source tiles from tilesets
public Tile[] SourceTiles
리턴 Tile[]

TileHeight 공개적으로 프로퍼티

Pixel height of a single tile
public Int32 TileHeight
리턴 Int32

TileLayers 공개적으로 프로퍼티

Ordered collection of tile layers; first is the bottom layer
public TileLayerList TileLayers
리턴 TileLayerList

TileWidth 공개적으로 프로퍼티

Pixel width of a single tile
public Int32 TileWidth
리턴 Int32

Tilesets 공개적으로 프로퍼티

Tilesets associated with this map
public Tileset[] Tilesets
리턴 Tileset[]

Width 공개적으로 프로퍼티

Width, in tiles, of the map
public Int32 Width
리턴 Int32