| Fling Engine 0.00.1 Fling Engine is a game engine written in Vulkan

Mover.h
Go to the documentation of this file.
1 #pragma once
2
3 #include "Serilization.h"
4
6 struct Mover
7 {
8 glm::vec3 TargetPos = { -10.0f, 0.0f, 0.0f };
9
10 float Speed = 1.0f;
11
12 template<class Archive>
13 void serialize(Archive& t_Archive);
14 };
15
17 template<class Archive>
18 void Mover::serialize(Archive& t_Archive)
19 {
20 t_Archive(
21 cereal::make_nvp("TargetPos_X", TargetPos.x),
22 cereal::make_nvp("TargetPos_Y", TargetPos.y),
23 cereal::make_nvp("TargetPos_Z", TargetPos.z),
24
25 cereal::make_nvp("Speed", Speed)
26 );
27 }
28
30 struct Rotator
31 {
32 glm::vec3 MinPos = { -10.0f, 0.0f, 0.0f };
33 glm::vec3 MaxPos = { -10.0f, 0.0f, 0.0f } ;
34 float Speed = 1.0f;
35
36
37 template<class Archive>
38 void serialize(Archive& t_Archive);
39 };
40
42 template<class Archive>
43 void Rotator::serialize(Archive& t_Archive)
44 {
45 t_Archive(
46 cereal::make_nvp("MinPos_X", MinPos.x),
47 cereal::make_nvp("MinPos_Y", MinPos.y),
48 cereal::make_nvp("MinPos_Z", MinPos.z),
49
50 cereal::make_nvp("MaxPos_X", MaxPos.x),
51 cereal::make_nvp("MaxPos_Y", MaxPos.y),
52 cereal::make_nvp("MaxPos_Z", MaxPos.z),
53
54 cereal::make_nvp("Speed", Speed)
55 );
56 }
Mover
A mover will move between two values ata given speed.
Definition: Mover.h:6
Mover::serialize
void serialize(Archive &t_Archive)
Serilazation to an archive.
Definition: Mover.h:18
Rotator::serialize
void serialize(Archive &t_Archive)
Serilazation to an archive.
Definition: Mover.h:43
Mover::Speed
float Speed
Definition: Mover.h:10
Serilization.h
Mover::TargetPos
glm::vec3 TargetPos
Definition: Mover.h:8
Rotator
A mover will move between two values ata given speed.
Definition: Mover.h:30