Potato Engine
Loading...
Searching...
No Matches
Tickable.hpp
Go to the documentation of this file.
1
2#pragma once
3
9class Tickable
10{
11public:
12
14 bool isTicking() const;
16 void SetTicking(bool isEnabled);
17
18protected:
19 Tickable() = default; // protected constructor lets ONLY derived classes call it
20 virtual ~Tickable() = 0; // protected destructor stops compiler from allocating new, pure virtual makes abstract
21
35 virtual void Tick(float dt);
36
37private:
38 bool bTicking;
39
40};
void SetTicking(bool isEnabled)
Sets tick state for object.
Definition Tickable.cpp:12
virtual void Tick(float dt)
Update tick event.
Definition Tickable.cpp:26
bool isTicking() const
Checks if object is ticking.
Definition Tickable.cpp:8