The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'!
https://forums.lestoria.net
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.
36 lines
979 B
36 lines
979 B
#include "GameState.h"
|
|
#include "Crawler.h"
|
|
#include "DEFINES.h"
|
|
#include "Menu.h"
|
|
|
|
INCLUDE_MONSTER_LIST
|
|
|
|
void State_GameRun::OnStateChange(GameState*prevState){
|
|
Menu::stack.clear();
|
|
};
|
|
void State_GameRun::OnUserUpdate(Crawler*game){
|
|
game->bossDisplayTimer=std::max(0.f,game->bossDisplayTimer-game->GetElapsedTime());
|
|
if(game->encounterStarted&&game->totalBossEncounterMobs>0){
|
|
game->encounterDuration+=game->GetElapsedTime();
|
|
}
|
|
game->HandleUserInput(game->GetElapsedTime());
|
|
|
|
if(game->GetKey(T).bPressed){
|
|
GameState::ChangeState(States::MAIN_MENU);
|
|
}
|
|
|
|
game->UpdateEffects(game->GetElapsedTime());
|
|
game->GetPlayer()->Update(game->GetElapsedTime());
|
|
for(Monster&m:MONSTER_LIST){
|
|
m.Update(game->GetElapsedTime());
|
|
}
|
|
for(Monster&m:game->monstersToBeSpawned){
|
|
MONSTER_LIST.push_back(m);
|
|
}
|
|
game->monstersToBeSpawned.clear();
|
|
|
|
game->UpdateBullets(game->GetElapsedTime());
|
|
game->UpdateCamera(game->GetElapsedTime());
|
|
};
|
|
void State_GameRun::Draw(Crawler*game){
|
|
}; |