Sparkle 0.0.1
Loading...
Searching...
No Matches
spk_entity_2d.hpp
1#pragma once
2
3#include "structure/engine/2d/spk_transform_2d.hpp"
4#include "structure/engine/spk_entity.hpp"
5
6namespace spk
7{
12 class Entity2D : public spk::Entity
13 {
14 private:
15 Transform2D &_transform;
16
17 public:
23 Entity2D(const std::wstring &p_name, spk::Entity *p_parent = nullptr);
24
34 const Transform2D &transform() const;
35
38 };
39}
void notifyChildTransformsEdited()
Notifies children that their parent transform changed.
Definition spk_entity_2d.cpp:21
Entity2D(const std::wstring &p_name, spk::Entity *p_parent=nullptr)
Creates a 2D entity with an optional parent.
Definition spk_entity_2d.cpp:5
Transform2D & transform()
Returns the entity transform.
Definition spk_entity_2d.cpp:11
Hierarchical game object containing components and children.
Definition spk_entity.hpp:34
Position, rotation, and scale component for 2D entities.
Definition spk_transform_2d.hpp:20