parent
64f6b44994
commit
7fd6cf677e
@ -0,0 +1,8 @@ |
||||
#pragma once |
||||
|
||||
struct GameFlags{ |
||||
bool unitMetersGreyedOut=true;//If true, all but health meters show up as dark grey.
|
||||
bool playerInControl=false; |
||||
bool limitedBuildOptions=false; |
||||
bool guideEnabled=true; |
||||
}; |
@ -0,0 +1,7 @@ |
||||
#pragma once |
||||
#include "MemoryType.h" |
||||
|
||||
struct Memory{ |
||||
MemoryType type; |
||||
int size; |
||||
}; |
@ -1,76 +1,105 @@ |
||||
#pragma once |
||||
#include "olcUTIL_Camera2D.h" |
||||
#include "Textbox.h" |
||||
#include "Unit.h" |
||||
#include "olcPGEX_AudioSource.h" |
||||
#include "olcPGEX_TransformedView.h" |
||||
#include "GameFlags.h" |
||||
#include "Level.h" |
||||
|
||||
class Scenario{ |
||||
public: |
||||
Scenario(); |
||||
Scenario(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_ptr<Renderable>>&IMAGES,std::vector<std::unique_ptr<Audio>>&SOUNDS,std::string&objective,TileTransformedView&game,GameFlags&flags); |
||||
virtual~Scenario(); |
||||
void _Start(); |
||||
void Draw(); |
||||
virtual void Start(); |
||||
void _Update(); |
||||
bool transitionToNextLevel=false; |
||||
LevelName nextLevel=LevelName::STAGE1; |
||||
protected: |
||||
void DisplayBox(std::string text,bool scaryHoodedFigure=false); |
||||
void SetCameraTarget(vf2d pos); |
||||
void SetObjective(std::string objective); |
||||
virtual bool MissionCompleted(); |
||||
virtual void Update(); |
||||
int state=0; |
||||
utils::Camera2D camera; |
||||
vf2d targetPos; |
||||
Textbox box; |
||||
float initialWaitTime=3; |
||||
bool missionCompleted=false; |
||||
float missionFinishWaitTime=3; |
||||
float missionCompletedTimer=0; |
||||
std::vector<std::shared_ptr<Unit>>&units; |
||||
std::vector<std::unique_ptr<Renderable>>&IMAGES; |
||||
std::vector<std::unique_ptr<Audio>>&SOUNDS; |
||||
GameFlags&flags; |
||||
std::string&objective; |
||||
TileTransformedView&game; |
||||
}; |
||||
|
||||
class Stage1:public Scenario{ |
||||
public: |
||||
Stage1(); |
||||
Stage1(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_ptr<Renderable>>&IMAGES,std::vector<std::unique_ptr<Audio>>&SOUNDS,std::string&objective,TileTransformedView&game,GameFlags&flags); |
||||
protected: |
||||
void Start(); |
||||
void Update(); |
||||
bool MissionCompleted(); |
||||
}; |
||||
class Stage2:public Scenario{ |
||||
public: |
||||
Stage2(); |
||||
Stage2(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_ptr<Renderable>>&IMAGES,std::vector<std::unique_ptr<Audio>>&SOUNDS,std::string&objective,TileTransformedView&game,GameFlags&flags); |
||||
protected: |
||||
void Start(); |
||||
void Update(); |
||||
bool MissionCompleted(); |
||||
}; |
||||
class Stage3:public Scenario{ |
||||
public: |
||||
Stage3(); |
||||
Stage3(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_ptr<Renderable>>&IMAGES,std::vector<std::unique_ptr<Audio>>&SOUNDS,std::string&objective,TileTransformedView&game,GameFlags&flags); |
||||
protected: |
||||
void Start(); |
||||
void Update(); |
||||
bool MissionCompleted(); |
||||
}; |
||||
class Stage4:public Scenario{ |
||||
public: |
||||
Stage4(); |
||||
Stage4(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_ptr<Renderable>>&IMAGES,std::vector<std::unique_ptr<Audio>>&SOUNDS,std::string&objective,TileTransformedView&game,GameFlags&flags); |
||||
protected: |
||||
void Start(); |
||||
void Update(); |
||||
bool MissionCompleted(); |
||||
}; |
||||
class Stage5:public Scenario{ |
||||
public: |
||||
Stage5(); |
||||
Stage5(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_ptr<Renderable>>&IMAGES,std::vector<std::unique_ptr<Audio>>&SOUNDS,std::string&objective,TileTransformedView&game,GameFlags&flags); |
||||
protected: |
||||
void Start(); |
||||
void Update(); |
||||
bool MissionCompleted(); |
||||
}; |
||||
class Stage6:public Scenario{ |
||||
public: |
||||
Stage6(); |
||||
Stage6(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_ptr<Renderable>>&IMAGES,std::vector<std::unique_ptr<Audio>>&SOUNDS,std::string&objective,TileTransformedView&game,GameFlags&flags); |
||||
protected: |
||||
void Start(); |
||||
void Update(); |
||||
bool MissionCompleted(); |
||||
}; |
||||
class Stage7:public Scenario{ |
||||
public: |
||||
Stage7(); |
||||
Stage7(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_ptr<Renderable>>&IMAGES,std::vector<std::unique_ptr<Audio>>&SOUNDS,std::string&objective,TileTransformedView&game,GameFlags&flags); |
||||
protected: |
||||
void Start(); |
||||
void Update(); |
||||
bool MissionCompleted(); |
||||
}; |
||||
class Stage8:public Scenario{ |
||||
public: |
||||
Stage8(); |
||||
Stage8(std::vector<std::shared_ptr<Unit>>&units,std::vector<std::unique_ptr<Renderable>>&IMAGES,std::vector<std::unique_ptr<Audio>>&SOUNDS,std::string&objective,TileTransformedView&game,GameFlags&flags); |
||||
protected: |
||||
void Start(); |
||||
void Update(); |
||||
bool MissionCompleted(); |
||||
}; |
Loading…
Reference in new issue