public RelicShield() { GameObject.OnCreate += delegate(GameObject sender) { if (sender.Name.Contains("HA_AP_Health")) { Console.WriteLine($"CREATED SHIELD {sender.Name}"); Shields.Add(sender.ServerPosition); } }; GameObject.OnDestroy += delegate(GameObject sender) { if (sender.Name.Contains("HA_AP_Health")) { Console.WriteLine($"DELETED SHIELD {sender.Name}"); Shields.Remove(sender.ServerPosition); } }; }
private void RemoveShield(Shield item) { Shields.Remove(item); }