|
|
@ -189,7 +189,7 @@ void VirusAttack::InitializeLevelData(){ |
|
|
|
levelData[stage].worldZoom={1,1}; |
|
|
|
levelData[stage].worldZoom={1,1}; |
|
|
|
levelData[stage].size={36,36}; |
|
|
|
levelData[stage].size={36,36}; |
|
|
|
levelData[stage].levelColor=DARK_GREEN; |
|
|
|
levelData[stage].levelColor=DARK_GREEN; |
|
|
|
levelData[stage].bgm=Sound::GRAVITY; |
|
|
|
levelData[stage].bgm=Sound::COSMOS; |
|
|
|
levelData[stage].scenarioIndex=int(stage); |
|
|
|
levelData[stage].scenarioIndex=int(stage); |
|
|
|
levelData[stage].availableMemory=300; |
|
|
|
levelData[stage].availableMemory=300; |
|
|
|
levelData[stage].player_starting_resources={3,0,0,0,0}; |
|
|
|
levelData[stage].player_starting_resources={3,0,0,0,0}; |
|
|
@ -203,14 +203,184 @@ void VirusAttack::InitializeLevelData(){ |
|
|
|
units.push_back({UnitType::MemoryAllocator,vf2d{4*24,6*24},true}); |
|
|
|
units.push_back({UnitType::MemoryAllocator,vf2d{4*24,6*24},true}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{8*24,1*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{9*24,1*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{12*24,1*24},0,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{15*24,1*24},0,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,12*24},-PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,13*24},-PI/2,MemoryType::ATKSPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,17*24},-PI/2,MemoryType::MOVESPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,20*24},-PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
#pragma region Stage 5 |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//Stage 5 data.
|
|
|
|
|
|
|
|
LevelName stage=STAGE5; |
|
|
|
|
|
|
|
levelData[stage].name=stage; |
|
|
|
|
|
|
|
levelData[stage].cameraStart={96,96}; |
|
|
|
|
|
|
|
levelData[stage].worldZoom={1,1}; |
|
|
|
|
|
|
|
levelData[stage].size={48,48}; |
|
|
|
|
|
|
|
levelData[stage].levelColor=DARK_GREY; |
|
|
|
|
|
|
|
levelData[stage].bgm=Sound::BOSS1; |
|
|
|
|
|
|
|
levelData[stage].scenarioIndex=int(stage); |
|
|
|
|
|
|
|
levelData[stage].availableMemory=640; |
|
|
|
|
|
|
|
levelData[stage].player_starting_resources={5,5,5,5,5}; |
|
|
|
|
|
|
|
levelData[stage].enemy_starting_resources={5,5,5,5,5}; |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
std::vector<UnitData>&units=levelData[stage].unitPlacement; |
|
|
|
|
|
|
|
std::vector<CPData>&collectionPoints=levelData[stage].cpPlacement; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
units.push_back({UnitType::RAMBank,vf2d{4*24,4*24},true}); |
|
|
|
|
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
|
|
|
|
units.push_back({UnitType::MemoryAllocator,vf2d{4*24,6*24},true}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{8*24,1*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{10*24,1*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{32*24,12*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{20*24,32*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{9*24,1*24},0,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,7*24},-PI/2,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{16*24,16*24},0,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{36*24,1*24},-PI/2,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,3*24},-PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,6*24},-PI/2,MemoryType::ATKSPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,11*24},-PI/2,MemoryType::MOVESPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,22*24},-PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{6*24,16*24},-PI/2,MemoryType::ATKSPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,32*24},-PI/2,MemoryType::MOVESPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-4)*24},PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-7)*24},PI/2,MemoryType::ATKSPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-12)*24},PI/2,MemoryType::MOVESPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-23)*24},PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-6)*24,(48-17)*24},PI/2,MemoryType::ATKSPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-33)*24},PI/2,MemoryType::MOVESPD}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-8)*24,(48-2)*24},PI,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-10)*24,(48-2)*24},PI,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-32)*24,(48-13)*24},PI,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-20)*24,(48-33)*24},PI,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-9)*24,(48-2)*24},PI,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-8)*24},PI/2,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-16)*24,(48-17)*24},PI,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-36)*24,(48-2)*24},PI/2,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
|
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
units.push_back({UnitType::MemoryAllocator,vf2d{4*24,30*24},false}); |
|
|
|
units.push_back({UnitType::MemoryAllocator,vf2d{44*24,44*24},false}); |
|
|
|
} |
|
|
|
} |
|
|
|
units.push_back({UnitType::RAMBank,vf2d{4*24,32*24},false}); |
|
|
|
units.push_back({UnitType::Turret,vf2d{42*24,42*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::LeftShifter,vf2d{42*24,44*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::LeftShifter,vf2d{42*24,44*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::Corrupter,vf2d{42*24,44*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::RightShifter,vf2d{42*24,44*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::RightShifter,vf2d{45*24,41*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::RAMBank,vf2d{44*24,44*24},false}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#pragma endregion |
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
#pragma region Stage 6 |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//Stage 6 data.
|
|
|
|
|
|
|
|
LevelName stage=STAGE6; |
|
|
|
|
|
|
|
levelData[stage].name=stage; |
|
|
|
|
|
|
|
levelData[stage].cameraStart={96,96}; |
|
|
|
|
|
|
|
levelData[stage].worldZoom={1,1}; |
|
|
|
|
|
|
|
levelData[stage].size={48,48}; |
|
|
|
|
|
|
|
levelData[stage].levelColor=DARK_GREY; |
|
|
|
|
|
|
|
levelData[stage].bgm=Sound::BOSS1; |
|
|
|
|
|
|
|
levelData[stage].scenarioIndex=int(stage); |
|
|
|
|
|
|
|
levelData[stage].availableMemory=640; |
|
|
|
|
|
|
|
levelData[stage].player_starting_resources={5,5,5,5,5}; |
|
|
|
|
|
|
|
levelData[stage].enemy_starting_resources={5,5,5,5,5}; |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
std::vector<UnitData>&units=levelData[stage].unitPlacement; |
|
|
|
|
|
|
|
std::vector<CPData>&collectionPoints=levelData[stage].cpPlacement; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
units.push_back({UnitType::RAMBank,vf2d{4*24,4*24},true}); |
|
|
|
|
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
|
|
|
|
units.push_back({UnitType::MemoryAllocator,vf2d{4*24,6*24},true}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<vf2d>positions={ |
|
|
|
|
|
|
|
{{8,1},{10,1},{32,12},{20,32},{9,1},{1,7},{16,16} |
|
|
|
|
|
|
|
,{36,1},{1,3},{1,6},{1,11},{1,22},{6,16},{1,32}} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
std::vector<MemoryType>types={ |
|
|
|
|
|
|
|
{MemoryType::HEALTH,MemoryType::HEALTH,MemoryType::HEALTH,MemoryType::HEALTH,MemoryType::PROCEDURE, |
|
|
|
|
|
|
|
MemoryType::PROCEDURE,MemoryType::PROCEDURE,MemoryType::PROCEDURE,MemoryType::RANGE, |
|
|
|
|
|
|
|
MemoryType::ATKSPD,MemoryType::MOVESPD,MemoryType::RANGE,MemoryType::ATKSPD,MemoryType::MOVESPD,} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
if(positions.size()!=types.size()){ |
|
|
|
|
|
|
|
throw; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
while(positions.size()>0){ |
|
|
|
|
|
|
|
int randomIndex=rand()%positions.size(); |
|
|
|
|
|
|
|
int randomIndex2=rand()%types.size(); |
|
|
|
|
|
|
|
float finalDir=0; |
|
|
|
|
|
|
|
if(positions[randomIndex].x<levelData[stage].size.x/2){ |
|
|
|
|
|
|
|
if(positions[randomIndex].y<positions[randomIndex].x){ |
|
|
|
|
|
|
|
finalDir=0; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
finalDir=-PI/2; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else{ |
|
|
|
|
|
|
|
if(positions[randomIndex].y>positions[randomIndex].x){ |
|
|
|
|
|
|
|
finalDir=PI; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
finalDir=PI/2; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{positions[randomIndex]*24,finalDir,types[randomIndex2]}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{(levelData[stage].size-positions[randomIndex]-vf2d{1,1})*24,float(finalDir+PI),types[randomIndex2]}); |
|
|
|
|
|
|
|
positions.erase(positions.begin()+randomIndex); |
|
|
|
|
|
|
|
types.erase(types.begin()+randomIndex2); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{8*24,1*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{10*24,1*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{32*24,12*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{20*24,32*24},0,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{9*24,1*24},0,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,7*24},-PI/2,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{16*24,16*24},0,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{36*24,1*24},-PI/2,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,3*24},-PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,6*24},-PI/2,MemoryType::ATKSPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,11*24},-PI/2,MemoryType::MOVESPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,22*24},-PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{6*24,16*24},-PI/2,MemoryType::ATKSPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{1*24,32*24},-PI/2,MemoryType::MOVESPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-4)*24},PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-7)*24},PI/2,MemoryType::ATKSPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-12)*24},PI/2,MemoryType::MOVESPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-23)*24},PI/2,MemoryType::RANGE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-6)*24,(48-17)*24},PI/2,MemoryType::ATKSPD}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-33)*24},PI/2,MemoryType::MOVESPD}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-8)*24,(48-2)*24},PI,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-10)*24,(48-2)*24},PI,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-32)*24,(48-13)*24},PI,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-20)*24,(48-33)*24},PI,MemoryType::HEALTH}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-9)*24,(48-2)*24},PI,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-1)*24,(48-8)*24},PI/2,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-16)*24,(48-17)*24},PI,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
collectionPoints.push_back(CPData{{(48-36)*24,(48-2)*24},PI/2,MemoryType::PROCEDURE}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
|
|
|
|
units.push_back({UnitType::MemoryAllocator,vf2d{44*24,44*24},false}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
units.push_back({UnitType::Turret,vf2d{42*24,42*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::LeftShifter,vf2d{42*24,44*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::LeftShifter,vf2d{42*24,44*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::Corrupter,vf2d{42*24,44*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::RightShifter,vf2d{42*24,44*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::RightShifter,vf2d{45*24,41*24},false}); |
|
|
|
|
|
|
|
units.push_back({UnitType::RAMBank,vf2d{44*24,44*24},false}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#pragma endregion |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool VirusAttack::OnUserCreate(){ |
|
|
|
bool VirusAttack::OnUserCreate(){ |
|
|
@ -241,7 +411,8 @@ bool VirusAttack::OnUserCreate(){ |
|
|
|
InitializeScenarios(); |
|
|
|
InitializeScenarios(); |
|
|
|
InitializeLevelData(); |
|
|
|
InitializeLevelData(); |
|
|
|
|
|
|
|
|
|
|
|
LoadLevel(STAGE1); |
|
|
|
LoadLevel(STAGE5); |
|
|
|
|
|
|
|
levelToLoad=STAGE5; |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -384,6 +555,7 @@ void VirusAttack::InitializeSounds(){ |
|
|
|
LoadSound(Sound::DEAD1,"dead1.mp3"); |
|
|
|
LoadSound(Sound::DEAD1,"dead1.mp3"); |
|
|
|
LoadSound(Sound::DEAD2,"dead2.mp3"); |
|
|
|
LoadSound(Sound::DEAD2,"dead2.mp3"); |
|
|
|
LoadSound(Sound::DEAD3,"dead3.mp3"); |
|
|
|
LoadSound(Sound::DEAD3,"dead3.mp3"); |
|
|
|
|
|
|
|
LoadSound(Sound::WIND,"wind.mp3"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool VirusAttack::UnitCreationClickHandled(){ |
|
|
|
bool VirusAttack::UnitCreationClickHandled(){ |
|
|
@ -561,6 +733,18 @@ void VirusAttack::HandleRightClickMove(){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void VirusAttack::CollisionChecking(std::shared_ptr<Unit>u,std::shared_ptr<Unit>u2){ |
|
|
|
void VirusAttack::CollisionChecking(std::shared_ptr<Unit>u,std::shared_ptr<Unit>u2){ |
|
|
|
|
|
|
|
if(u->GetPos().x<0){ |
|
|
|
|
|
|
|
u->SetPos({0,u->GetPos().y}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(u->GetPos().x>WORLD_SIZE.x*CONSTANT::TILE_SIZE.x){ |
|
|
|
|
|
|
|
u->SetPos({float(WORLD_SIZE.x*CONSTANT::TILE_SIZE.x),u->GetPos().y}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(u->GetPos().y<0){ |
|
|
|
|
|
|
|
u->SetPos({u->GetPos().y,0}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(u->GetPos().y>WORLD_SIZE.y*CONSTANT::TILE_SIZE.y){ |
|
|
|
|
|
|
|
u->SetPos({u->GetPos().x,float(WORLD_SIZE.y*CONSTANT::TILE_SIZE.y)}); |
|
|
|
|
|
|
|
} |
|
|
|
if(u!=u2&&geom2d::overlaps(geom2d::circle<float>(u->GetPos(),u->GetUnitSize().x/2),geom2d::circle<float>(u2->GetPos(),u2->GetUnitSize().x/2))){ |
|
|
|
if(u!=u2&&geom2d::overlaps(geom2d::circle<float>(u->GetPos(),u->GetUnitSize().x/2),geom2d::circle<float>(u2->GetPos(),u2->GetUnitSize().x/2))){ |
|
|
|
geom2d::line<float>collisionLine(u->GetPos(),u2->GetPos()+vf2d{0.001,0.001}); |
|
|
|
geom2d::line<float>collisionLine(u->GetPos(),u2->GetPos()+vf2d{0.001,0.001}); |
|
|
|
float maxDist=u->GetUnitSize().x/2+u2->GetUnitSize().x/2; |
|
|
|
float maxDist=u->GetUnitSize().x/2+u2->GetUnitSize().x/2; |
|
|
@ -928,7 +1112,7 @@ bool VirusAttack::OnUserUpdate(float fElapsedTime){ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
u->AttemptAttack(u,closestUnit,units,debuffIcons,IMAGES,SOUNDS); |
|
|
|
u->AttemptAttack(u,closestUnit,units,debuffIcons,IMAGES,SOUNDS); |
|
|
|
u->_Update(this,SOUNDS,player_resources,enemy_resources,queuedUnits,resourceGainTimer,resourceGainIcons,IMAGES); |
|
|
|
u->_Update(this,SOUNDS,player_resources,enemy_resources,queuedUnits,resourceGainTimer,resourceGainIcons,IMAGES,flags); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::erase_if(units,[&](std::shared_ptr<Unit>u){ |
|
|
|
std::erase_if(units,[&](std::shared_ptr<Unit>u){ |
|
|
|