C# Class BulletMLLib.Bullet

This is the bullet class that outside assemblies will interact with. Just inherit from this class and override the abstract functions!
显示文件 Open project: pixelnest/BulletMLLib Class Usage Examples

Public Methods

Method Description
Bullet ( IBulletManager myBulletManager ) : System

Initializes a new instance of the BulletMLLib.Bullet class.

FindTaskByLabel ( string strLabel ) : BulletMLTask

Finds the task by label. This recurses into child tasks to find the taks with the correct label Used only for unit testing!

FindTaskByLabelAndName ( string strLabel, ENodeName eName ) : BulletMLTask

given a label and name, find the task that matches

GetAimDir ( ) : float

Get the direction to aim that bullet

InitBullet ( ) : void

After the creation, initialize the bullet with its data (like the correct sprite, etc)

InitNode ( BulletMLLib.BulletMLNode subNode ) : void

This bullet is fired from another bullet, initialize it from the node that fired it

InitTopNode ( BulletMLLib.BulletMLNode rootNode ) : void

Initialize this bullet with a top level node

Update ( ) : void

Update this bullet. Called once every 1/60th of a second during runtime

Method Details

Bullet() public method

Initializes a new instance of the BulletMLLib.Bullet class.
public Bullet ( IBulletManager myBulletManager ) : System
myBulletManager IBulletManager My bullet manager.
return System

FindTaskByLabel() public method

Finds the task by label. This recurses into child tasks to find the taks with the correct label Used only for unit testing!
public FindTaskByLabel ( string strLabel ) : BulletMLTask
strLabel string String label.
return BulletMLTask

FindTaskByLabelAndName() public method

given a label and name, find the task that matches
public FindTaskByLabelAndName ( string strLabel, ENodeName eName ) : BulletMLTask
strLabel string String label of the task
eName ENodeName the name of the node the task should be attached to
return BulletMLTask

GetAimDir() public method

Get the direction to aim that bullet
public GetAimDir ( ) : float
return float

InitBullet() public abstract method

After the creation, initialize the bullet with its data (like the correct sprite, etc)
public abstract InitBullet ( ) : void
return void

InitNode() public method

This bullet is fired from another bullet, initialize it from the node that fired it
public InitNode ( BulletMLLib.BulletMLNode subNode ) : void
subNode BulletMLLib.BulletMLNode Sub node that defines this bullet
return void

InitTopNode() public method

Initialize this bullet with a top level node
public InitTopNode ( BulletMLLib.BulletMLNode rootNode ) : void
rootNode BulletMLLib.BulletMLNode This is a top level node... find the first "top" node and use it to define this bullet
return void

Update() public method

Update this bullet. Called once every 1/60th of a second during runtime
public Update ( ) : void
return void