function Loot() {} Loot.prototype.Schema = "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + ""; Loot.prototype.Serialize = null; // we have no dynamic state to save Loot.prototype.GetXp = function() { return +(this.template.xp || 0); }; Loot.prototype.GetResources = function() { return { "food": +(this.template.food || 0), "wood": +(this.template.wood || 0), "metal": +(this.template.metal || 0), "stone": +(this.template.stone || 0) }; }; Engine.RegisterComponentType(IID_Loot, "Loot", Loot);