FlyingVehicle Class Reference#include <flyingVehicle.h>
Inheritance diagram for FlyingVehicle:
[legend]
|
Public Member Functions |
| DECLARE_CONOBJECT (FlyingVehicle) |
| FlyingVehicle () |
| ~FlyingVehicle () |
bool | onAdd () |
| Called when the object is added to the sim.
|
void | onRemove () |
| Called when the object is removed from the sim.
|
void | advanceTime (F32 dt) |
| Advances simulation time for animations.
|
void | writePacketData (GameConnection *conn, BitStream *stream) |
| Write state information necessary to perform client side prediction of an object.
|
void | readPacketData (GameConnection *conn, BitStream *stream) |
| Read data written with writePacketData() and update the object state.
|
U32 | packUpdate (NetConnection *conn, U32 mask, BitStream *stream) |
| Instructs this object to pack its state for transfer over the network.
|
void | unpackUpdate (NetConnection *conn, BitStream *stream) |
| Instructs this object to read state data previously packed with packUpdate.
|
void | useCreateHeight (bool val) |
Static Public Member Functions |
static void | initPersistFields () |
| Register dynamic fields in a subclass of ConsoleObject.
|
Private Types |
enum | NetMaskBits {
InitMask = BIT(0),
HoverHeight = BIT(1)
} |
enum | ThrustDirection {
ThrustForward,
ThrustBackward,
ThrustDown,
NumThrustDirections,
NumThrustBits = 3
} |
enum | Jets {
BackActivate,
BackMaintain,
BottomActivate,
BottomMaintain,
JetAnimCount
} |
typedef Vehicle | Parent |
Private Member Functions |
bool | onNewDataBlock (GameBaseData *dptr) |
| Called when a new datablock is set.
|
void | updateMove (const Move *move) |
void | updateForces (F32) |
F32 | getHeight () |
void | updateJet (F32 dt) |
void | updateEngineSound (F32 level) |
void | updateEmitter (bool active, F32 dt, ParticleEmitterData *emitter, S32 idx, S32 count) |
U32 | getCollisionMask () |
Private Attributes |
FlyingVehicleData * | mDataBlock |
| Datablock.
|
AUDIOHANDLE | mJetSound |
AUDIOHANDLE | mEngineSound |
bool | createHeightOn |
F32 | mCeilingFactor |
Point2F | mThrust |
ThrustDirection | mThrustDirection |
TSThread * | mJetThread [JetAnimCount] |
S32 | mJetSeq [JetAnimCount] |
bool | mBackMaintainOn |
bool | mBottomMaintainOn |
SimObjectPtr< ParticleEmitter > | mJetEmitter [FlyingVehicleData::MaxJetNodes] |
Static Private Attributes |
static const char * | sJetSequence [FlyingVehicle::JetAnimCount] |
static JetActivation | sJetActivation [NumThrustDirections] |
Data Structures |
struct | JetActivation |
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
-
ThrustForward |
|
ThrustBackward |
|
ThrustDown |
|
NumThrustDirections |
|
NumThrustBits |
|
- Enumerator:
-
BackActivate |
|
BackMaintain |
|
BottomActivate |
|
BottomMaintain |
|
JetAnimCount |
|
Constructor & Destructor Documentation
FlyingVehicle::FlyingVehicle |
( |
|
) |
|
FlyingVehicle::~FlyingVehicle |
( |
|
) |
|
Member Function Documentation
bool FlyingVehicle::onNewDataBlock |
( |
GameBaseData * |
dptr |
) |
[private, virtual] |
Called when a new datablock is set.
This allows subclasses to appropriately handle new datablocks.
- See also:
- setDataBlock()
- Parameters:
-
Reimplemented from Vehicle.
void FlyingVehicle::updateMove |
( |
const Move * |
move |
) |
[private, virtual] |
void FlyingVehicle::updateForces |
( |
F32 |
|
) |
[private, virtual] |
F32 FlyingVehicle::getHeight |
( |
|
) |
[private] |
void FlyingVehicle::updateJet |
( |
F32 |
dt |
) |
[private] |
void FlyingVehicle::updateEngineSound |
( |
F32 |
level |
) |
[private] |
U32 FlyingVehicle::getCollisionMask |
( |
|
) |
[private, virtual] |
static void FlyingVehicle::initPersistFields |
( |
|
) |
[static] |
bool FlyingVehicle::onAdd |
( |
|
) |
[virtual] |
Called when the object is added to the sim.
Reimplemented from Vehicle.
void FlyingVehicle::onRemove |
( |
|
) |
[virtual] |
Called when the object is removed from the sim.
Reimplemented from Vehicle.
void FlyingVehicle::advanceTime |
( |
F32 |
dt |
) |
[virtual] |
Advances simulation time for animations.
This is called every frame.
- Parameters:
-
| dt | Time since last advance call |
Reimplemented from Vehicle.
Write state information necessary to perform client side prediction of an object.
This information is sent only to the controling object. For example, if you are a client controlling a Player, the server uses writePacketData() instead of packUpdate() to generate the data you receive.
- Parameters:
-
| conn | Connection for which we're generating this data. |
| stream | Bitstream for output. |
Reimplemented from Vehicle.
Read data written with writePacketData() and update the object state.
- Parameters:
-
| conn | Connection for which we're generating this data. |
| stream | Bitstream to read. |
Reimplemented from Vehicle.
Instructs this object to pack its state for transfer over the network.
- Parameters:
-
| conn | Net connection being used |
| mask | Mask indicating fields to transmit. |
| stream | Bitstream to pack data to |
- Returns:
- Any bits which were not dealt with. The value is stored by the networking system. Don't set bits you weren't passed.
Reimplemented from Vehicle.
Instructs this object to read state data previously packed with packUpdate.
- Parameters:
-
| conn | Net connection being used |
| stream | stream to read from |
Reimplemented from Vehicle.
void FlyingVehicle::useCreateHeight |
( |
bool |
val |
) |
|
Field Documentation
Datablock.
Reimplemented from Vehicle.
|