C# Class UHSampleGame.TileSystem.TileMap

显示文件 Open project: holtkampw/UH-Sample-XNA-Project

Public Properties

Property Type Description
TileCount int
pathThread System.Thread
pathThreadExit EventWaitHandle

Public Methods

Method Description
Dispose ( ) : void
Draw ( ) : void
GetTileForPlayer ( int playerNum ) : Tile
GetTileFromPos ( Vector3 position ) : Tile

Returns a Tile2 given a Vector3 position

GetTileFromType ( TileType tileType ) : Tile
GetTileIndexFromPos ( Vector3 position ) : int
GetTileNeighbor ( Tile Tile2, NeighborTile neighborTile ) : Tile

Gets a neigbhoring Tile2's position

GetTilePosFromPos ( Vector3 position ) : Vector3
GetTowerInformationAtPosition ( Vector3 position ) : Tower
GetWalkableNeighbors ( Tile Tile2 ) : List
GetWalkableNeighbors ( Tile tile, Tile>.Dictionary exclude ) : List
GetWalkableNeighborsInts ( Tile Tile2 ) : List
InitializeTileMap ( Vector3 position, Vector2 numTiles, Vector2 tileSize ) : void
IsTilePathsValid ( ) : bool
IsTilePathsValidFor ( int newBlockableTile ) : bool
RemoveTower ( Tile &Tile2 ) : void
SetBase ( Base setBase ) : void
SetBase ( Base setBase, Tile tile ) : void
SetObject ( Base gameObject, Tile Tile2 ) : void
SetObject ( Tower gameObject, Tile Tile2 ) : void
SetTower ( Tower &tower, Tile &Tile2 ) : bool
SetTowerForLevelMap ( Tower tower, Tile tile ) : void
ThreadedTilePaths ( object indexToKill ) : void
Update ( GameTime gameTime ) : void
UpdateTilePaths ( ) : void

Protected Methods

Method Description
InitializeTiles ( ) : void

Private Methods

Method Description
OnTowerCreated ( ) : void

Method Details

Dispose() public static method

public static Dispose ( ) : void
return void

Draw() public static method

public static Draw ( ) : void
return void

GetTileForPlayer() public static method

public static GetTileForPlayer ( int playerNum ) : Tile
playerNum int
return Tile

GetTileFromPos() public static method

Returns a Tile2 given a Vector3 position
public static GetTileFromPos ( Vector3 position ) : Tile
position Vector3 The position to investigate
return Tile

GetTileFromType() public static method

public static GetTileFromType ( TileType tileType ) : Tile
tileType TileType
return Tile

GetTileIndexFromPos() public static method

public static GetTileIndexFromPos ( Vector3 position ) : int
position Vector3
return int

GetTileNeighbor() public static method

Gets a neigbhoring Tile2's position
public static GetTileNeighbor ( Tile Tile2, NeighborTile neighborTile ) : Tile
Tile2 Tile The start Tile2
neighborTile NeighborTile The neighbor to examine
return Tile

GetTilePosFromPos() public static method

public static GetTilePosFromPos ( Vector3 position ) : Vector3
position Vector3
return Vector3

GetTowerInformationAtPosition() public static method

public static GetTowerInformationAtPosition ( Vector3 position ) : Tower
position Vector3
return UHSampleGame.CoreObjects.Towers.Tower

GetWalkableNeighbors() public static method

public static GetWalkableNeighbors ( Tile Tile2 ) : List
Tile2 Tile
return List

GetWalkableNeighbors() public static method

public static GetWalkableNeighbors ( Tile tile, Tile>.Dictionary exclude ) : List
tile Tile
exclude Tile>.Dictionary
return List

GetWalkableNeighborsInts() public static method

public static GetWalkableNeighborsInts ( Tile Tile2 ) : List
Tile2 Tile
return List

InitializeTileMap() public static method

public static InitializeTileMap ( Vector3 position, Vector2 numTiles, Vector2 tileSize ) : void
position Vector3
numTiles Vector2
tileSize Vector2
return void

InitializeTiles() protected static method

protected static InitializeTiles ( ) : void
return void

IsTilePathsValid() public static method

public static IsTilePathsValid ( ) : bool
return bool

IsTilePathsValidFor() public static method

public static IsTilePathsValidFor ( int newBlockableTile ) : bool
newBlockableTile int
return bool

RemoveTower() public static method

public static RemoveTower ( Tile &Tile2 ) : void
Tile2 Tile
return void

SetBase() public static method

public static SetBase ( Base setBase ) : void
setBase UHSampleGame.CoreObjects.Base.Base
return void

SetBase() public static method

public static SetBase ( Base setBase, Tile tile ) : void
setBase UHSampleGame.CoreObjects.Base.Base
tile Tile
return void

SetObject() public static method

public static SetObject ( Base gameObject, Tile Tile2 ) : void
gameObject UHSampleGame.CoreObjects.Base.Base
Tile2 Tile
return void

SetObject() public static method

public static SetObject ( Tower gameObject, Tile Tile2 ) : void
gameObject UHSampleGame.CoreObjects.Towers.Tower
Tile2 Tile
return void

SetTower() public static method

public static SetTower ( Tower &tower, Tile &Tile2 ) : bool
tower UHSampleGame.CoreObjects.Towers.Tower
Tile2 Tile
return bool

SetTowerForLevelMap() public static method

public static SetTowerForLevelMap ( Tower tower, Tile tile ) : void
tower UHSampleGame.CoreObjects.Towers.Tower
tile Tile
return void

ThreadedTilePaths() public static method

public static ThreadedTilePaths ( object indexToKill ) : void
indexToKill object
return void

Update() public static method

public static Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

UpdateTilePaths() public static method

public static UpdateTilePaths ( ) : void
return void

Property Details

TileCount public_oe static_oe property

public static int TileCount
return int

pathThread public_oe static_oe property

public static Thread,System pathThread
return System.Thread

pathThreadExit public_oe static_oe property

public static EventWaitHandle pathThreadExit
return EventWaitHandle