Property | Type | Description | |
---|---|---|---|
attack | double | ||
boidType | Flock.BoidType | ||
flock | Flock | ||
health | double | ||
maxHealth | double |
Property | Type | Description | |
---|---|---|---|
ToDestroy | System.Boolean | ||
healthyColor | Color | ||
sickColor | Color |
Method | Description | |
---|---|---|
Boid ( Project2Game game, Flock flock, SharpDX.Toolkit.Graphics.Model model, System.Vector3 position, Flock boidType ) : System | ||
Destroy ( System.Boolean Async = false ) : void |
Implements object destroying in a manner that can be called asynchronously The first call to this function doesn't actually destroy the object, but sets a flag to destroy it. Calling this function again will remove the object. A suggested use case it to call this function if ToDestroy is inside Update()
|
|
Draw ( SharpDX.Toolkit.GameTime gametime ) : void | ||
HandleCollision ( RigidBody body1, RigidBody body2, Jitter.LinearMath.JVector point1, Jitter.LinearMath.JVector point2, Jitter.LinearMath.JVector normal, float penetration ) : void |
This method handles explicit object collision logic. Is registered to physics engine CollisionDetected event handler. Fired on any detected collision, so must check if the collision applies to this object
|
|
Update ( SharpDX.Toolkit.GameTime gametime ) : void |
Method | Description | |
---|---|---|
Collision ( RigidBody other ) : void |
public Boid ( Project2Game game, Flock flock, SharpDX.Toolkit.Graphics.Model model, System.Vector3 position, Flock boidType ) : System | ||
game | Project2Game | |
flock | Flock | |
model | SharpDX.Toolkit.Graphics.Model | |
position | System.Vector3 | |
boidType | Flock | |
return | System |
protected Collision ( RigidBody other ) : void | ||
other | RigidBody | |
return | void |
public Destroy ( System.Boolean Async = false ) : void | ||
Async | System.Boolean | |
return | void |
public Draw ( SharpDX.Toolkit.GameTime gametime ) : void | ||
gametime | SharpDX.Toolkit.GameTime | |
return | void |
public HandleCollision ( RigidBody body1, RigidBody body2, Jitter.LinearMath.JVector point1, Jitter.LinearMath.JVector point2, Jitter.LinearMath.JVector normal, float penetration ) : void | ||
body1 | RigidBody | |
body2 | RigidBody | |
point1 | Jitter.LinearMath.JVector | |
point2 | Jitter.LinearMath.JVector | |
normal | Jitter.LinearMath.JVector | |
penetration | float | |
return | void |
public Update ( SharpDX.Toolkit.GameTime gametime ) : void | ||
gametime | SharpDX.Toolkit.GameTime | |
return | void |