![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <GameObject.h>
Inheritance diagram for GameObject:
Collaboration diagram for GameObject:Public Member Functions | |
| GameObject () | |
| virtual | ~GameObject () override=default |
| virtual ObjectType | GetObjectType () const |
| virtual EntityType | GetEntityType () const |
| void | SetPosition (Vector &_p) |
| Vector | GetPosition () const |
| Vector | GetRenderPosition () const |
| void | SetSize (float w, float h) |
| void | GetSize (float &w, float &h) const |
| SDL_FRect | GetBoundingBox () const |
| void | SetBoundingbox (const SDL_FRect &box) |
| void | SetDynamic (bool b) |
| bool | IsDynamic () const |
| virtual void | OnEvent (const Message &msg) override |
| void | Render () |
| std::string | Save () const |
| bool | Load (const std::string &json) |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| virtual void | Process () |
| uint64_t | GetUID () const |
Static Public Member Functions | |
| static Object * | Create () |
Static Public Attributes | |
| static bool | FactoryRegistered = ObjectFactory::Get().Register("GameObject", Create) |
Protected Attributes | |
| Vector | position |
| Vector | vRenderPosition |
| float | width = 100.0f |
| float | height = 150.0f |
| SDL_FRect | boundingBox = { 0.0f, 0.0f, 0.0f, 0.0f } |
| bool | isDynamic = false |
Protected Attributes inherited from Object | |
| uint64_t | uid = 0 |
Additional Inherited Members | |
Public Attributes inherited from Object | |
| std::string | name = "unnamed_object" |
Definition at line 32 of file GameObject.h.
|
inline |
Definition at line 37 of file GameObject.h.
References Object::name.
Referenced by Create().
Here is the caller graph for this function:
|
overridevirtualdefault |
|
static |
Definition at line 15 of file GameObject.cpp.
References GameObject().
Here is the call graph for this function:
|
inline |
Definition at line 64 of file GameObject.h.
References boundingBox.
Referenced by _Sprite::Render(), and AI_Player::RenderDebug().
Here is the caller graph for this function:
|
inlinevirtual |
|
inlinevirtual |
Definition at line 42 of file GameObject.h.
References Entity.
|
inline |
Definition at line 54 of file GameObject.h.
References position.
Referenced by AI_Player::Process(), _Sprite::Render(), and AI_Player::RenderDebug().
Here is the caller graph for this function:
|
inline |
Definition at line 55 of file GameObject.h.
References vRenderPosition.
Definition at line 63 of file GameObject.h.
References GetComponentTypeID_Static(), height, and width.
Referenced by _Sprite::Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 67 of file GameObject.h.
References isDynamic.
Definition at line 42 of file GameObject.cpp.
References Count, extract_json_bool(), extract_json_double(), extract_json_int(), extract_json_string(), GetComponentTypeID_Static(), height, isDynamic, Object::name, position, width, Vector::x, and Vector::y.
Here is the call graph for this function:Reimplemented from Object.
Definition at line 20 of file GameObject.cpp.
|
inlinevirtual |
Reimplemented from Object.
Definition at line 73 of file GameObject.h.
References Object::name, position, SYSTEM_LOG, Vector::x, and Vector::y.
| std::string GameObject::Save | ( | ) | const |
Definition at line 25 of file GameObject.cpp.
References escape_json_string(), GetComponentTypeID_Static(), GetEntityType(), Object::GetUID(), height, isDynamic, Object::name, position, width, Vector::x, and Vector::y.
Here is the call graph for this function:Definition at line 65 of file GameObject.h.
References boundingBox, and GetComponentTypeID_Static().
Referenced by _Sprite::Render().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 66 of file GameObject.h.
References isDynamic.
Definition at line 48 of file GameObject.h.
References boundingBox, GetComponentTypeID_Static(), height, position, vRenderPosition, and width.
Referenced by AI_Player::Process().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 56 of file GameObject.h.
References boundingBox, GetComponentTypeID_Static(), height, and width.
Referenced by _Sprite::SetSprite().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 86 of file GameObject.h.
Referenced by GetBoundingBox(), SetBoundingbox(), SetPosition(), and SetSize().
|
static |
Definition at line 35 of file GameObject.h.
|
protected |
Definition at line 84 of file GameObject.h.
Referenced by GetSize(), Load(), Save(), SetPosition(), and SetSize().
Definition at line 88 of file GameObject.h.
Referenced by IsDynamic(), Load(), Save(), and SetDynamic().
|
protected |
Definition at line 81 of file GameObject.h.
Referenced by GetPosition(), Load(), Render(), Save(), and SetPosition().
|
protected |
Definition at line 81 of file GameObject.h.
Referenced by GetRenderPosition(), and SetPosition().
|
protected |
Definition at line 83 of file GameObject.h.
Referenced by GetSize(), Load(), Save(), SetPosition(), and SetSize().