VOX
A little voxel engine
Loading...
Searching...
No Matches
Events.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "AbstractEvent.hpp"
4#include "Block.hpp"
5
6#include <glm/glm.hpp>
7
8namespace Event
9{
10
12 {
13
14 public:
15
17 const uint64_t player_id,
18 const glm::dvec3 & old_pos,
19 const glm::dvec3 & displacement,
20 const BlockInfo::Type & block
21 ):
23 old_position(old_pos),
25 ground_block(block)
26 {}
27
28 ~PlayerMoving() = default;
29
30 Type getType() const noexcept override { return getStaticType(); }
31 static Type getStaticType() { return typeid(PlayerMoving); }
32
33 uint64_t player_id;
34 glm::dvec3 old_position;
35 glm::dvec3 displacement;
37
38 };
39
40} // namespace Event
Type
Definition: Block.hpp:33
Definition: AbstractEvent.hpp:11
Definition: Events.hpp:12
~PlayerMoving()=default
PlayerMoving(const uint64_t player_id, const glm::dvec3 &old_pos, const glm::dvec3 &displacement, const BlockInfo::Type &block)
Definition: Events.hpp:16
BlockInfo::Type ground_block
Definition: Events.hpp:36
static Type getStaticType()
Definition: Events.hpp:31
glm::dvec3 old_position
Definition: Events.hpp:34
Type getType() const noexcept override
Definition: Events.hpp:30
glm::dvec3 displacement
Definition: Events.hpp:35
uint64_t player_id
Definition: Events.hpp:33
Definition: AbstractEvent.cpp:4
std::type_index Type
Definition: AbstractEvent.hpp:8