protected override void XMLNodeHandler(string id, IXMLNode xmlNode, Hashtable hashData, string errorMessage) { ImmutableDataMonster data = new ImmutableDataMonster(id, xmlNode, errorMessage); if (hashData.ContainsKey(id)) { Debug.LogError(errorMessage + "Duplicate keys!"); } else { hashData.Add(id, data); } }
/// <summary> /// Init the specified id, monster and maxScreenSpace. /// </summary> /// <param name="id">Identifier.</param> /// <param name="monster">Monster.</param> /// <param name="maxScreenSpace">Max screen space.</param> public void Init(string id, ImmutableDataMonster monster, float maxScreenSpace) { if (string.IsNullOrEmpty(gateID)) { gateID = id; } else { Debug.LogError("Something trying to set id on gate twice " + gateID); } gateResource = monster.ResourceKey; this.maxScreenSpace = maxScreenSpace; }