mirror of
https://github.com/barkeser2002/flower.git
synced 2026-09-25 17:56:17 +03:00
33 lines
552 B
C++
33 lines
552 B
C++
#include "component.h"
|
|
#include "scene_node.h"
|
|
#include "scene.h"
|
|
|
|
namespace engine
|
|
{
|
|
const UIComponentReflectionDetailed&
|
|
Component::uiComponentReflection()
|
|
{
|
|
static UIComponentReflectionDetailed reflection { };
|
|
return reflection;
|
|
}
|
|
|
|
void Component::setNode(std::weak_ptr<SceneNode> node)
|
|
{
|
|
m_node = node;
|
|
}
|
|
|
|
std::shared_ptr<SceneNode> Component::getNode()
|
|
{
|
|
return m_node.lock();
|
|
}
|
|
|
|
bool Component::isValid() const
|
|
{
|
|
return m_node.lock().get();
|
|
}
|
|
|
|
void Component::markDirty()
|
|
{
|
|
m_node.lock()->getScene()->markDirty();
|
|
}
|
|
} |