Exemple #1
0
        public static PlayerScore GetByEnemyScore(PlayerScore playerScore)
        {
            if (playerScore == playerLeft)
                return playerRight;
            else if (playerScore == playerRight)
                return playerLeft;

            return null;
        }
Exemple #2
0
 void outputScore(ScoreOutput scoreOutput, PlayerScore score)
 {
     scoreOutput.wins.text = score.wins.ToString();
     scoreOutput.reflected.text = Mathf.Clamp((int)(((float)score.reflections / (float)GameScore.GetByEnemyScore(score).thrownshurikens) * 100), 0, 100) + "%";
     scoreOutput.catched.text =  Mathf.Clamp((int)(((float)score.catches / (float)GameScore.GetByEnemyScore(score).thrownshurikens) * 100), 0, 100) + "%";
     scoreOutput.itemhit.text = Mathf.Clamp((int)(((float)score.itemhits / (float)GameScore.GetGlobalScore().spawneditems) * 100), 0, 100) + "%";
     scoreOutput.forthit.text = Mathf.Clamp((int)(((float)score.forthits / (float)(score.thrownshurikens + score.reflections)) * 100), 0, 100) + "%";
     scoreOutput.dealtdamage.text = score.dealtdamage.ToString();
 }
Exemple #3
0
 public static void Clear()
 {
     global = new GloablScore();
     playerLeft = new PlayerScore();
     playerRight = new PlayerScore();
 }