C# Class Nez.BoxCollider

Inheritance: Collider
显示文件 Open project: prime31/Nez Class Usage Examples

Public Methods

Method Description
BoxCollider ( ) : Microsoft.Xna.Framework

zero param constructor requires that a RenderableComponent be on the entity so that the collider can size itself when the entity is added to the scene.

BoxCollider ( Rectangle rect ) : Microsoft.Xna.Framework

creates a BoxCollider and uses the x/y components of the Rect as the localOffset

BoxCollider ( float width, float height ) : Microsoft.Xna.Framework
BoxCollider ( float x, float y, float width, float height ) : Microsoft.Xna.Framework

creates a BoxCollider and uses the x/y components as the localOffset

ToString ( ) : string
debugRender ( Graphics graphics ) : void
setHeight ( float height ) : BoxCollider
setWidth ( float width ) : BoxCollider

Method Details

BoxCollider() public method

zero param constructor requires that a RenderableComponent be on the entity so that the collider can size itself when the entity is added to the scene.
public BoxCollider ( ) : Microsoft.Xna.Framework
return Microsoft.Xna.Framework

BoxCollider() public method

creates a BoxCollider and uses the x/y components of the Rect as the localOffset
public BoxCollider ( Rectangle rect ) : Microsoft.Xna.Framework
rect Microsoft.Xna.Framework.Rectangle Rect.
return Microsoft.Xna.Framework

BoxCollider() public method

public BoxCollider ( float width, float height ) : Microsoft.Xna.Framework
width float
height float
return Microsoft.Xna.Framework

BoxCollider() public method

creates a BoxCollider and uses the x/y components as the localOffset
public BoxCollider ( float x, float y, float width, float height ) : Microsoft.Xna.Framework
x float The x coordinate.
y float The y coordinate.
width float Width.
height float Height.
return Microsoft.Xna.Framework

ToString() public method

public ToString ( ) : string
return string

debugRender() public method

public debugRender ( Graphics graphics ) : void
graphics Graphics
return void

setHeight() public method

public setHeight ( float height ) : BoxCollider
height float
return BoxCollider

setWidth() public method

public setWidth ( float width ) : BoxCollider
width float
return BoxCollider