00001
00002
00003
00004
00005
00006
00007 #include <ent.h>
00008 #include <buildings.h>
00009 #include <unitBuilder.h>
00010
00011 namespace FastEcslent {
00012
00013 Builder::Builder(Building *building, UnitAspectType aspectType, EntityType entType): UnitAspect(dynamic_cast<Entity *>(building), aspectType){
00014 this->timeNeeded = 600.0;
00015 this->timeLeft = -1.0;
00016 this->building = building;
00017 this->entityType = entType;
00018
00019 }
00020
00021 Builder::~Builder(){
00022
00023 }
00024
00025
00026 void Builder::init(){
00027
00028
00029 }
00030
00031 void startBuildingNextEntity(){
00032
00033 }
00034
00035 void Builder::tick(double dt) {
00036 if (!this->building->entityQueue.empty()){
00037
00038 if (this->timeLeft < 0) {
00039
00040 this->building->entityQueue.pop_front();
00041
00042
00043
00044
00045
00046 }
00047 }
00048
00049
00050
00051
00052 }
00053
00054
00055
00056
00057 }