blob: 5193f843444541cd50e6d8794d4ff9c317af3a08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include "EditorAttachmentImpl.hpp"
#include "EditorAttachment.hpp"
EditorAttachment::EditorAttachment() {
}
std::unique_ptr<EditorAttachment> EaGameObject::Create(GameObject* object) {
EditorAttachment* 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 EditorAttachment(); break;
}
result->name = GameObject::ToString(kind);
return std::unique_ptr<EditorAttachment>(result);
}
|