Ejemplo n.º 1
0
        public MainLogics SetLogic(MainLogics newlogic)
        {
            if (saveMylife)
            {
                return(current);
            }
            if (newlogic != MainLogics.PushLogic)
            {
                pushLogic.Deactivate();
            }
            MainLogics old = current;

            //Chat.Print("Changing logic, old = " + old.ToString() + " & new = " + newlogic.ToString());
            switch (current)
            {
            case MainLogics.SurviLogic:
                surviLogic.Deactivate();
                break;

            case MainLogics.RecallLogic:
                recallLogic.Deactivate();
                break;

            case MainLogics.CombatLogic:
                combatLogic.Deactivate();
                break;
            }


            switch (newlogic)
            {
            case MainLogics.PushLogic:
                pushLogic.Activate();
                break;

            case MainLogics.LoadLogic:
                loadLogic.Activate();
                break;

            case MainLogics.SurviLogic:
                surviLogic.Activate();

                break;

            case MainLogics.RecallLogic:
                recallLogic.Activate();
                break;

            case MainLogics.CombatLogic:
                combatLogic.Activate();
                break;
            }


            current = newlogic;
            return(old);
        }
Ejemplo n.º 2
0
        public MainLogics SetLogic(MainLogics newlogic)
        {
            if (saveMylife)
            {
                return(current);
            }
            if (newlogic != MainLogics.PushLogic)
            {
                pushLogic.Deactivate();
            }
            MainLogics old = current;

            switch (current)
            {
            case MainLogics.SurviLogic:
                surviLogic.Deactivate();
                break;

            case MainLogics.RecallLogic:
                recallLogic.Deactivate();
                break;

            case MainLogics.CombatLogic:
                combatLogic.Deactivate();
                break;
            }


            switch (newlogic)
            {
            case MainLogics.PushLogic:
                pushLogic.Activate();
                break;

            case MainLogics.LoadLogic:
                loadLogic.Activate();
                break;

            case MainLogics.SurviLogic:
                surviLogic.Activate();

                break;

            case MainLogics.RecallLogic:
                recallLogic.Activate();
                break;

            case MainLogics.CombatLogic:
                combatLogic.Activate();
                break;
            }


            current = newlogic;
            return(old);
        }