FastEcslent::Builder Class Reference

#include <unitBuilder.h>

Inheritance diagram for FastEcslent::Builder:

FastEcslent::UnitAspect FastEcslent::UnitAspect FastEcslent::UnitAspect FastEcslent::UnitAspect FastEcslent::UnitAspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect FastEcslent::Aspect

List of all members.

Public Member Functions

 Builder (Entity *ent, UnitAspectType ast, Ogre::Vector3 minBuildRadius=Ogre::Vector3(0, 0, 0), Ogre::Vector3 maxBuildRadius=Ogre::Vector3(0, 0, 0))
 ~Builder ()
virtual void init ()
virtual void tick (double dt)
void startBuildingNextEntity ()
Ogre::Vector3 selectRandPosInRadius (int attempts)
bool enqueue (EntityType entityType)
bool removeAtIndex (unsigned int pos)
bool removeTail (void)
bool cancelEntityBeingBuilt ()
 Builder (Building *ent, UnitAspectType ast, EntityType entType)
 ~Builder ()
virtual void init ()
virtual void tick (double dt)
void startBuildingNextEntity ()
 Builder (Building *ent, UnitAspectType ast, EntityType entType)
 ~Builder ()
virtual void init ()
virtual void tick (double dt)
void startBuildingNextEntity ()
 Builder (Building *ent, UnitAspectType ast, EntityType entType)
 ~Builder ()
virtual void init ()
virtual void tick (double dt)
void startBuildingNextEntity ()
 Builder (Building *ent, UnitAspectType ast, EntityType entType)
 ~Builder ()
virtual void init ()
virtual void tick (double dt)
void startBuildingNextEntity ()

Public Attributes

Ogre::Vector3 minBuildRadius
Ogre::Vector3 maxBuildRadius
std::deque< EntityTypeentityQueue
EntityentityBeingBuilt
bool waitNetworkResponse
double timeLeft
double timeNeeded
Buildingbuilding
EntityType entityType
Buildingbuilding
Buildingbuilding
Buildingbuilding

Static Private Attributes

static const int MAX_QUEUE = 5


Detailed Description

Definition at line 18 of file unitBuilder.h.


Constructor & Destructor Documentation

FastEcslent::Builder::Builder ( Entity ent,
UnitAspectType  ast,
Ogre::Vector3  minBuildRadius = Ogre::Vector3(0,0,0),
Ogre::Vector3  maxBuildRadius = Ogre::Vector3(0,0,0) 
)

Definition at line 16 of file unitBuilder.cpp.

FastEcslent::Builder::~Builder (  ) 

Definition at line 28 of file unitBuilder.cpp.

FastEcslent::Builder::Builder ( Building ent,
UnitAspectType  ast,
EntityType  entType 
)

Definition at line 13 of file unitBuilder.cpp.

References entityType, timeLeft, and timeNeeded.

FastEcslent::Builder::~Builder (  ) 

FastEcslent::Builder::Builder ( Building ent,
UnitAspectType  ast,
EntityType  entType 
)

FastEcslent::Builder::~Builder (  ) 

FastEcslent::Builder::Builder ( Building ent,
UnitAspectType  ast,
EntityType  entType 
)

FastEcslent::Builder::~Builder (  ) 

FastEcslent::Builder::Builder ( Building ent,
UnitAspectType  ast,
EntityType  entType 
)

FastEcslent::Builder::~Builder (  ) 


Member Function Documentation

void FastEcslent::Builder::init ( void   )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

Definition at line 32 of file unitBuilder.cpp.

Referenced by FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::Factory::Factory(), and FastEcslent::SCVehicle::init().

void FastEcslent::Builder::tick ( double  dt  )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

Definition at line 72 of file unitBuilder.cpp.

References entityBeingBuilt, entityQueue, startBuildingNextEntity(), and waitNetworkResponse.

void FastEcslent::Builder::startBuildingNextEntity (  ) 

Definition at line 56 of file unitBuilder.cpp.

References FastEcslent::NetThread::createEntFromClientReq(), FastEcslent::EntityMgr::createEntityForPlayerAndSide(), FastEcslent::Entity::engine, FastEcslent::UnitAspect::entity, entityBeingBuilt, FastEcslent::Entity::entityId, FastEcslent::Engine::entityMgr, FastEcslent::Engine::net, FastEcslent::Identity::player, selectRandPosInRadius(), FastEcslent::Identity::side, and waitNetworkResponse.

Referenced by tick().

