C# Class PathfindingTest.Collision.RTSCollisionMap

Inheritance: AStarCollisionMap.Collision.CollisionMap
Afficher le fichier Open project: Wotuu/RTS_XNA_v2 Class Usage Examples

Méthodes publiques

Méthode Description
CanPlace ( Rectangle rect ) : System.Boolean

Checks whether you can place the rectangle on the map. You can of course still update the collision map despite the outcome of this function.

DrawMap ( SpriteBatch sb ) : void

Draws this map on the screen.

PlaceBuilding ( Rectangle rect ) : BuildingMesh

Updates the collisionmap, adding the rectangle to the collisionmap, and performing new connections, as for placing nodes

PlaceNodesAroundEdges ( ) : void

Places nodes around collision edges

RTSCollisionMap ( Microsoft.Xna.Framework.Game game, int width, int height, String collisionMapPath, String collisionMapName ) : System
RTSCollisionMap ( GraphicsDevice device, int width, int height, int quadDepth ) : System

Method Details

CanPlace() public méthode

Checks whether you can place the rectangle on the map. You can of course still update the collision map despite the outcome of this function.
public CanPlace ( Rectangle rect ) : System.Boolean
rect Microsoft.Xna.Framework.Rectangle The rect you want to update
Résultat System.Boolean

DrawMap() public méthode

Draws this map on the screen.
public DrawMap ( SpriteBatch sb ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

PlaceBuilding() public méthode

Updates the collisionmap, adding the rectangle to the collisionmap, and performing new connections, as for placing nodes
public PlaceBuilding ( Rectangle rect ) : BuildingMesh
rect Microsoft.Xna.Framework.Rectangle
Résultat BuildingMesh

PlaceNodesAroundEdges() public méthode

Places nodes around collision edges
public PlaceNodesAroundEdges ( ) : void
Résultat void

RTSCollisionMap() public méthode

public RTSCollisionMap ( Microsoft.Xna.Framework.Game game, int width, int height, String collisionMapPath, String collisionMapName ) : System
game Microsoft.Xna.Framework.Game
width int
height int
collisionMapPath String
collisionMapName String
Résultat System

RTSCollisionMap() public méthode

public RTSCollisionMap ( GraphicsDevice device, int width, int height, int quadDepth ) : System
device GraphicsDevice
width int
height int
quadDepth int
Résultat System