Esempio 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;
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     Fired when a <see cref="GameObject" /> is created.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private static void GameObject_OnCreate(GameObject sender, EventArgs args)
        {
            var obj = sender as Obj_AI_Base;

            if (obj == null)
            {
                return;
            }

            if (obj.CharData.BaseSkinName == "SRU_Baron")
            {
                Baron = obj;

                FireObjectCreatedEvent(obj, ObjectiveType.Baron);
            }

            if (obj.CharData.BaseSkinName.Contains("SRU_Dragon"))
            {
                Dragon = obj;

                FireObjectCreatedEvent(obj, ObjectiveType.Dragon);
            }

            if (obj.CharData.BaseSkinName == "SRU_Blue")
            {
                BlueBuffs.Add(obj);

                FireObjectCreatedEvent(obj, ObjectiveType.Blue);
            }

            if (obj.CharData.BaseSkinName == "SRU_Red")
            {
                RedBuffs.Add(obj);

                FireObjectCreatedEvent(obj, ObjectiveType.Red);
            }
        }