C# Class MyGame.Unit

Show file Open project: mahmoudbahaa/XNA-Game-project Class Usage Examples

Public Properties

Property Type Description
alive bool
baseWorld System.Matrix
position System.Vector3
rotation System.Vector3
scale System.Vector3

Protected Properties

Property Type Description
boundingBox BoundingBox
boundingSphere BoundingSphere
events List
myGame MyGame

Public Methods

Method Description
Unit ( MyGame game, System.Vector3 position, System.Vector3 rotation, System.Vector3 scale ) : System
addEvent ( MyGame.Event ev ) : void

Add event to the event queue

collideWith ( Unit otherUnit ) : bool
update ( GameTime gameTime ) : void

Allows the unit to update itself.

Method Details

Unit() public method

public Unit ( MyGame game, System.Vector3 position, System.Vector3 rotation, System.Vector3 scale ) : System
game MyGame
position System.Vector3
rotation System.Vector3
scale System.Vector3
return System

addEvent() public method

Add event to the event queue
public addEvent ( MyGame.Event ev ) : void
ev MyGame.Event Event to be added
return void

collideWith() public method

public collideWith ( Unit otherUnit ) : bool
otherUnit Unit
return bool

update() public method

Allows the unit to update itself.
public update ( GameTime gameTime ) : void
gameTime GameTime Provides a snapshot of timing values.
return void

Property Details

alive public property

public bool alive
return bool

baseWorld public property

public Matrix,System baseWorld
return System.Matrix

boundingBox protected property

protected BoundingBox boundingBox
return BoundingBox

boundingSphere protected property

protected BoundingSphere boundingSphere
return BoundingSphere

events protected property

protected List events
return List

myGame protected property

protected MyGame myGame
return MyGame

position public property

public Vector3,System position
return System.Vector3

rotation public property

public Vector3,System rotation
return System.Vector3

scale public property

public Vector3,System scale
return System.Vector3