4 * Created on: Oct 3, 2012
10 #include "../loader/TypeDescription.h"
12 using loader::FieldDescription;
13 using loader::TypeDescription;
19 , type(TYPE_CONTACT) {
24 void Trigger::CreateTypeDescription() {
27 int numberId(TypeDescription::GetTypeId("Number"));
28 int scriptId(TypeDescription::GetTypeId("Script"));
29 int vectorId(TypeDescription::GetTypeId("Vector"));
31 TypeDescription &td(TypeDescription::CreateOrGet("Trigger"));
32 td.SetConstructor(&Construct);
33 td.SetSize(sizeof(Trigger));
35 td.AddField("script", FieldDescription(((char *)&t.script) - ((char *)&t), scriptId).SetReferenced());
36 td.AddField("position", FieldDescription(((char *)&t.tilePosition) - ((char *)&t), vectorId));
37 td.AddField("type", FieldDescription(((char *)&t.type) - ((char *)&t), numberId));
40 void Trigger::Construct(void *data) {