PixelBullet
0.0.1
A C++ game engine
Loading...
Searching...
No Matches
engine
include
pixelbullet
scene
interaction_sequence_types.h
1
#pragma once
2
3
#include <glm/vec2.hpp>
4
5
#include <optional>
6
#include <string>
7
#include <vector>
8
9
namespace
pixelbullet
10
{
11
struct
InteractionSequenceChoice
12
{
13
std::string id;
14
std::string text;
15
std::optional<std::string> next_node_id = std::nullopt;
16
std::optional<std::string> completion_outcome_id = std::nullopt;
17
18
[[nodiscard]]
bool
operator==(
const
InteractionSequenceChoice
&)
const
noexcept
=
default
;
19
};
20
21
struct
InteractionSequenceNode
22
{
23
std::string id;
24
std::optional<std::string> speaker_name = std::nullopt;
25
std::string text;
26
std::optional<std::string> next_node_id = std::nullopt;
27
std::optional<std::string> completion_outcome_id = std::nullopt;
28
std::vector<InteractionSequenceChoice> choices = {};
29
30
[[nodiscard]]
bool
operator==(
const
InteractionSequenceNode
&)
const
noexcept
=
default
;
31
};
32
33
struct
InteractionSequenceEditorGraphNodeLayout
34
{
35
std::string node_id;
36
glm::vec2 position = glm::vec2(0.0f);
37
38
[[nodiscard]]
bool
operator==(
const
InteractionSequenceEditorGraphNodeLayout
&)
const
noexcept
=
default
;
39
};
40
41
struct
InteractionSequenceEditorGraphLayout
42
{
43
std::vector<InteractionSequenceEditorGraphNodeLayout> nodes;
44
45
[[nodiscard]]
bool
Empty()
const
noexcept
46
{
47
return
nodes.empty();
48
}
49
50
[[nodiscard]]
bool
operator==(
const
InteractionSequenceEditorGraphLayout
&)
const
noexcept
=
default
;
51
};
52
53
struct
InteractionSequenceAsset
54
{
55
std::string initial_node_id;
56
std::vector<InteractionSequenceNode> nodes;
57
std::optional<InteractionSequenceEditorGraphLayout> editor_graph;
58
59
[[nodiscard]]
bool
operator==(
const
InteractionSequenceAsset
&)
const
noexcept
=
default
;
60
};
61
}
// namespace pixelbullet
pixelbullet::InteractionSequenceAsset
Definition
interaction_sequence_types.h:54
pixelbullet::InteractionSequenceChoice
Definition
interaction_sequence_types.h:12
pixelbullet::InteractionSequenceEditorGraphLayout
Definition
interaction_sequence_types.h:42
pixelbullet::InteractionSequenceEditorGraphNodeLayout
Definition
interaction_sequence_types.h:34
pixelbullet::InteractionSequenceNode
Definition
interaction_sequence_types.h:22
Generated by
1.16.1