Ejemplo n.º 1
0
        static void GameObjectOnCreate(GameObject sender, EventArgs args)
        {
            if (!(sender is Obj_AI_Minion))
            {
                return;
            }

            var obj = (Obj_AI_Minion)sender;

            switch (obj.BaseSkinName.ToLower())
            {
            case "sru_baron":
                Baron = (Obj_AI_Minion)sender;
                return;

            case "sru_dragon":
                Dragon = (Obj_AI_Minion)sender;
                return;

            case "sru_blue":
                BlueBuffs.Add((Obj_AI_Minion)sender);
                return;

            case "sru_red":
                RedBuffs.Add((Obj_AI_Minion)sender);
                break;
            }
        }
Ejemplo n.º 2
0
        private static void GameObjectOnOnDelete(GameObject sender, EventArgs args)
        {
            if (!(sender is Obj_AI_Minion))
            {
                return;
            }

            var obj = (Obj_AI_Minion)sender;

            switch (obj.BaseSkinName.ToLower())
            {
            case "sru_baron":
                Baron = null;
                return;

            case "sru_dragon":
                Dragon = null;
                return;

            case "sru_blue":
                BlueBuffs.RemoveAll(x => x.NetworkId == obj.NetworkId);
                return;

            case "sru_red":
                RedBuffs.RemoveAll(x => x.NetworkId == obj.NetworkId);
                return;
            }
        }