Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Ticker.h
Go to the documentation of this file.
1#pragma once
2#include <cstdint>
3#include <map>
4#include <stack>
5
6namespace EngineCore {
7class ITickable;
8class Ticker{
9 public:
10 Ticker() = delete;
11 Ticker(uint32_t amountOfTickables);
12 ~Ticker() = default;
13
14 uint32_t addTickable(ITickable* tickable);
15 void removeTickable(uint32_t tickId);
16
17 void tick(double deltaTime);
18
19 private:
20 std::stack<uint32_t> tickIds;
21 std::map<uint32_t, ITickable*> allTickables;
22 };
23}
This is the interface which is used to call a tick function on an object. Everything which should be ...
Definition Tick.h:10
std::stack< uint32_t > tickIds
Definition Ticker.h:20
void removeTickable(uint32_t tickId)
Definition Ticker.cpp:29
uint32_t addTickable(ITickable *tickable)
Definition Ticker.cpp:16
std::map< uint32_t, ITickable * > allTickables
Definition Ticker.h:21
void tick(double deltaTime)
Definition Ticker.cpp:34
Log category system implementation.