C# Класс AStarCollisionMap.QuadTree.CollisionTexture

Показать файл Открыть проект

Private Properties

Свойство Тип Описание
UpdateTexture void

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

Метод Описание
CollisionAt ( int i ) : System.Boolean

Checks whether there is collision at a certain point.

CollisionTexture ( Quad quad, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System
PointToIndex ( int x, int y ) : int

Returns the index of a certain point.

SetCollisionAt ( int i, System.Boolean value ) : void

Sets collision data at this point.

TextureToBoolean ( ) : System.Boolean[]

Converts a texture to a boolean array

UpdateCollision ( Rectangle rect, System.Boolean add ) : void

Updates the collision of this texture, and update the texture as well.

Приватные методы

Метод Описание
UpdateTexture ( ) : void

Updates the texture of this collisiontexture.

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

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

Checks whether there is collision at a certain point.
public CollisionAt ( int i ) : System.Boolean
i int The index of the point to check at. Note that the index has to fall within /// the bounds of this texture, i.e., it's only as large as this.rectangle.Width * this.rectangle.Height.
Результат System.Boolean

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

public CollisionTexture ( Quad quad, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System
quad Quad
texture Microsoft.Xna.Framework.Graphics.Texture2D
Результат System

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

Returns the index of a certain point.
public PointToIndex ( int x, int y ) : int
x int
y int
Результат int

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

Sets collision data at this point.
public SetCollisionAt ( int i, System.Boolean value ) : void
i int The point to put it at.
value System.Boolean The value to place it at.
Результат void

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

Converts a texture to a boolean array
public TextureToBoolean ( ) : System.Boolean[]
Результат System.Boolean[]

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

Updates the collision of this texture, and update the texture as well.
public UpdateCollision ( Rectangle rect, System.Boolean add ) : void
rect Microsoft.Xna.Framework.Rectangle The rectangle that is to be updated.
add System.Boolean Whether to add or remove the rectangle.
Результат void