Zap::Turret class Reference
Zap::Turret Class Reference
#include <engineeredObjects.h>
Inheritance diagram for Zap::Turret:
|
Public Types |
enum | {
TurretAimOffset = 15,
TurretRange = 600,
TurretPerceptionDistance = 800,
TurretProjectileVelocity = 600,
TurretTurnRate = 4,
TurretFireDelay = 150,
AimMask = EngineeredObject::NextFreeMask
} |
Public Member Functions |
| Turret (S32 team=-1, Point anchorPoint=Point(), Point anchorNormal=Point(1, 0)) |
bool | getCollisionPoly (Vector< Point > &polyPoints) |
void | render () |
void | idle (IdleCallPath path) |
void | onAddedToGame (Game *theGame) |
U32 | packUpdate (GhostConnection *connection, U32 updateMask, BitStream *stream) |
| Write the object's state to a packet.
|
void | unpackUpdate (GhostConnection *connection, BitStream *stream) |
| Unpack data written by packUpdate().
|
| TNL_DECLARE_CLASS (Turret) |
Private Types |
typedef EngineeredObject | Parent |
Private Attributes |
Timer | mFireTimer |
F32 | mCurrentAngle |
Member Typedef Documentation
Member Enumeration Documentation
|
- Enumeration values:
-
TurretAimOffset |
|
TurretRange |
|
TurretPerceptionDistance |
|
TurretProjectileVelocity |
|
TurretTurnRate |
|
TurretFireDelay |
|
AimMask |
|
|
Constructor & Destructor Documentation
Member Function Documentation
bool Zap::Turret::getCollisionPoly |
( |
Vector< Point > & |
polyPoints |
) |
[virtual] |
|
void Zap::Turret::render |
( |
|
) |
[virtual] |
|
void Zap::Turret::onAddedToGame |
( |
Game * |
theGame |
) |
[virtual] |
|
U32 Zap::Turret::packUpdate |
( |
GhostConnection * |
connection, |
|
|
U32 |
updateMask, |
|
|
BitStream * |
stream |
|
) |
[virtual] |
|
|
Write the object's state to a packet.
packUpdate is called on an object when it is to be written into a packet stream for transmission to the client. The updateMask parameter contains the out-of-date state mask for the object. The initial update mask for any object to a client will always be 0xFFFFFFFF, signifying that all states are out of date. It is often useful to check for this mask, to write one-time initialization information for that object.
Reimplemented from Zap::EngineeredObject. |
void Zap::Turret::unpackUpdate |
( |
GhostConnection * |
connection, |
|
|
BitStream * |
stream |
|
) |
[virtual] |
|
|
Unpack data written by packUpdate().
unpackUpdate is called on the client to read an update out of a packet's bit stream. Because the update mask is not encoded by the network system directly, each unpack update function will have to determine from the bit stream which states are being updated.
Reimplemented from Zap::EngineeredObject. |
Zap::Turret::TNL_DECLARE_CLASS |
( |
Turret |
|
) |
|
|
Field Documentation