Esempio n. 1
0
 //Button input override
 public override void ButtonPress(int player, InputHandler.Buttons button)
 {
     if (roundInProgress)
     {
         string bInput = button.ToString().ToLower();
         if (playerZones [player].currentOrder < playerZones [player].currentRound.Count)
         {
             if (playerZones [player].buttons [playerZones [player].currentOrder].CheckButton(bInput))
             {
                 playerZones [player].ButtonPressed(true);
                 GameHandler.instance.players [player].pointScore++;
             }
             else
             {
                 playerZones [player].ButtonPressed(false);
                 playerZones [player].currentOrder = 99;
                 GameHandler.instance.players [player].pointScore--;
             }
         }
         else if (!playerZones [player].finished)
         {
             GameHandler.instance.players [player].pointScore--;
         }
     }
 }
Esempio n. 2
0
    public override void ButtonPress(int player, InputHandler.Buttons button)
    {
        bool pass = false;

        if (buttonBeingSucked != null)
        {
            if (GameHandler.instance.players [player].isPlaying && !playerHUDS [player].finishedInput)
            {
                if (buttonBeingSucked.buttonText.text.ToLower() == button.ToString().ToLower())
                {
                    pass = true;
                }
                else
                {
                    pass = false;
                }
                if (pass)
                {
                    playerHUDS [player].ShowFeedback(buttonBeingSucked.buttonImage.color, Color.black, buttonBeingSucked.buttonText.text);
                    GameHandler.instance.players [player].pointScore++;
                }
                else
                {
                    playerHUDS [player].ShowFeedback(Color.white, Color.red, "X");
                }
            }
        }
    }