ComsPlayedMoveMessage Class Reference

#include <ComsPlayedMoveMessage.h>

Inheritance diagram for ComsPlayedMoveMessage:

ComsMessage

List of all members.

Public Types

enum  MoveType {
  eNone, eShot, eResign,
  eSkip, eFinishedBuy
}

Public Member Functions

 ComsPlayedMoveMessage (unsigned int playerId=0, MoveType type=eNone)
virtual ~ComsPlayedMoveMessage ()
void setShot (unsigned int weaponId, fixed rotationXY, fixed rotationYZ, fixed power, int positionX, int positionY)
unsigned int getPlayerId ()
unsigned int getWeaponId ()
fixed getRotationXY ()
fixed getRotationYZ ()
int getSelectPositionX ()
int getSelectPositionY ()
fixed getPower ()
MoveType getType ()
virtual bool writeMessage (NetBuffer &buffer)
virtual bool readMessage (NetBufferReader &reader)

Protected Attributes

unsigned int playerId_
unsigned int weaponId_
MoveType moveType_
fixed rotationXY_
fixed rotationYZ_
fixed power_
int selectPositionX_
int selectPositionY_

Private Member Functions

 ComsPlayedMoveMessage (const ComsPlayedMoveMessage &)
const
ComsPlayedMoveMessage
operator= (const ComsPlayedMoveMessage &)


Detailed Description

Definition at line 26 of file ComsPlayedMoveMessage.h.


Member Enumeration Documentation

enum ComsPlayedMoveMessage::MoveType

Enumerator:
eNone 
eShot 
eResign 
eSkip 
eFinishedBuy 

Definition at line 29 of file ComsPlayedMoveMessage.h.


Constructor & Destructor Documentation

ComsPlayedMoveMessage::ComsPlayedMoveMessage ( unsigned int  playerId = 0,
MoveType  type = eNone 
)

Definition at line 23 of file ComsPlayedMoveMessage.cpp.

ComsPlayedMoveMessage::~ComsPlayedMoveMessage (  )  [virtual]

Definition at line 32 of file ComsPlayedMoveMessage.cpp.

ComsPlayedMoveMessage::ComsPlayedMoveMessage ( const ComsPlayedMoveMessage  )  [private]


Member Function Documentation

void ComsPlayedMoveMessage::setShot ( unsigned int  weaponId,
fixed  rotationXY,
fixed  rotationYZ,
fixed  power,
int  positionX,
int  positionY 
)

Definition at line 36 of file ComsPlayedMoveMessage.cpp.

References power_, rotationXY_, rotationYZ_, selectPositionX_, selectPositionY_, and weaponId_.

Referenced by TankAICurrentMove::fireShot().

unsigned int ComsPlayedMoveMessage::getPlayerId (  )  [inline]

Definition at line 49 of file ComsPlayedMoveMessage.h.

References playerId_.

Referenced by ServerPlayedMoveHandler::processMessage().

unsigned int ComsPlayedMoveMessage::getWeaponId (  )  [inline]

Definition at line 50 of file ComsPlayedMoveMessage.h.

References weaponId_.

Referenced by PlayShots::processFiredMessage(), and ServerShotHolder::validateFiredMessage().

fixed ComsPlayedMoveMessage::getRotationXY (  )  [inline]

Definition at line 51 of file ComsPlayedMoveMessage.h.

References rotationXY_.

Referenced by PlayShots::processFiredMessage().

fixed ComsPlayedMoveMessage::getRotationYZ (  )  [inline]

Definition at line 52 of file ComsPlayedMoveMessage.h.

References rotationYZ_.

Referenced by PlayShots::processFiredMessage().

int ComsPlayedMoveMessage::getSelectPositionX (  )  [inline]

Definition at line 53 of file ComsPlayedMoveMessage.h.

References selectPositionX_.

Referenced by PlayShots::processFiredMessage(), and ServerShotHolder::validateFiredMessage().

int ComsPlayedMoveMessage::getSelectPositionY (  )  [inline]

Definition at line 54 of file ComsPlayedMoveMessage.h.

References selectPositionY_.

Referenced by PlayShots::processFiredMessage(), and ServerShotHolder::validateFiredMessage().

fixed ComsPlayedMoveMessage::getPower (  )  [inline]

Definition at line 55 of file ComsPlayedMoveMessage.h.

References power_.

Referenced by PlayShots::processFiredMessage().

MoveType ComsPlayedMoveMessage::getType (  )  [inline]

Definition at line 56 of file ComsPlayedMoveMessage.h.

References moveType_.

Referenced by ServerShotHolder::addShot(), ServerShotHolder::allSkipped(), ServerPlayedMoveHandler::processMessage(), and PlayShots::processPlayedMoveMessage().

bool ComsPlayedMoveMessage::writeMessage ( NetBuffer buffer  )  [virtual]

Implements ComsMessage.

Definition at line 51 of file ComsPlayedMoveMessage.cpp.

References NetBuffer::addToBuffer(), eShot, moveType_, playerId_, power_, rotationXY_, rotationYZ_, selectPositionX_, selectPositionY_, and weaponId_.

Referenced by ComsPlayMovesMessage::writeMessage().

bool ComsPlayedMoveMessage::readMessage ( NetBufferReader reader  )  [virtual]

Implements ComsMessage.

Definition at line 67 of file ComsPlayedMoveMessage.cpp.

References eShot, NetBufferReader::getFromBuffer(), moveType_, playerId_, power_, rotationXY_, rotationYZ_, selectPositionX_, selectPositionY_, and weaponId_.

Referenced by ServerPlayedMoveHandler::processMessage(), and ComsPlayMovesMessage::readMessage().

const ComsPlayedMoveMessage& ComsPlayedMoveMessage::operator= ( const ComsPlayedMoveMessage  )  [private]


Member Data Documentation

unsigned int ComsPlayedMoveMessage::playerId_ [protected]

Definition at line 63 of file ComsPlayedMoveMessage.h.

Referenced by getPlayerId(), readMessage(), and writeMessage().

unsigned int ComsPlayedMoveMessage::weaponId_ [protected]

Definition at line 64 of file ComsPlayedMoveMessage.h.

Referenced by getWeaponId(), readMessage(), setShot(), and writeMessage().

MoveType ComsPlayedMoveMessage::moveType_ [protected]

Definition at line 65 of file ComsPlayedMoveMessage.h.

Referenced by getType(), readMessage(), and writeMessage().

fixed ComsPlayedMoveMessage::rotationXY_ [protected]

Definition at line 66 of file ComsPlayedMoveMessage.h.

Referenced by getRotationXY(), readMessage(), setShot(), and writeMessage().

fixed ComsPlayedMoveMessage::rotationYZ_ [protected]

Definition at line 67 of file ComsPlayedMoveMessage.h.

Referenced by getRotationYZ(), readMessage(), setShot(), and writeMessage().

fixed ComsPlayedMoveMessage::power_ [protected]

Definition at line 68 of file ComsPlayedMoveMessage.h.

Referenced by getPower(), readMessage(), setShot(), and writeMessage().

int ComsPlayedMoveMessage::selectPositionX_ [protected]

Definition at line 69 of file ComsPlayedMoveMessage.h.

Referenced by getSelectPositionX(), readMessage(), setShot(), and writeMessage().

int ComsPlayedMoveMessage::selectPositionY_ [protected]

Definition at line 70 of file ComsPlayedMoveMessage.h.

Referenced by getSelectPositionY(), readMessage(), setShot(), and writeMessage().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:01 2009 for Scorched3D by  doxygen 1.5.3