Fixes
This commit is contained in:
@ -34,7 +34,7 @@ namespace ia::iae
|
||||
for(auto& t: m_components)
|
||||
t->Draw();
|
||||
for(auto& t: m_children)
|
||||
t->Draw();
|
||||
if B_LIKELY(t->IsEnabled()) t->Draw();
|
||||
}
|
||||
|
||||
VOID Node2D::DebugDraw()
|
||||
@ -42,7 +42,7 @@ namespace ia::iae
|
||||
for(auto& t: m_components)
|
||||
t->DebugDraw();
|
||||
for(auto& t: m_children)
|
||||
t->DebugDraw();
|
||||
if B_LIKELY(t->IsEnabled()) t->DebugDraw();
|
||||
}
|
||||
|
||||
VOID Node2D::Update()
|
||||
@ -50,7 +50,7 @@ namespace ia::iae
|
||||
for(auto& t: m_components)
|
||||
t->Update();
|
||||
for(auto& t: m_children)
|
||||
t->Update();
|
||||
if B_LIKELY(t->IsEnabled()) t->Update();
|
||||
}
|
||||
|
||||
VOID Node2D::FixedUpdate()
|
||||
@ -58,6 +58,6 @@ namespace ia::iae
|
||||
for(auto& t: m_components)
|
||||
t->FixedUpdate();
|
||||
for(auto& t: m_children)
|
||||
t->FixedUpdate();
|
||||
if B_LIKELY(t->IsEnabled()) t->FixedUpdate();
|
||||
}
|
||||
} // namespace ia::iae
|
||||
@ -24,7 +24,7 @@ namespace ia::iae
|
||||
|
||||
class IComponent
|
||||
{
|
||||
public:
|
||||
public:
|
||||
PURE_VIRTUAL(VOID Draw());
|
||||
PURE_VIRTUAL(VOID DebugDraw());
|
||||
PURE_VIRTUAL(VOID Update());
|
||||
@ -45,7 +45,18 @@ namespace ia::iae
|
||||
return m_node;
|
||||
}
|
||||
|
||||
BOOL &IsEnabled()
|
||||
{
|
||||
return m_isEnabled;
|
||||
}
|
||||
|
||||
BOOL IsEnabled() CONST
|
||||
{
|
||||
return m_isEnabled;
|
||||
}
|
||||
|
||||
protected:
|
||||
Node2D *CONST m_node{};
|
||||
BOOL m_isEnabled{true};
|
||||
};
|
||||
} // namespace ia::iae
|
||||
@ -38,7 +38,18 @@ namespace ia::iae
|
||||
return m_name;
|
||||
}
|
||||
|
||||
BOOL &IsEnabled()
|
||||
{
|
||||
return m_isEnabled;
|
||||
}
|
||||
|
||||
BOOL IsEnabled() CONST
|
||||
{
|
||||
return m_isEnabled;
|
||||
}
|
||||
|
||||
protected:
|
||||
CONST String m_name;
|
||||
BOOL m_isEnabled{true};
|
||||
};
|
||||
} // namespace ia::iae
|
||||
Reference in New Issue
Block a user