ProjectileData
Engine/source/T3D/projectile.h
Datablock for projectiles. This class is the base class for all other projectiles.
Private Types
Parent
Public Attributes
How long it should not detonate on impact.
How HIGH should it bounce (parallel to normal), [0,1].
How much momentum should be lost when it bounces (perpendicular to normal), [0,1].
bool
Set to true if it is a billboard and want it to always face the viewer, false otherwise.
Should this projectile fall/rise different than a default object?
Force imparted on a hit object.
bool
Should it arc?
Speed of the projectile when fired.
const char *
[0,1] scale of how much velocity should be inherited from the parent object
Protected Functions
bool
onAdd()
Called when the object is added to the sim.
Public Functions
ProjectileData(const ProjectileData & , bool )
bool
DECLARE_CALLBACK(void , onCollision , (Projectile *proj, SceneObject *col, F32 fade, Point3F pos, Point3F normal) )
DECLARE_CALLBACK(void , onExplode , (Projectile *proj, Point3F pos, F32 fade) )
bool
unpackData(BitStream * )
Public Static Functions
const char *
getScaledValue(void * obj, const char * data)
scaleValue(S32 value, bool down)
bool
setArmingDelay(void * object, const char * index, const char * data)
bool
setFadeDelay(void * object, const char * index, const char * data)
bool
setLifetime(void * object, const char * index, const char * data)
Detailed Description
Datablock for projectiles. This class is the base class for all other projectiles.
Private Types
typedef GameBaseData Parent
Public Attributes
S32 activateSeq
S32 armingDelay
How long it should not detonate on impact.
F32 bounceElasticity
How HIGH should it bounce (parallel to normal), [0,1].
F32 bounceFriction
How much momentum should be lost when it bounces (perpendicular to normal), [0,1].
DecalData * decal
S32 decalId
ExplosionData * explosion
S32 explosionId
bool faceViewer
Set to true if it is a billboard and want it to always face the viewer, false otherwise.
S32 fadeDelay
F32 gravityMod
Should this projectile fall/rise different than a default object?
F32 impactForce
Force imparted on a hit object.
bool isBallistic
Should it arc?
U32 lifetime
How long the projectile should exist before deleting itself.
LightDescription * lightDesc
S32 lightDescId
S32 maintainSeq
F32 muzzleVelocity
Speed of the projectile when fired.
ParticleEmitterData * particleEmitter
S32 particleEmitterId
ParticleEmitterData * particleWaterEmitter
S32 particleWaterEmitterId
Resource< TSShape > projectileShape
const char * projectileShapeName
Point3F scale
SFXTrack * sound
SplashData * splash
S32 splashId
F32 velInheritFactor
[0,1] scale of how much velocity should be inherited from the parent object
ExplosionData * waterExplosion
S32 waterExplosionId
Protected Functions
onAdd()
Reimplemented from: GameBaseData
Public Functions
ProjectileData()
ProjectileData(const ProjectileData & , bool )
allowSubstitutions()
Reimplemented from: SimObject
Reimplemented by: afxProjectileData
DECLARE_CALLBACK(void , onCollision , (Projectile *proj, SceneObject *col, F32 fade, Point3F pos, Point3F normal) )
DECLARE_CALLBACK(void , onExplode , (Projectile *proj, Point3F pos, F32 fade) )
DECLARE_CONOBJECT(ProjectileData )
packData(BitStream * )
Reimplemented from: SimDataBlock
preload(bool server, String & errorStr)
Reimplemented from: GameBaseData
unpackData(BitStream * )
Reimplemented from: GameBaseData
Public Static Functions
getScaledValue(void * obj, const char * data)
initPersistFields()
scaleValue(S32 value, bool down)
setArmingDelay(void * object, const char * index, const char * data)
setFadeDelay(void * object, const char * index, const char * data)
setLifetime(void * object, const char * index, const char * data)