C# Class SuperCaissiere.Engine.Physics.Hitbox

Simple rectangle hitbox
ファイルを表示 Open project: valryon/super-caissiere Class Usage Examples

Public Methods

Method Description
Collide ( Hitbox rectHitboxA, Hitbox rectHitboxB ) : Vector2

Collision with another rectangle hitbox (from Platformer 4.0)

Collide ( Hitbox rectBox, Rectangle zoneB, Vector2 &depth ) : bool

Tile collisions

Draw ( Graphics spriteBatch ) : void
Hitbox ( Rectangle dimensionRect ) : System

Collision box with specified dimension

Update ( GameTime gameTime, Vector2 entityLocation ) : void
UpdateBounds ( ) : void

Method Details

Collide() public static method

Collision with another rectangle hitbox (from Platformer 4.0)
public static Collide ( Hitbox rectHitboxA, Hitbox rectHitboxB ) : Vector2
rectHitboxA Hitbox
rectHitboxB Hitbox
return Vector2

Collide() public static method

Tile collisions
public static Collide ( Hitbox rectBox, Rectangle zoneB, Vector2 &depth ) : bool
rectBox Hitbox
zoneB Microsoft.Xna.Framework.Rectangle
depth Vector2
return bool

Draw() public method

public Draw ( Graphics spriteBatch ) : void
spriteBatch Graphics
return void

Hitbox() public method

Collision box with specified dimension
public Hitbox ( Rectangle dimensionRect ) : System
dimensionRect Microsoft.Xna.Framework.Rectangle
return System

Update() public method

public Update ( GameTime gameTime, Vector2 entityLocation ) : void
gameTime Microsoft.Xna.Framework.GameTime
entityLocation Vector2
return void

UpdateBounds() public method

public UpdateBounds ( ) : void
return void