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::Mine class Reference

Zap::Mine Class Reference

#include <projectile.h>

Inheritance diagram for Zap::Mine:

Zap::GrenadeProjectile Zap::Item Zap::MoveObject Zap::GameObject TNL::NetObject TNL::Object

Public Types

enum  Constants {
  ArmedMask = GrenadeProjectile::FirstFreeMask,
  SensorRadius = 50,
  InnerBlastRadius = 75,
  OuterBlastRadius = 100
}

Public Member Functions

 Mine (Point pos=Point(), Ship *owner=NULL)
bool collide (GameObject *otherObj)
void idle (IdleCallPath path)
void damageObject (DamageInfo *damageInfo)
void renderItem (Point p)
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 (Mine)

Data Fields

bool mArmed
Timer mScanTimer
SafePtr< GameConnectionmOwnerConnection

Private Types

typedef GrenadeProjectile Parent

Member Typedef Documentation

typedef GrenadeProjectile Zap::Mine::Parent [private]
 

Reimplemented from Zap::GrenadeProjectile.


Member Enumeration Documentation

enum Zap::Mine::Constants
 

Enumeration values:
ArmedMask 
SensorRadius 
InnerBlastRadius 
OuterBlastRadius 

Reimplemented from Zap::GrenadeProjectile.


Constructor & Destructor Documentation

Zap::Mine::Mine Point  pos = Point(),
Ship owner = NULL
 


Member Function Documentation

bool Zap::Mine::collide GameObject otherObj  )  [virtual]
 

Reimplemented from Zap::GrenadeProjectile.

void Zap::Mine::idle IdleCallPath  path  )  [virtual]
 

Reimplemented from Zap::GrenadeProjectile.

void Zap::Mine::damageObject DamageInfo damageInfo  )  [virtual]
 

Reimplemented from Zap::GrenadeProjectile.

void Zap::Mine::renderItem Point  p  )  [virtual]
 

Reimplemented from Zap::GrenadeProjectile.

U32 Zap::Mine::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::GrenadeProjectile.

void Zap::Mine::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::GrenadeProjectile.

Zap::Mine::TNL_DECLARE_CLASS Mine   ) 
 


Field Documentation

bool Zap::Mine::mArmed
 

Timer Zap::Mine::mScanTimer
 

SafePtr<GameConnection> Zap::Mine::mOwnerConnection