GlPortal Class Reference  0.1.1
Source code documentation of the free and open 3D action puzzle game.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Terminal.hpp
Go to the documentation of this file.
1 #ifndef COMPONENT_LIGHTSOURCE_HPP
2 #define COMPONENT_LIGHTSOURCE_HPP
3 
5 
6 #include <serine/Archiver.hpp>
7 
9 
10 namespace glPortal {
11 
12 class Terminal : public radix::Component {
13 public:
14  bool enabled;
17 
19  Component(ent),
20  enabled(false),
21  backgroundColor(0, 0, 0, 1),
22  textColor(1, 1, 1, 1) {
23  }
24 
25  const char* getName() const {
26  return "Terminal";
27  }
28 
29  TypeId getTypeId() const {
30  return Component::getTypeId<std::remove_reference<decltype(*this)>::type>();
31  }
32 
33  void serialize(serine::Archiver &ar) {
34  ar("enabled", enabled);
35  ar("backgroundColor", backgroundColor);
36  ar("textColor", textColor);
37  }
38 };
39 
40 } /* namespace radix */
41 
42 #endif /* COMPONENT_LIGHTSOURCE_HPP */
bool enabled
Definition: Terminal.hpp:14
Component(const Component &)=delete
ECS entity, Component container It is created like this:
Definition: Entity.hpp:23
radix::Vector4f backgroundColor
Definition: Terminal.hpp:15
Definition: Screen.hpp:10
radix::Vector4f textColor
Definition: Terminal.hpp:16
4-dimensional float-based vector/point storage and manipulation struct
Definition: Vector4f.hpp:22
Base class to create entity components.
Definition: Component.hpp:25
ComponentTypeId TypeId
Definition: Component.hpp:35
const char * getName() const
Definition: Terminal.hpp:25
TypeId getTypeId() const
Definition: Terminal.hpp:29
Terminal(radix::Entity &ent)
Definition: Terminal.hpp:18
Definition: Terminal.hpp:12
void serialize(serine::Archiver &ar)
Definition: Terminal.hpp:33