Potato Engine
Loading...
Searching...
No Matches
Tickable Class Referenceabstract

Abstract class that route ticking functionality. More...

#include <Tickable.hpp>

Inheritance diagram for Tickable:
Actor PlayerController Widget WidgetElement Block Camera Entity DebugInfo TextElement Player

Public Member Functions

bool isTicking () const
 Checks if object is ticking.
void SetTicking (bool isEnabled)
 Sets tick state for object.

Protected Member Functions

virtual void Tick (float dt)
 Update tick event.

Detailed Description

Abstract class that route ticking functionality.

Note
This class must be inherited from for object classes that should tick. This class has no inherent functionality.

Definition at line 9 of file Tickable.hpp.

Constructor & Destructor Documentation

◆ ~Tickable()

Tickable::~Tickable ( )
protectedpure virtual

Definition at line 27 of file Tickable.cpp.

Member Function Documentation

◆ isTicking()

bool Tickable::isTicking ( ) const

Checks if object is ticking.

Returns
true if object is ticking

Definition at line 8 of file Tickable.cpp.

◆ SetTicking()

void Tickable::SetTicking ( bool isEnabled)

Sets tick state for object.

Parameters
isEnabledtick state

DO NOT CALL IN CONSTRUCTOR

Definition at line 12 of file Tickable.cpp.

◆ Tick()

void Tickable::Tick ( float dt)
protectedvirtual

Update tick event.

This function is called every tick on the update step. Put all gameplay functionality that should run every update here (custom movement logic, etc.)

Parameters
dtDeltatime; time elapsed since last frame in ms
Note
Always call base method when overriding:
void Class::Tick() {
BaseClass::Tick();
// ...
}

Reimplemented in Actor, DebugInfo, Player, and PlayerController.

Definition at line 26 of file Tickable.cpp.