TankSprite Class Reference

#include <TankSprite.h>

Inheritance diagram for TankSprite:

Inheritance graph
[legend]
Collaboration diagram for TankSprite:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TankSprite (int owner, std::string type)
virtual ~TankSprite ()
virtual void update ()
 Update this sprite's pysics and stuff.
virtual KeyDriverallocDriver (void)
virtual class AutoGunnergetAutoGunner (void)
virtual int paintHud (std::string &hudString)
virtual Packet packObject () const
 Create a network packet representing vital data about this Sprite.
virtual void setObject (Packet &p)
 Set this object's data to that represented by the packet p.

Protected Attributes

CannonTurretcannonTurret
Trackstracks

Friends

class TankDriver
class AutoGunner
class Hud

Constructor & Destructor Documentation

TankSprite::TankSprite ( int  owner,
std::string  type 
)

virtual TankSprite::~TankSprite (  )  [virtual]


Member Function Documentation

virtual KeyDriver* TankSprite::allocDriver ( void   )  [inline, virtual]

Reimplemented from VehicleSprite.

virtual class AutoGunner* TankSprite::getAutoGunner ( void   )  [inline, virtual]

Reimplemented from VehicleSprite.

virtual Packet TankSprite::packObject (  )  const [virtual]

Create a network packet representing vital data about this Sprite.

The default implementation packs an SPRITE_UDATE string followed by the sprites URI and all physics data in the form pos[0] rot[0] vel[0] ... aVel[3].

See also:
setObject

Reimplemented from Sprite.

virtual int TankSprite::paintHud ( std::string &  hudString  )  [virtual]

Reimplemented from VehicleSprite.

virtual void TankSprite::setObject ( Packet p  )  [virtual]

Set this object's data to that represented by the packet p.

The default implementation unpacks a packet created by the default impl. of packObject().

Reimplemented from Sprite.

virtual void TankSprite::update (  )  [virtual]

Update this sprite's pysics and stuff.

Note that the update method should use the static dTime variable to check the time since last invokation. The caller is responsible for setting this variable to an apropriate value!

Implements Sprite.


Friends And Related Function Documentation

friend class AutoGunner [friend]

friend class Hud [friend]

friend class TankDriver [friend]


Member Data Documentation

CannonTurret* TankSprite::cannonTurret [protected]

Tracks* TankSprite::tracks [protected]


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 15:33:26 2007 for MetalWarriors by  doxygen 1.4.7