Ndk/Components: Added OnComponent[Attached|Detacted] events
And m_entity member variable Former-commit-id: d6bd9e382e55bafd357e7ec62862ae731c21f897
This commit is contained in:
@@ -14,8 +14,11 @@
|
||||
|
||||
namespace Ndk
|
||||
{
|
||||
class Entity;
|
||||
|
||||
class NDK_API BaseComponent
|
||||
{
|
||||
friend Entity;
|
||||
friend class Sdk;
|
||||
|
||||
public:
|
||||
@@ -35,10 +38,15 @@ namespace Ndk
|
||||
|
||||
protected:
|
||||
ComponentIndex m_componentIndex;
|
||||
Entity* m_entity;
|
||||
|
||||
static ComponentIndex RegisterComponent(ComponentId id, Factory factoryFunc);
|
||||
|
||||
private:
|
||||
virtual void OnComponentAttached(BaseComponent& component);
|
||||
virtual void OnComponentDetached(BaseComponent& component);
|
||||
void SetEntity(Entity* entity);
|
||||
|
||||
static bool Initialize();
|
||||
static void Uninitialize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user