Ejemplo n.º 1
0
    public void ShowMainMenu()
    {
        LoadMenuLevel();
        GamePanel.SetActive(false);
        PauseMenu.SetActive(false);
        HelpPanel.SetActive(false);
        LevelPickerPanel.SetActive(false);
        LevelPickerContainerContainer.SetActive(false);
        //LevelPickerContainerFunContainer.SetActive(false);
        //LevelPickerContainerCommunityContainer.SetActive(false);
        LevelFailed.SetActive(false);
        LevelComplete.SetActive(false);

        MainMenu.SetActive(true);
        SetCameraPosition(true);

        SetCameraTouchX(false);

        if (MainMenu.activeSelf)
        {
            //if (!EventSystem.current.alreadySelecting)
            EventSystem.current.SetSelectedGameObject(PlayButton);
        }

        _canStartMoving = true;
    }
Ejemplo n.º 2
0
    private void FinishLevel()
    {
        _canStartMoving = false;
        AppController.Instance.Save();
        var message = LevelComplete.transform.Find("Message").GetComponent <TMPro.TMP_Text>();

        message.text = CurrentLevelFinishMessage;
        LevelComplete.SetActive(true);
        EventSystem.current.SetSelectedGameObject(LevelCompleteButton);
        Time.timeScale = 0;
    }
Ejemplo n.º 3
0
 public void HideMainMenu()
 {
     GamePanel.SetActive(false);
     PauseMenu.SetActive(false);
     MainMenu.SetActive(false);
     HelpPanel.SetActive(false);
     LevelPickerPanel.SetActive(false);
     LevelFailed.SetActive(false);
     LevelComplete.SetActive(false);
     SetCameraPosition(false);
 }
Ejemplo n.º 4
0
 public virtual void CompleteLevel()
 {
     LevelComplete.SetActive(true);
     gameRunning = false;
 }
Ejemplo n.º 5
0
    public static void AdvanceTutorial()
    {
        Tutorial t = (Tutorial)self;

        if (sLock)
        {
            sLock = false;
            DoSwitching(t.wText, t.sText, t.goal, GetGoalPosition(++t.currentPosition), true, t);             // Move forward complete , now move backward
        }
        else if (turnLock)
        {
            turnLock = false;
            DoSwitching(t.sText, t.turnText, t.goal, GetGoalPosition(++t.currentPosition), true, t);             // Move backward complete, now move backward
        }
        else if (beamLock)
        {
            if (t.currentPosition == 3)               // Rotate ship complete, now turn on the tractor beam
            {
                beamLock = false;
                DoSwitching(t.turnText, t.beamText, t.goal, Vector3.zero, true, t);
                t.text.text         = "Turn on the tractor beam";
                checkBeam           = true;
                Goal.activationType = Goal.ActivationType.None;
            }
            else                 // Rotate ship complete
            {
                DoSwitching(null, null, t.goal, GetGoalPosition(++t.currentPosition), true, t);
                Goal.activationType = Goal.ActivationType.Player;
            }
        }
        else if (fireLock)
        {
            if (t.currentPosition == 3)               // Turned on tractor beam, now move junk into goal
            {
                DoSwitching(t.beamText, t.tractorText, t.goal, GetGoalPosition(++t.currentPosition), true, t);
                t.tutorialJunk      = (GameObject)Instantiate(t.junkPrefab, new Vector3(10, 0, 0), t.junkPrefab.transform.rotation);
                t.text.text         = "Use the Tractor Beam to move the Space Junk into the highlighted area";
                checkBeam           = false;
                Goal.activationType = Goal.ActivationType.Junk;
            }
            else                 // Moved junk into goal, now firing junk away
            {
                DoSwitching(t.tractorText, t.fireText, t.goal, Vector3.zero, true, t);
                Instantiate(t.junkPrefab, new Vector3(0, 0, 0), t.junkPrefab.transform.rotation);
                fireLock            = false;
                fireCheck           = true;
                t.text.text         = "Use the Tractor Beam to Fire the Space Junk away";
                Goal.activationType = Goal.ActivationType.None;
            }
        }
        else
        {
            if (t.currentPosition == 4)               // Fired junk away, now fire into goal
            {
                t.StartCoroutine(t.WaitToSwitch(t));
            }
            else                 // Fired into goal, show end screen
            {
                LevelComplete.SetActive(true);
            }
        }
    }
Ejemplo n.º 6
0
    // public ShowScore showScore;

    public void CompleteLevel()
    {
        Debug.Log("Level Complete!!");

        LevelComplete.SetActive(true);
    }