4#ifndef TRAM_SDK_FRAMEWORK_ENTITYCOMPONENT_H
5#define TRAM_SDK_FRAMEWORK_ENTITYCOMPONENT_H
62 operator T*() {
return ptr; }
63 explicit operator bool() {
return ptr !=
nullptr; }
Wrapper for an EntityComponent pointer.
Definition: entitycomponent.h:53
T * get()
Definition: entitycomponent.h:59
Component()
Definition: entitycomponent.h:55
void make()
Definition: entitycomponent.h:57
T * ptr
Definition: entitycomponent.h:65
T * operator->()
Definition: entitycomponent.h:60
void clear()
Definition: entitycomponent.h:58
T & operator*()
Definition: entitycomponent.h:61
~Component()
Definition: entitycomponent.h:56
Definition: entitycomponent.h:18
bool is_init
Definition: entitycomponent.h:39
void SetParent(Entity *parent)
Definition: entitycomponent.h:34
EntityComponent()
Definition: entitycomponent.cpp:8
bool is_ready
Definition: entitycomponent.h:38
virtual void EventHandler(Event &event)=0
Entity * GetParent()
Definition: entitycomponent.h:33
size_t resources_waiting
Definition: entitycomponent.h:37
void ResourceReady()
Definition: entitycomponent.h:42
bool IsReady()
Definition: entitycomponent.h:30
bool IsInit()
Definition: entitycomponent.h:31
virtual ~EntityComponent()
Definition: entitycomponent.cpp:12
Entity * parent
Definition: entitycomponent.h:40
virtual void Init()
Definition: entitycomponent.h:23
static void Delete(T *obj)
Definition: pool.h:124
static T * New(Args &&... args)
Definition: pool.h:123
Definition: resource.h:47
void FinishResources()
Notifies EntityComponents about finished resources.
Definition: async.cpp:131