torque Torque Game Engine Documentation
TGE Version 1.5.2

ProjectileData Class Reference

#include <projectile.h>

Inheritance diagram for ProjectileData:

Inheritance graph
[legend]

Detailed Description

Datablock for projectiles. This class is the base class for all other projectiles.


Public Types

enum  DecalConstants { NumDecals = 6 }

Public Member Functions

 ProjectileData ()
void packData (BitStream *)
void unpackData (BitStream *)
bool preload (bool server, char errorBuffer[256])
 Called to prepare the datablock for use, after it has been unpacked.
 DECLARE_CONOBJECT (ProjectileData)

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Data Fields

const char * projectileShapeName
bool hasLight
F32 lightRadius
ColorF lightColor
bool hasWaterLight
ColorF waterLightColor
bool faceViewer
 Set to true if it is a billboard and want it to always face the viewer, false otherwise.
Point3F scale
F32 velInheritFactor
 [0,1] scale of how much velocity should be inherited from the parent object
F32 muzzleVelocity
 Speed of the projectile when fired.
bool isBallistic
 Should it arc?
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].
F32 gravityMod
 Should this projectile fall/rise different than a default object?
U32 lifetime
 How long the projectile should exist before deleting itself.
S32 armingDelay
 How long it should not detonate on impact.
S32 fadeDelay
ExplosionDataexplosion
S32 explosionId
ExplosionDatawaterExplosion
S32 waterExplosionId
SplashDatasplash
S32 splashId
AudioProfilesound
S32 soundId
DecalDatadecals [NumDecals]
S32 decalId [NumDecals]
U32 decalCount
Resource< TSShapeprojectileShape
S32 activateSeq
S32 maintainSeq
ParticleEmitterDataparticleEmitter
S32 particleEmitterId
ParticleEmitterDataparticleWaterEmitter
S32 particleWaterEmitterId

Protected Member Functions

bool onAdd ()
 Called when the object is added to the sim.

Private Types

typedef GameBaseData Parent


Member Typedef Documentation

Reimplemented from GameBaseData.


Member Enumeration Documentation

Enumerator:
NumDecals 


Constructor & Destructor Documentation

ProjectileData::ProjectileData (  ) 


Member Function Documentation

bool ProjectileData::onAdd (  )  [protected, virtual]

Called when the object is added to the sim.

Reimplemented from GameBaseData.

void ProjectileData::packData ( BitStream  )  [virtual]

Reimplemented from SimDataBlock.

void ProjectileData::unpackData ( BitStream  )  [virtual]

Reimplemented from GameBaseData.

bool ProjectileData::preload ( bool  server,
char  errorBuffer[256] 
) [virtual]

Called to prepare the datablock for use, after it has been unpacked.

Parameters:
server Set if we're running on the server (and therefore don't need to load things like textures or sounds).
errorBuffer If an error occurs in loading, this is set to a short string describing the error.
Returns:
True if all went well; false if something failed.
See also:
preload() and File Downloading

Reimplemented from GameBaseData.

static void ProjectileData::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDepricatedField(), addGroup(), endGroup()

Reimplemented from GameBaseData.

ProjectileData::DECLARE_CONOBJECT ( ProjectileData   ) 


Field Documentation

Set to true if it is a billboard and want it to always face the viewer, false otherwise.

[0,1] scale of how much velocity should be inherited from the parent object

Speed of the projectile when fired.

Should it arc?

How HIGH should it bounce (parallel to normal), [0,1].

How much momentum should be lost when it bounces (perpendicular to normal), [0,1].

Should this projectile fall/rise different than a default object?

How long the projectile should exist before deleting itself.

How long it should not detonate on impact.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen