From e66286ebe30afc9acc4531fc2bea29b7fb924f93 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 30 May 2022 17:03:20 -0700 Subject: Changeset: 56 Buildsystem cleanup: change to layered structure for different targets --- source/30-game/EditorAttachmentImpl.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 source/30-game/EditorAttachmentImpl.cpp (limited to 'source/30-game/EditorAttachmentImpl.cpp') diff --git a/source/30-game/EditorAttachmentImpl.cpp b/source/30-game/EditorAttachmentImpl.cpp new file mode 100644 index 0000000..62d15eb --- /dev/null +++ b/source/30-game/EditorAttachmentImpl.cpp @@ -0,0 +1,21 @@ +#include "EditorAttachmentImpl.hpp" +#include "EditorAttachment.hpp" + +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 = GameObject::ToString(kind); + result->eulerAnglesRotation = glm::eulerAngles(object->GetRotation()); + return std::unique_ptr(result); +} -- cgit v1.2.3-70-g09d2