C# Class fliXNA_xbox.FlxTilemap

Inheritance: FlxObject
Datei anzeigen Open project: jlorek/flxSharp Class Usage Examples

Public Properties

Property Type Description
auto uint
tileGraphic Microsoft.Xna.Framework.Graphics.Texture2D

Protected Properties

Property Type Description
_block FlxObject
_data List
_rects Microsoft.Xna.Framework.Rectangle[]
_startingIndex uint
_tileHeight int
_tileObjects fliXNA_xbox.FlxTile[]
_tileObjectsForDrawing List
_tileWidth int
_tiles Microsoft.Xna.Framework.Graphics.Texture2D
collideIndex int
tileSize int

Public Methods

Method Description
FlxTilemap ( ) : System
draw ( ) : void
findPath ( FlxPoint Start, FlxPoint End, bool Simplify = true, bool RaySimplify = false ) : FlxPath
follow ( FlxCamera Camera = null, int Border, System.Boolean UpdateWorld = false ) : void
getTile ( int X, int Y ) : int
loadMap ( String CSVdataFile, Microsoft.Xna.Framework.Graphics.Texture2D Graphic, int TileWidth, int TileHeight, int DrawIndex, int CollideIndex = 1 ) : FlxTilemap
overlaps ( FlxBasic objectOrGroup, System.Boolean inScreenSpace = false, FlxCamera camera = null ) : System.Boolean
overlapsPoint ( FlxPoint point, System.Boolean inScreenSpace = false, FlxCamera camera = null ) : System.Boolean
overlapsWithCallback ( FlxObject Object, Func Callback = null, System.Boolean FlipCallbackParams = false, FlxPoint Position = null ) : System.Boolean
ray ( FlxPoint Start, FlxPoint End, FlxPoint Result = null, float Resolution = 1f ) : bool
setTileProperties ( uint Tile, uint AllowCollisions = 0x1111, FlxObject>.Action Callback = null, uint Range = 1 ) : void

Protected Methods

Method Description
computePathDistance ( int StartIndex, int EndIndex ) : List
drawTilemap ( FlxCamera Camera ) : void
raySimplifyPath ( List Points ) : void
simplifyPath ( List Points ) : void
updateTile ( int Index ) : void
walkPath ( List Data, int Start, List Points ) : void

Method Details

FlxTilemap() public method

public FlxTilemap ( ) : System
return System

computePathDistance() protected method

protected computePathDistance ( int StartIndex, int EndIndex ) : List
StartIndex int
EndIndex int
return List

draw() public method

public draw ( ) : void
return void

drawTilemap() protected method

protected drawTilemap ( FlxCamera Camera ) : void
Camera FlxCamera
return void

findPath() public method

public findPath ( FlxPoint Start, FlxPoint End, bool Simplify = true, bool RaySimplify = false ) : FlxPath
Start flxSharp.flxSharp.FlxPoint
End flxSharp.flxSharp.FlxPoint
Simplify bool
RaySimplify bool
return flxSharp.flxSharp.FlxPath

follow() public method

public follow ( FlxCamera Camera = null, int Border, System.Boolean UpdateWorld = false ) : void
Camera FlxCamera
Border int
UpdateWorld System.Boolean
return void

getTile() public method

public getTile ( int X, int Y ) : int
X int
Y int
return int

loadMap() public method

public loadMap ( String CSVdataFile, Microsoft.Xna.Framework.Graphics.Texture2D Graphic, int TileWidth, int TileHeight, int DrawIndex, int CollideIndex = 1 ) : FlxTilemap
CSVdataFile String
Graphic Microsoft.Xna.Framework.Graphics.Texture2D
TileWidth int
TileHeight int
DrawIndex int
CollideIndex int
return FlxTilemap

overlaps() public method

public overlaps ( FlxBasic objectOrGroup, System.Boolean inScreenSpace = false, FlxCamera camera = null ) : System.Boolean
objectOrGroup FlxBasic
inScreenSpace System.Boolean
camera FlxCamera
return System.Boolean

overlapsPoint() public method

public overlapsPoint ( FlxPoint point, System.Boolean inScreenSpace = false, FlxCamera camera = null ) : System.Boolean
point flxSharp.flxSharp.FlxPoint
inScreenSpace System.Boolean
camera FlxCamera
return System.Boolean

overlapsWithCallback() public method

public overlapsWithCallback ( FlxObject Object, Func Callback = null, System.Boolean FlipCallbackParams = false, FlxPoint Position = null ) : System.Boolean
Object FlxObject
Callback Func
FlipCallbackParams System.Boolean
Position flxSharp.flxSharp.FlxPoint
return System.Boolean

ray() public method

public ray ( FlxPoint Start, FlxPoint End, FlxPoint Result = null, float Resolution = 1f ) : bool
Start flxSharp.flxSharp.FlxPoint
End flxSharp.flxSharp.FlxPoint
Result flxSharp.flxSharp.FlxPoint
Resolution float
return bool

raySimplifyPath() protected method

protected raySimplifyPath ( List Points ) : void
Points List
return void

setTileProperties() public method

public setTileProperties ( uint Tile, uint AllowCollisions = 0x1111, FlxObject>.Action Callback = null, uint Range = 1 ) : void
Tile uint
AllowCollisions uint
Callback FlxObject>.Action
Range uint
return void

simplifyPath() protected method

protected simplifyPath ( List Points ) : void
Points List
return void

updateTile() protected method

protected updateTile ( int Index ) : void
Index int
return void

walkPath() protected method

protected walkPath ( List Data, int Start, List Points ) : void
Data List
Start int
Points List
return void

Property Details

_block protected_oe property

protected FlxObject _block
return FlxObject

_data protected_oe property

protected List _data
return List

_rects protected_oe property

protected Rectangle[],Microsoft.Xna.Framework _rects
return Microsoft.Xna.Framework.Rectangle[]

_startingIndex protected_oe property

protected uint _startingIndex
return uint

_tileHeight protected_oe property

protected int _tileHeight
return int

_tileObjects protected_oe property

protected FlxTile[],fliXNA_xbox _tileObjects
return fliXNA_xbox.FlxTile[]

_tileObjectsForDrawing protected_oe property

protected List _tileObjectsForDrawing
return List

_tileWidth protected_oe property

protected int _tileWidth
return int

_tiles protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics _tiles
return Microsoft.Xna.Framework.Graphics.Texture2D

auto public_oe property

public uint auto
return uint

collideIndex protected_oe property

protected int collideIndex
return int

tileGraphic public_oe property

public Texture2D,Microsoft.Xna.Framework.Graphics tileGraphic
return Microsoft.Xna.Framework.Graphics.Texture2D

tileSize protected_oe property

protected int tileSize
return int