This commit is contained in:
2025-05-13 02:50:08 +03:00
parent 20b4502be5
commit 9af2bb814e
102 changed files with 259423 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
#include "Component.h"
#include "GameObject.h"
TransformPtr Component::transform() {
return gameObject->transform;
}
void Component::serialize(Archive& archive) {
auto ptr = std::static_pointer_cast<Object>(gameObject);
archive << ptr;
if (archive.is_loading()) {
gameObject = std::static_pointer_cast<GameObject>(ptr);
}
}