From 60ccc62f4934e44ad5b905fdbcf458302b8d8a09 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 3 Jun 2022 23:26:44 -0700 Subject: Changeset: 63 [WIP] Rename directories --- source/Game/EditorAttachmentImpl.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 source/Game/EditorAttachmentImpl.cpp (limited to 'source/Game/EditorAttachmentImpl.cpp') diff --git a/source/Game/EditorAttachmentImpl.cpp b/source/Game/EditorAttachmentImpl.cpp new file mode 100644 index 0000000..b09c133 --- /dev/null +++ b/source/Game/EditorAttachmentImpl.cpp @@ -0,0 +1,23 @@ +#include "EditorAttachmentImpl.hpp" +#include "EditorAttachment.hpp" + +#include + +EditorAttachment::EditorAttachment() { +} + +std::unique_ptr EaGameObject::Create(GameObject* object) { + EaGameObject* result; + + auto kind = object->GetKind(); + switch (kind) { + case GameObject::KD_Player: result = new EaPlayer(); break; + case GameObject::KD_LevelWrapper: result = new EaLevelWrapper(); break; + + default: result = new EaGameObject(); break; + } + + result->name = Metadata::EnumToString(kind); + result->eulerAnglesRotation = glm::eulerAngles(object->GetRotation()); + return std::unique_ptr(result); +} -- cgit v1.2.3-70-g09d2