Пример #1
0
    }     //end f'n void Enable (TutorialEnum)

    /**A function to disable a specified tutorial gameobject*/
    public void Disable(TutorialEnum tutorial)
    {
        switch ((int)tutorial)
        {
        case (int)TutorialEnum.MOVEMENT:
        {
//				this.Disable_MovementTutorial ();
            this.m_MovementTutorial.SetActive(false);
            break;
        }                //end case movement tutorial

        case (int)TutorialEnum.FIRE_SPELL:
        {
//				this.Disable_FireSpellTutorial ();
            this.m_FireSpellTutorial.SetActive(false);
            break;
        }                //end case fire spell tutorial

        case (int)TutorialEnum.HOTKEYS:
        {
//				this.Disable_HotkeysTutorial ();
            this.m_HotKeysTutorial.SetActive(false);
            break;
        }                //end case hotkeys tutorial

        case (int)TutorialEnum.CONSUME_HOTKEYED_ITEMS:
        {
//				this.Disable_ConsumeHotkeyedItemTutorial ();
            this.m_ConsumeHotKeyedItemTutorial.SetActive(false);
            break;
        }                //end case consumed hotkeyed item tutorial

        default:
        {
            //Impossible
            break;
        } //end case default
        } //end switch
//		this.m_PlayerCastSpell.m_MenuOpen = false;
    }     //end f'n void Disable (TutorialEnum)
Пример #2
0
    /**A function to enable a given tutorial. Disables all other tutorials.*/
    public void Enable(TutorialEnum tutorial)
    {
        PlayerCastSpell.m_MenuOpen = true;
        switch ((int)tutorial)
        {
        case (int)TutorialEnum.MOVEMENT:
        {
            this.m_MovementTutorial.SetActive(true);
            foreach (TutorialEnum enum_val in System.Enum.GetValues(typeof(TutorialEnum)))
            {
                //if the enum value in question is the same as the one who called the function, skip.
                if (tutorial == enum_val)
                {
                    continue;
                }                        //end if

                //ensure all other tutorials are disabled
                this.Disable(enum_val);
            }            //end foreach
            break;
        }                //end case movement tutorial

        case (int)TutorialEnum.FIRE_SPELL:
        {
            this.m_FireSpellTutorial.SetActive(true);
            foreach (TutorialEnum enum_val in System.Enum.GetValues(typeof(TutorialEnum)))
            {
                //if the enum value in question is the same as the one who called the function, skip.
                if (tutorial == enum_val)
                {
                    continue;
                }                        //end if

                //ensure all other tutorials are disabled
                this.Disable(enum_val);
            }            //end foreach
            break;
        }                //end case fire spell tutorial

        case (int)TutorialEnum.HOTKEYS:
        {
            this.m_HotKeysTutorial.SetActive(true);
            foreach (TutorialEnum enum_val in System.Enum.GetValues(typeof(TutorialEnum)))
            {
                //if the enum value in question is the same as the one who called the function, skip.
                if (tutorial == enum_val)
                {
                    continue;
                }                        //end if

                //ensure all other tutorials are disabled
                this.Disable(enum_val);
            }            //end foreach
            break;
        }                //end case hotkeys tutorial

        case (int)TutorialEnum.CONSUME_HOTKEYED_ITEMS:
        {
            this.m_ConsumeHotKeyedItemTutorial.SetActive(true);
            foreach (TutorialEnum enum_val in System.Enum.GetValues(typeof(TutorialEnum)))
            {
                //if the enum value in question is the same as the one who called the function, skip.
                if (tutorial == enum_val)
                {
                    continue;
                }                        //end if

                //ensure all other tutorials are disabled
                this.Disable(enum_val);
            }            //end foreach
            break;
        }                //end case consumed hotkeyed item tutorial

        default:
        {
            //Impossible
            break;
        } //end case default
        } //end switch
    }     //end f'n void Enable (TutorialEnum)