MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / CLASS

Function CLASS

engine/source/runtime/function/framework/component/component.h:9–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7 // Component
8 REFLECTION_TYPE(Component)
9 CLASS(Component, WhiteListFields)
10 {
11 REFLECTION_BODY(Component)
12 protected:
13 std::weak_ptr<GObject> m_parent_object;
14 bool m_is_dirty {false};
15 bool m_is_scale_dirty {false};
16
17 public:
18 Component() = default;
19 virtual ~Component() {}
20
21 // Instantiating the component after definition loaded
22 virtual void postLoadResource(std::weak_ptr<GObject> parent_object) { m_parent_object = parent_object; }
23
24 virtual void tick(float delta_time) {};
25
26 bool isDirty() const { return m_is_dirty; }
27
28 void setDirtyFlag(bool is_dirty) { m_is_dirty = is_dirty; }
29
30 bool m_tick_in_editor_mode {false};
31 };
32
33} // namespace Piccolo

Callers 7

mesh_component.hFile · 0.50
camera_component.hFile · 0.50
motor_component.hFile · 0.50

Calls 1

ComponentClass · 0.85

Tested by

no test coverage detected