示例#1
0
        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 AddShield(Shield item)
 {
     Shields.Add(item);
 }