Working on time and input

This commit is contained in:
2022-10-27 23:38:04 -07:00
parent 942de96e16
commit 37eaa706b7
16 changed files with 196 additions and 18 deletions

View File

@ -25,6 +25,8 @@ void Scene::update() {
// TODO: Cleanup old scene items
// TODO: Tick scene items(?)
this->eventSceneUpdate.invoke();
if(!this->game.timeManager.isPaused) this->eventSceneUnpausedUpdate.invoke();
}
std::shared_ptr<SceneItem> Scene::createSceneItem() {

View File

@ -5,6 +5,7 @@
#pragma once
#include "SceneItem.hpp"
#include "event/Event.hpp"
namespace Dawn {
class DawnGame;
@ -17,6 +18,8 @@ namespace Dawn {
public:
DawnGame &game;
Event<> eventSceneUpdate;
Event<> eventSceneUnpausedUpdate;
/**
* Construct a new Scene instance.