Ejemplo n.º 1
0
 public void PlayerSelectDone()
 {
     selectingPlayers = false;
     PlayerInputTranslator.SetP1P2(
         (Player)(Mathf.RoundToInt(player1Selector.value)),
         (Player)(Mathf.RoundToInt(player2Selector.value)));
     ShowLevelSelect();
 }
Ejemplo n.º 2
0
    private void confirm()
    {
        if ((Math.Abs(P1Select.transform.position.x - OnPosition) < .1 && Math.Abs(P2Select.transform.position.x - OffPosition) < .1) ||
            (Math.Abs(P1Select.transform.position.x - OffPosition) < .1 && Math.Abs(P2Select.transform.position.x - OnPosition) < .1))
        {
            if (P1Select.transform.position.x == OnPosition)
            {
                // P1 can move left, so they must be off bot
                PlayerInputTranslator.SetP1P2(Player.ON, Player.OFF);
            }
            else
            {
                PlayerInputTranslator.SetP1P2(Player.OFF, Player.ON);
            }

            SceneController.GetComponent <OptoinsSceenController>().StopPlayerSelect();
            SceneController.GetComponent <OptoinsSceenController>().StartLevelSelect();
        }
    }