C# Класс PathfindingTest.Collision.RTSCollisionMap

Наследование: AStarCollisionMap.Collision.CollisionMap
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

CanPlace() публичный Метод

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
Результат System.Boolean

DrawMap() публичный Метод

Draws this map on the screen.
public DrawMap ( SpriteBatch sb ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

PlaceBuilding() публичный Метод

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
Результат BuildingMesh

PlaceNodesAroundEdges() публичный Метод

Places nodes around collision edges
public PlaceNodesAroundEdges ( ) : void
Результат void

RTSCollisionMap() публичный Метод

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
Результат System

RTSCollisionMap() публичный Метод

public RTSCollisionMap ( GraphicsDevice device, int width, int height, int quadDepth ) : System
device GraphicsDevice
width int
height int
quadDepth int
Результат System