News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

Zap::GoalZone class Reference

Zap::GoalZone Class Reference

#include <goalZone.h>

Inheritance diagram for Zap::GoalZone:

Zap::GameObject TNL::NetObject TNL::Object

Public Member Functions

 GoalZone ()
void render ()
bool isFlashing ()
bool didRecentlyChangeTeam ()
S32 getRenderSortValue ()
void processArguments (S32 argc, const char **argv)
void setTeam (S32 team)
void onAddedToGame (Game *theGame)
void computeExtent ()
bool getCollisionPoly (Vector< Point > &polyPoints)
bool collide (GameObject *hitObject)
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().

void idle (GameObject::IdleCallPath path)
 TNL_DECLARE_CLASS (GoalZone)

Private Types

typedef GameObject Parent
enum  {
  MaxPoints = 10,
  FlashDelay = 500,
  FlashCount = 5,
  InitialMask = BIT(0),
  TeamMask = BIT(1)
}

Private Attributes

Vector< PointmPolyBounds
S32 mFlashCount
Timer mFlashTimer

Member Typedef Documentation

typedef GameObject Zap::GoalZone::Parent [private]
 

Reimplemented from Zap::GameObject.


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
MaxPoints 
FlashDelay 
FlashCount 
InitialMask 
TeamMask 


Constructor & Destructor Documentation

Zap::GoalZone::GoalZone  ) 
 


Member Function Documentation

void Zap::GoalZone::render  )  [virtual]
 

Reimplemented from Zap::GameObject.

bool Zap::GoalZone::isFlashing  )  [inline]
 

bool Zap::GoalZone::didRecentlyChangeTeam  )  [inline]
 

S32 Zap::GoalZone::getRenderSortValue  )  [virtual]
 

Reimplemented from Zap::GameObject.

void Zap::GoalZone::processArguments S32  argc,
const char **  argv
[virtual]
 

Reimplemented from Zap::GameObject.

void Zap::GoalZone::setTeam S32  team  ) 
 

void Zap::GoalZone::onAddedToGame Game theGame  )  [virtual]
 

Reimplemented from Zap::GameObject.

void Zap::GoalZone::computeExtent  ) 
 

bool Zap::GoalZone::getCollisionPoly Vector< Point > &  polyPoints  )  [virtual]
 

Reimplemented from Zap::GameObject.

bool Zap::GoalZone::collide GameObject hitObject  )  [virtual]
 

Reimplemented from Zap::GameObject.

U32 Zap::GoalZone::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 TNL::NetObject.

void Zap::GoalZone::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 TNL::NetObject.

void Zap::GoalZone::idle GameObject::IdleCallPath  path  ) 
 

Zap::GoalZone::TNL_DECLARE_CLASS GoalZone   ) 
 


Field Documentation

Vector<Point> Zap::GoalZone::mPolyBounds [private]
 

S32 Zap::GoalZone::mFlashCount [private]
 

Timer Zap::GoalZone::mFlashTimer [private]