From 791b3f354b378769bffe623b05f1305c91b77101 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 3 Jun 2022 23:30:01 -0700 Subject: Changeset: 64 [WIP] Rename directories --- ProjectBrussel/Game/EditorAttachmentImpl.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ProjectBrussel/Game/EditorAttachmentImpl.cpp (limited to 'ProjectBrussel/Game/EditorAttachmentImpl.cpp') diff --git a/ProjectBrussel/Game/EditorAttachmentImpl.cpp b/ProjectBrussel/Game/EditorAttachmentImpl.cpp new file mode 100644 index 0000000..b09c133 --- /dev/null +++ b/ProjectBrussel/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