Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (!active)
        {
            return;
        }

        pressToContinue.SetActive(PlayerToTeamMap.TeamsAreReady());

        foreach (Player p in ReInput.players.Players)
        {
            if (p.GetButtonDown("Help"))
            {
                manager.ChangeToScreen(GameSetupManager.Screen.HELP);
            }
        }

        if (PlayerToTeamMap.TeamsAreReady())
        {
            foreach (Player p in ReInput.players.Players)
            {
                if (p.GetButtonDown("Confirm"))
                {
                    manager.ChangeToScreen(GameSetupManager.Screen.LEVELSELECT);
                }
            }
        }
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (!active)
        {
            return;
        }

        foreach (Player p in ReInput.players.Players)
        {
            if (p.GetButtonDown("Cancel"))
            {
                manager.ChangeToScreen(GameSetupManager.Screen.TEAMSELECT);
            }
        }

        cursor.position += (Vector3)player.GetAxis2DRaw("Move Horizontal", "Move Vertical") * cursorSpeed;
        cursor.position  = menuBounds.ClosestPoint(cursor.position);

        if (player.GetButtonDown("Confirm"))
        {
            PointerEventData data = new PointerEventData(eventSystem);
            data.position = cursor.position;
            List <RaycastResult> results = new List <RaycastResult>();
            raycaster.Raycast(data, results);
            if (results.Count > 0)
            {
                LoadSceneButtonController sceneLoader = results[0].gameObject.GetComponent <LoadSceneButtonController>();
                if (sceneLoader)
                {
                    sceneLoader.LoadNewScene();
                }
            }
        }
    }
Exemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        if (!active)
        {
            return;
        }

        foreach (Player p in ReInput.players.Players)
        {
            if (p.GetButtonDown("Cancel"))
            {
                manager.ChangeToScreen(GameSetupManager.Screen.TEAMSELECT);
            }
        }
    }
Exemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        if (!active)
        {
            return;
        }

        if (ReInput.players.GetPlayer(0).GetButtonDown("Cancel"))
        {
#if UNITY_EDITOR
            UnityEditor.EditorApplication.isPlaying = false;
#else
            Application.Quit();
#endif
            return;
        }

        if (ReInput.players.GetPlayer(0).GetAnyButtonDown())
        {
            manager.ChangeToScreen(GameSetupManager.Screen.TEAMSELECT);
        }
    }