malena
Why malena
Quick start
Tutorials
API docs
GitHub
GitHub
Tutorials
Loading...
Searching...
No Matches
Engine
Events
FrameDispatcher.h
Go to the documentation of this file.
1
//
2
// Created by Dave Smith on 3/22/26.
3
//
4
5
#ifndef FRAMEDISPATCHER_H
6
#define FRAMEDISPATCHER_H
7
#include "
Fireable.h
"
8
9
10
namespace
ml
{
11
86
class
FrameDispatcher
:
public
Fireable
{
87
public
:
88
FrameDispatcher
() :
Fireable
(DispatchType::FRAME) {}
89
99
bool
occurred
()
override
= 0;
100
108
void
fire
()
override
= 0;
109
110
private
:
112
void
fire
(
const
std::optional<sf::Event>& event)
final
override
{}
114
bool
occurred
(
const
std::optional<sf::Event>& event)
final
override
{
return
false
; }
115
};
116
117
}
// namespace ml
118
119
120
121
#endif
//FRAMEDISPATCHER_H
Fireable.h
ml::Fireable
Definition
Fireable.h:54
ml::FrameDispatcher::fire
void fire() override=0
Deliver the per-frame callback to all matching components.
ml::FrameDispatcher::occurred
bool occurred() override=0
Return true when this dispatcher should fire this frame.
ml::FrameDispatcher::FrameDispatcher
FrameDispatcher()
Definition
FrameDispatcher.h:88
ml
Definition
Component.h:18
Generated by
1.16.1