public void AddZone(GameObject Gatherzone) { switch (Gatherzone.tag) { case "Gather": //AddEvent(Gzs.type, 1, Gatherzone); GatherZoneScript Gzs = Gatherzone.GetComponent <GatherZoneScript>(); GatherZones.Add(Gzs); EventStruct ES = new EventStruct(); ES.type = Gzs.type; ES.recurrent = Gzs.recurrent; ES.nextStart = 0; ES.inUse = Gzs.isUsed; ES.Zone = Gzs; EventsTracked.Add(ES); break; default: break; } }
public void RemoveZone(GatherZoneScript GatherZone) { EventsTracked.Remove(EventsTracked.Find(et => et.Zone == GatherZone)); }