-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
64 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_ADVPowerPlants_HPP | ||
#define PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_ADVPowerPlants_HPP | ||
|
||
|
||
#include "Structure.hpp" | ||
class ADVPowerPlants:public Structure{ | ||
class ADVPowerPlants : public Structure { | ||
public: | ||
ADVPowerPlants(float electricPower=200.F,float buildingTime=25.F, | ||
float buildingCost=500.F,float buildingHp=700.F): Structure(electricPower, buildingTime, buildingCost, buildingHp){ | ||
SetDrawable(std::make_unique<Util::Image>("../assets/sprites/PowerPlants.png")); | ||
}; | ||
ADVPowerPlants(float electricPower = 200.F, float buildingTime = 25.F, | ||
float buildingCost = 500.F, float buildingHp = 700.F) | ||
: Structure(electricPower, buildingTime, buildingCost, buildingHp, | ||
unitType::ADV_POWER_PLANT) { | ||
SetDrawable( | ||
std::make_unique<Util::Image>("../assets/sprites/PowerPlants.png")); | ||
}; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,37 @@ | ||
#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_BARRACKS_HPP | ||
#define PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_BARRACKS_HPP | ||
|
||
#include "Grid.hpp" | ||
#include "HighLight.h" | ||
#include "Line.hpp" | ||
#include "Structure/IWayPointStructure.hpp" | ||
#include "Structure/MousOverlapTool.h" | ||
#include "Structure/Structure.hpp" | ||
#include "Util/Image.hpp" | ||
#include "Util/Keycode.hpp" | ||
#include "Util/Input.hpp" | ||
#include "Util/Keycode.hpp" | ||
#include "WayPoint.hpp" | ||
#include "HighLight.h" | ||
#include "Line.hpp" | ||
#include "Grid.hpp" | ||
|
||
class Barracks : public Structure,public IWayPointStructure{ | ||
class Barracks : public Structure, public IWayPointStructure { | ||
private: | ||
std::shared_ptr<WayPoint> m_wayPoint = std::make_shared<WayPoint>(); | ||
HighLight m_HighLight; | ||
Grid m_Grid; | ||
Line m_Line; | ||
std::vector<Line> m_lineVector; | ||
|
||
public: | ||
Barracks(float electricPower=-20.F,float buildingTime= 15.F, | ||
float buildingCost=300.F,float buildingHp=800.F): | ||
Structure(electricPower, buildingTime, buildingCost, buildingHp){}; | ||
void Start()override; | ||
Barracks(float electricPower = -20.F, float buildingTime = 15.F, | ||
float buildingCost = 300.F, float buildingHp = 800.F) | ||
: Structure(electricPower, buildingTime, buildingCost, buildingHp, | ||
unitType::BARRACKS){}; | ||
void Start() override; | ||
|
||
virtual void onSelected(bool selected)override; | ||
virtual void SetAttachVisible(bool visible)override; | ||
virtual void onSelected(bool selected) override; | ||
virtual void SetAttachVisible(bool visible) override; | ||
|
||
virtual void updateMoveable()override; | ||
virtual void attachmentUpdate()override; | ||
virtual void updateMoveable() override; | ||
virtual void attachmentUpdate() override; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,36 @@ | ||
#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_OreRefinery_HPP | ||
#define PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_OreRefinery_HPP | ||
|
||
#include "Grid.hpp" | ||
#include "HighLight.h" | ||
#include "Line.hpp" | ||
#include "Structure/IWayPointStructure.hpp" | ||
#include "Structure/Structure.hpp" | ||
#include "Util/Image.hpp" | ||
#include "Util/Keycode.hpp" | ||
#include "Util/Input.hpp" | ||
#include "Util/Keycode.hpp" | ||
#include "WayPoint.hpp" | ||
#include "HighLight.h" | ||
#include "Line.hpp" | ||
#include "Grid.hpp" | ||
|
||
class OreRefinery:public Structure,public IWayPointStructure{ | ||
class OreRefinery : public Structure, public IWayPointStructure { | ||
private: | ||
std::shared_ptr<WayPoint> m_wayPoint = std::make_shared<WayPoint>(); | ||
HighLight m_HighLight; | ||
bool b_select= true; | ||
bool b_select = true; | ||
Grid m_Grid; | ||
Line m_Line; | ||
std::vector<Line> m_lineVector; | ||
|
||
public: | ||
OreRefinery(float electricPower=-30.F,float buildingTime=100.F, | ||
float buildingCost=2000.F,float buildingHp=900.F): | ||
Structure(electricPower, buildingTime, buildingCost, buildingHp){}; | ||
OreRefinery(float electricPower = -30.F, float buildingTime = 100.F, | ||
float buildingCost = 2000.F, float buildingHp = 900.F) | ||
: Structure(electricPower, buildingTime, buildingCost, buildingHp, | ||
unitType::ORE_REF){}; | ||
void Start() override; | ||
|
||
virtual void onSelected(bool selected)override; | ||
virtual void SetAttachVisible(bool visible)override; | ||
virtual void onSelected(bool selected) override; | ||
virtual void SetAttachVisible(bool visible) override; | ||
|
||
virtual void updateMoveable()override; | ||
virtual void attachmentUpdate()override; | ||
virtual void updateMoveable() override; | ||
virtual void attachmentUpdate() override; | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_PowerPlants_HPP | ||
#define PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_PowerPlants_HPP | ||
|
||
|
||
#include "Structure.hpp" | ||
class PowerPlants:public Structure{ | ||
class PowerPlants : public Structure { | ||
public: | ||
PowerPlants(float electricPower=100.F,float buildingTime=15.F, | ||
float buildingCost=300.F,float buildingHp=400.F): Structure(electricPower, buildingTime, buildingCost, buildingHp){ | ||
SetDrawable(std::make_unique<Util::Image>("../assets/sprites/PowerPlants.png")); | ||
}; | ||
PowerPlants(float electricPower = 100.F, float buildingTime = 15.F, | ||
float buildingCost = 300.F, float buildingHp = 400.F) | ||
: Structure(electricPower, buildingTime, buildingCost, buildingHp, | ||
unitType::POWER_PLANT) { | ||
SetDrawable( | ||
std::make_unique<Util::Image>("../assets/sprites/PowerPlants.png")); | ||
}; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters