aboutsummaryrefslogtreecommitdiff
path: root/source/EditorAttachmentImpl.cpp
blob: 75d93cb8e34649f26a2c2a7448ae60602ffc9d3d (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;

	using namespace Tags;
	switch (object->GetTypeTag()) {
		case GOT_Player: result = new EaPlayer(); break;
		case GOT_LevelWrapper: result = new EaLevelWrapper(); break;

		default: result = new EditorAttachment(); break;
	}

	result->name = NameOf(object->GetTypeTag());
	return std::unique_ptr<EditorAttachment>(result);
}