-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
43 lines (35 loc) · 1.2 KB
/
player.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include "graphs.h"
#include "commands.h"
struct Level;
struct LevelCreationEvent;
struct Player;
struct Health;
struct PlayerCreationSystem
: public OneOffSystem
, public AccessWorld_UseUnique<Level>
, public AccessWorld_ModifyWorld
, public AccessWorld_UseUnique<GameContext>
, public AccessWorld_ModifyEntity
, public AccessEvents_Listen<LevelCreationEvent>
{
Entity last_player_entity = entt::null;
void activate() override;
void react_to_event(LevelCreationEvent& signal) override;
};
struct PlayerChoiceSystem
: public RuntimeSystem
, public AccessWorld_QueryAllEntitiesWith<Player>
, public AccessWorld_QueryComponent<WorldPosition>
, public AccessWorld_QueryComponent<Sight>
, public AccessWorld_UseUnique<Level>
, public AccessWorld_UseUnique<GameContext>
, public AccessEvents_Listen<AwaitingActionSignal>
, public AccessEvents_Listen<KeyEvent>
, public AccessEvents_Emit<IssueCommandSignal>
{
bool player_turn = false;
void react_to_event(AwaitingActionSignal& signal) override;
void react_to_event(KeyEvent& key) override;
void issue_command(IssueCommandSignal);
};