Exemplo n.º 1
0
    public void OnNextClick( )
    {
        int _currentStageIndex = (int)m_creatingStage;

        creators[_currentStageIndex].SetActive(false);
        if (_currentStageIndex == creators.Length - 1)
        {
            // now we has came the last stage of creating
            // the player name should not be null
            if (!PlayerData.GetInstance().GetPlayerName().Equals(""))
            {
                // The player has completed the class creating, and should be leaded to the game
                PlayerData.GetInstance().SaveAll();
                //move the camera
                MovementPath mmPath = Camera.main.GetComponent <MovementPath>();
                mmPath.enabled = true;
                mmPath.OnReach = JumpToGame;
                previousStageButton.gameObject.SetActive(false);
                nextStageButton.gameObject.SetActive(false);
            }
            return;
        }
        else
        {
            m_creatingStage = (CreatingStage)(++_currentStageIndex);
            creators[_currentStageIndex].SetActive(true);
            m_initFuncs[_currentStageIndex]();
        }
    }
Exemplo n.º 2
0
    public void OnPreviousClick( )
    {
        int _currentStageIndex = (int)m_creatingStage;

        creators[_currentStageIndex].SetActive(false);
        if (_currentStageIndex == 0)
        {
            /* Return to the Main */
            print("Return to main!");
            // return to "start" scene

            return;
        }
        else
        {
            m_initFuncs[_currentStageIndex]();
            m_creatingStage = (CreatingStage)(--_currentStageIndex);
            creators[_currentStageIndex].SetActive(true);
        }
    }
Exemplo n.º 3
0
    public void OnPreviousClick( )
    {
        int _currentStageIndex = (int)m_creatingStage;
        creators[_currentStageIndex].SetActive(false);
        if (_currentStageIndex == 0)
        {
            /* Return to the Main */
            print("Return to main!");
            // return to "start" scene

            return;
        }
        else
        {
            m_initFuncs[_currentStageIndex]();
            m_creatingStage = (CreatingStage)(--_currentStageIndex);
            creators[_currentStageIndex].SetActive(true);
        }
    }
Exemplo n.º 4
0
 public void OnNextClick( )
 {
     int _currentStageIndex = (int)m_creatingStage;
     creators[_currentStageIndex].SetActive(false);
     if (_currentStageIndex == creators.Length - 1)
     {
         // now we has came the last stage of creating
         // the player name should not be null
         if (!PlayerData.GetInstance().GetPlayerName().Equals(""))
         {
             // The player has completed the class creating, and should be leaded to the game
             PlayerData.GetInstance().SaveAll();
             //move the camera
             MovementPath mmPath = Camera.main.GetComponent<MovementPath>();
             mmPath.enabled = true;
             mmPath.OnReach = JumpToGame;
             previousStageButton.gameObject.SetActive(false);
             nextStageButton.gameObject.SetActive(false);
         }
         return;
     }
     else
     {
         m_creatingStage = (CreatingStage)(++_currentStageIndex);
         creators[_currentStageIndex].SetActive(true);
         m_initFuncs[_currentStageIndex]();
     }
 }