Ogre::Vector3 FastEcslent::Builder::selectRandPosInRadius ( int  attempts  ) 

Definition at line 37 of file unitBuilder.cpp.

References FastEcslent::Engine::distanceMgr, FastEcslent::Entity::engine, FastEcslent::UnitAspect::entity, maxBuildRadius, minBuildRadius, FastEcslent::Entity::pos, and FastEcslent::DistanceMgr::wouldCollide().

Referenced by startBuildingNextEntity().

bool FastEcslent::Builder::enqueue ( EntityType  entityType  ) 

Definition at line 102 of file unitBuilder.cpp.

References FastEcslent::GameMgr::consumeResources(), FastEcslent::Entity::engine, FastEcslent::UnitAspect::entity, entityQueue, FastEcslent::Engine::gameMgr, and MAX_QUEUE.

Referenced by FastEcslent::BuildCommand::init().

bool FastEcslent::Builder::removeAtIndex ( unsigned int  pos  ) 

Definition at line 119 of file unitBuilder.cpp.

References entityQueue.

bool FastEcslent::Builder::removeTail ( void   ) 

Definition at line 128 of file unitBuilder.cpp.

References entityQueue.

bool FastEcslent::Builder::cancelEntityBeingBuilt (  ) 

Definition at line 115 of file unitBuilder.cpp.

References FastEcslent::EntityMgr::cancelGestatingEntity(), FastEcslent::Entity::engine, FastEcslent::UnitAspect::entity, and FastEcslent::Engine::entityMgr.

virtual void FastEcslent::Builder::init (  )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

virtual void FastEcslent::Builder::tick ( double  dt  )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

void FastEcslent::Builder::startBuildingNextEntity (  ) 

virtual void FastEcslent::Builder::init (  )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

virtual void FastEcslent::Builder::tick ( double  dt  )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

void FastEcslent::Builder::startBuildingNextEntity (  ) 

virtual void FastEcslent::Builder::init (  )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

virtual void FastEcslent::Builder::tick ( double  dt  )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

void FastEcslent::Builder::startBuildingNextEntity (  ) 

virtual void FastEcslent::Builder::init (  )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

virtual void FastEcslent::Builder::tick ( double  dt  )  [virtual]

Reimplemented from FastEcslent::UnitAspect.

void FastEcslent::Builder::startBuildingNextEntity (  ) 


Member Data Documentation

const int FastEcslent::Builder::MAX_QUEUE = 5 [static, private]

Definition at line 20 of file unitBuilder.h.

Referenced by enqueue().

Ogre::Vector3 FastEcslent::Builder::minBuildRadius

Definition at line 28 of file unitBuilder.h.

Referenced by FastEcslent::BuildStructureFactory::MakeCommand(), and selectRandPosInRadius().

Ogre::Vector3 FastEcslent::Builder::maxBuildRadius

Definition at line 29 of file unitBuilder.h.

Referenced by selectRandPosInRadius().

std::deque<EntityType> FastEcslent::Builder::entityQueue

Definition at line 31 of file unitBuilder.h.

Referenced by enqueue(), removeAtIndex(), removeTail(), and tick().

Entity* FastEcslent::Builder::entityBeingBuilt

Queue of entities to build

Definition at line 34 of file unitBuilder.h.

Referenced by FastEcslent::NetAspect::setEntityBeingBuilt(), startBuildingNextEntity(), and tick().

bool FastEcslent::Builder::waitNetworkResponse

Pointer to the current entity being build

Definition at line 35 of file unitBuilder.h.

Referenced by FastEcslent::NetAspect::setEntityBeingBuilt(), startBuildingNextEntity(), and tick().

double FastEcslent::Builder::timeLeft

Definition at line 22 of file unitBuilder.h.

Referenced by Builder().

double FastEcslent::Builder::timeNeeded

Definition at line 23 of file unitBuilder.h.

Referenced by Builder().

Building* FastEcslent::Builder::building

Definition at line 24 of file unitBuilder.h.

EntityType FastEcslent::Builder::entityType

Definition at line 25 of file unitBuilder.h.

Referenced by Builder().

Building* FastEcslent::Builder::building

Definition at line 24 of file unitBuilder.h.

Building* FastEcslent::Builder::building

Definition at line 24 of file unitBuilder.h.

Building* FastEcslent::Builder::building

Definition at line 24 of file unitBuilder.h.


The documentation for this class was generated from the following files:
Generated on Fri Dec 13 14:54:21 2013 for FastECSLent by  doxygen 1.5.4