-
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
19 changed files
with
178 additions
and
329 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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Created by 盧威任 on 3/26/24. | ||
// | ||
|
||
#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_SELECTABLE_HPP | ||
#define PRACTICALTOOLSFORSIMPLEDESIGN_SELECTABLE_HPP | ||
class Selectable { | ||
public: | ||
virtual void onSelected() = 0; | ||
bool getSelected() { return b_Selected; } | ||
void setSelected(bool value) { b_Selected = value; } | ||
|
||
private: | ||
bool b_Selected; | ||
}; | ||
#endif // PRACTICALTOOLSFORSIMPLEDESIGN_SELECTABLE_HPP |
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,40 +1,17 @@ | ||
#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_BARRACKS_HPP | ||
#define PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_BARRACKS_HPP | ||
|
||
#include "Grid.hpp" | ||
#include "HighLight.h" | ||
#include "Line.hpp" | ||
#include "Map.hpp" | ||
#include "Structure/IWayPointStructure.hpp" | ||
#include "Structure/MouseOverlapTool.h" | ||
#include "Structure/Structure.hpp" | ||
#include "Util/Image.hpp" | ||
#include "Util/Input.hpp" | ||
#include "Util/Keycode.hpp" | ||
#include "WayPoint.hpp" | ||
|
||
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; | ||
#include "WayPointStructure.hpp" | ||
|
||
class Barracks : public WayPointStructure { | ||
public: | ||
Barracks(float electricPower = -20.F, float buildingTime = 1.F, | ||
float buildingCost = 300.F, float buildingHp = 800.F, | ||
HouseType house = HouseType::NONE) | ||
|
||
: Structure(electricPower, buildingTime, buildingCost, buildingHp, | ||
GameObjectID(unitType::BARRACKS, house)){}; | ||
: WayPointStructure(electricPower, buildingTime, buildingCost, | ||
buildingHp, | ||
GameObjectID(unitType::BARRACKS, house)){}; | ||
void Start() override; | ||
|
||
virtual void onSelected(bool selected) override; | ||
virtual void SetAttachVisible(bool visible) 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
This file was deleted.
Oops, something went wrong.
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,37 +1,15 @@ | ||
#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/Input.hpp" | ||
#include "Util/Keycode.hpp" | ||
#include "WayPoint.hpp" | ||
|
||
class OreRefinery : public Structure, public IWayPointStructure { | ||
private: | ||
std::shared_ptr<WayPoint> m_wayPoint = std::make_shared<WayPoint>(); | ||
HighLight m_HighLight; | ||
bool b_select = true; | ||
Grid m_Grid; | ||
Line m_Line; | ||
std::vector<Line> m_lineVector; | ||
#include "WayPointStructure.hpp" | ||
class OreRefinery : public WayPointStructure { | ||
|
||
public: | ||
OreRefinery(float electricPower = -30.F, float buildingTime = 100.F, | ||
float buildingCost = 2000.F, float buildingHp = 900.F, | ||
HouseType house = HouseType::NONE) | ||
: Structure(electricPower, buildingTime, buildingCost, buildingHp, | ||
GameObjectID(unitType::ORE_REF, house)){}; | ||
: WayPointStructure(electricPower, buildingTime, buildingCost, | ||
buildingHp, | ||
GameObjectID(unitType::ORE_REF, house)){}; | ||
void Start() override; | ||
|
||
virtual void onSelected(bool selected) override; | ||
virtual void SetAttachVisible(bool visible) 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
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,38 +1,17 @@ | ||
#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_WarFactory_HPP | ||
#define PRACTICALTOOLSFORSIMPLEDESIGN_STRUCTURE_WarFactory_HPP | ||
|
||
#include "GameObjectID.hpp" | ||
#include "Grid.hpp" | ||
#include "HighLight.h" | ||
#include "Line.hpp" | ||
#include "Structure/IWayPointStructure.hpp" | ||
#include "Structure/Structure.hpp" | ||
#include "Util/Image.hpp" | ||
#include "Util/Input.hpp" | ||
#include "Util/Keycode.hpp" | ||
#include "WayPoint.hpp" | ||
|
||
class WarFactory : 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; | ||
#include "WayPointStructure.hpp" | ||
class WarFactory : public WayPointStructure { | ||
|
||
public: | ||
WarFactory(float electricPower = -30.F, float buildingTime = 100.F, | ||
float buildingCost = 2000.F, float buildingHp = 1000.F, | ||
HouseType house = HouseType::NONE) | ||
: Structure(electricPower, buildingTime, buildingCost, buildingHp, | ||
GameObjectID(unitType::WAR_FACT, house)){}; | ||
: WayPointStructure(electricPower, buildingTime, buildingCost, | ||
buildingHp, | ||
GameObjectID(unitType::WAR_FACT, house)){}; | ||
void Start() override; | ||
|
||
virtual void onSelected(bool selected) override; | ||
virtual void SetAttachVisible(bool visible) 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// Created by 盧威任 on 3/26/24. | ||
// | ||
|
||
#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_MOVEABLESTRUCTURE_HPP | ||
#define PRACTICALTOOLSFORSIMPLEDESIGN_MOVEABLESTRUCTURE_HPP | ||
#include "Grid.hpp" | ||
#include "HighLight.h" | ||
#include "Line.hpp" | ||
#include "Structure/IWayPointStructure.hpp" | ||
#include "Structure/Structure.hpp" | ||
#include "Util/Image.hpp" | ||
#include "Util/Input.hpp" | ||
#include "Util/Keycode.hpp" | ||
#include "WayPoint.hpp" | ||
|
||
class WayPointStructure : public Structure, public IWayPointStructure { | ||
protected: | ||
std::shared_ptr<WayPoint> m_wayPoint = std::make_shared<WayPoint>(); | ||
HighLight m_HighLight; | ||
bool b_select = true; | ||
Grid m_Grid; | ||
Line m_Line; | ||
std::vector<Line> m_lineVector; | ||
|
||
public: | ||
WayPointStructure(float electricPower = -10.F, float buildingTime = 10.F, | ||
float buildingCost = 20.F, float buildingHp = 90.F, | ||
GameObjectID id = GameObjectID(unitType::null, | ||
HouseType::NONE)) | ||
: Structure(electricPower, buildingTime, buildingCost, buildingHp, | ||
id){}; | ||
virtual ~WayPointStructure(){}; | ||
|
||
virtual void onSelected() override; | ||
virtual void SetAttachVisible(bool visible) override; | ||
|
||
virtual void updateMoveable() override; | ||
virtual void attachmentUpdate() override; | ||
}; | ||
#endif // PRACTICALTOOLSFORSIMPLEDESIGN_MOVEABLESTRUCTURE_HPP |
Oops, something went wrong.