You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
VirusAttack/olcCodeJam2023Entry/Scenario.cpp

35 lines
817 B

#include "Scenario.h"
Scenario::Scenario(VirusAttack*game)
:game(game){
dialog.SetVisible(false);
}
void Scenario::Start(){}
void Scenario::_Update(){
initialWaitTimer=std::max(0.f,initialWaitTimer-game->GetElapsedTime());
Update();
}
void Scenario::_Draw(){
Draw();
}
Stage1::Stage1(VirusAttack*game)
:Scenario(game){}
void Stage1::Start(){
game->unitMetersGreyedOut=true;
game->playerInControl=false;
}
void Stage1::Update(){
switch(state){
case 0:{
dialog.Initialize("Hello Hacker, thank you for taking on this request for me.",{24,64},"",game->IMAGES[HOODED_FIGURE].get(),{378,28},game->SOUNDS[Sound::VOICEOVER].get());
}break;
}
}
void Stage1::Draw(){
dialog.UpdateAndDraw({24,64},game,game->player_resources,game->IMAGES,game->GetTotalUsedMemory(),game->currentLevel->availableMemory);
}