|
Base debris class. Uses the DebrisData datablock for properties of individual debris objects. More...
Public Member Functions | |
bool | init (string inputPosition="1.0 1.0 1.0", string inputVelocity="1.0 0.0 0.0") |
Manually set this piece of debris at the given position with the given velocity. | |
Public Attributes | |
Debris | |
float | lifetime |
Length of time for this debris object to exist. When expired, the object will be deleted. | |
Static Public Attributes | |
static bool | isRenderable |
Disables rendering of all instances of this type. | |
static bool | isSelectable |
Disables selection of all instances of this type. |
Base debris class. Uses the DebrisData datablock for properties of individual debris objects.
Debris is typically made up of a shape and up to two particle emitters. In most cases Debris objects are not created directly. They are usually produced automatically by other means, such as through the Explosion class. When an explosion goes off, its ExplosionData datablock determines what Debris to emit.
datablock ExplosionData(GrenadeLauncherExplosion) { // Assiging debris data debris = GrenadeDebris; // Adjust how debris is ejected debrisThetaMin = 10; debrisThetaMax = 60; debrisNum = 4; debrisNumVariance = 2; debrisVelocity = 25; debrisVelocityVariance = 5; // Note: other ExplosionData properties are not listed for this example };
bool Debris::init | ( | string | inputPosition = "1.0 1.0 1.0" , |
|
string | inputVelocity = "1.0 0.0 0.0" | |||
) |
Manually set this piece of debris at the given position with the given velocity.
Usually you do not manually create Debris objects as they are generated through other means, such as an Explosion. This method exists when you do manually create a Debris object and want to have it start moving.
inputPosition | Position to place the debris. | |
inputVelocity | Velocity to move the debris after it has been placed. |
bool Debris::isRenderable [static] |
Disables rendering of all instances of this type.
Reimplemented from GameBase.
bool Debris::isSelectable [static] |
Disables selection of all instances of this type.
Reimplemented from GameBase.
float Debris::lifetime |
Length of time for this debris object to exist. When expired, the object will be deleted.
The initial lifetime value comes from the DebrisData datablock.