void DisplayErrorCross()
 {
     if (leftGame.score - 10 >= 0)
     {
         leftGame.UpdateScore(-10);
         totalScore += 10;
     }
     else if (leftGame.score - 10 < 0)
     {
         if (!errorCross.gameObject.activeInHierarchy)
         {
             errorCross.gameObject.SetActive(true);
             errorCross.transform.localPosition = new Vector3(-3f, errorCross.transform.localPosition.y, errorCross.transform.localPosition.z);
         }
     }
     if (rightGame.score - 10 >= 0)
     {
         rightGame.UpdateScore(-10);
         totalScore += 10;
     }
     else if (rightGame.score - 10 < 0)
     {
         if (!errorCross.gameObject.activeInHierarchy)
         {
             errorCross.gameObject.SetActive(true);
             errorCross.transform.localPosition = new Vector3(3f, errorCross.transform.localPosition.y, errorCross.transform.localPosition.z);
         }
     }
 }
Beispiel #2
0
    public void Hit()
    {
        if (!isActive)
        {
            return;
        }

        if (mood == Mood.Negative)
        {
            whacASphere.UpdateScore(-10);
        }
        else if (mood == Mood.Positive)
        {
            whacASphere.UpdateScore(10);
        }
        DeactivateSphere();
    }