commandFactory.cpp

Go to the documentation of this file.
00001 /* 
00002  * File:   commandFactory.cpp
00003  * Author: chris
00004  * 
00005  * Created on September 16, 2013, 10:25 AM
00006  */
00007 
00008 #include "commandFactory.h"
00009 using namespace FastEcslent;
00010 
00011 //CommandFactory::CommandFactory() {
00012 //}
00013 
00014 CommandFactory::CommandFactory(const CommandFactory& orig) {
00015 }
00016 
00017 CommandFactory::~CommandFactory() {
00018 }
00019 
00020         std::deque<Command*>  BuildStructureFactory::MakeCommand(Entity* owner, std::pair<int, Ogre::Vector3 > mouseTargets) {
00021             std::deque<Command*> newCommands;
00022             Ogre::Vector3 movePosition;
00023             if(this->requiredTarget != TargetPosition)
00024                 movePosition = owner->engine->entityMgr->ents[mouseTargets.first]->pos;
00025             else
00026                 movePosition = mouseTargets.second;
00027             newCommands.push_back(createMoveForEnt(owner, movePosition - owner->builder->minBuildRadius));
00028             newCommands.push_back(new BuildCommand(owner, spawnEnt, FastEcslent::ConstructCommand));
00029             newCommands.push_back(createWaitForEnt(owner, 10.0));
00030             //createMoveForEnt(owner, mouseTargets.second); // move
00031             //new BuildCommand(owner, spawnEnt, FastEcslent::ConstructCommand); // Build
00032             //createWaitForEnt(owner, mouseTargets.second); //Wait
00033             //return new BuildCommand(owner, spawnEnt, FastEcslent::ConstructCommand);
00034             return newCommands;
00035         }

Generated on Fri Dec 13 14:54:17 2013 for FastECSLent by  doxygen 1.5.4