예제 #1
0
파일: RelicShield.cs 프로젝트: eox/Aimtec-1
        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);
                }
            };
        }
예제 #2
0
 private void RemoveShield(Shield item)
 {
     Shields.Remove(item);
 }