|
@ -23,23 +23,21 @@ public class GameOverScreen : MonoBehaviour |
|
|
ScoreStack blueScoreStack = GameObject.Find("/ScoreStackBlue").GetComponent<ScoreStack>(); |
|
|
ScoreStack blueScoreStack = GameObject.Find("/ScoreStackBlue").GetComponent<ScoreStack>(); |
|
|
ScoreStack redScoreStack = GameObject.Find("/ScoreStackRed").GetComponent<ScoreStack>(); |
|
|
ScoreStack redScoreStack = GameObject.Find("/ScoreStackRed").GetComponent<ScoreStack>(); |
|
|
|
|
|
|
|
|
|
|
|
_gameOverMessage.text = "<color=blue>" + blueScoreStack.Score + "</color><color=white> to </color><color=red>" + redScoreStack.Score + "</color>\n"; |
|
|
if (blueScoreStack.Score > redScoreStack.Score) |
|
|
if (blueScoreStack.Score > redScoreStack.Score) |
|
|
{ |
|
|
{ |
|
|
_gameOverMessage.color = Color.blue; |
|
|
_gameOverMessage.text += "<color=blue>BLUE TEAM WINS!</color>"; |
|
|
_gameOverMessage.text = "BLUE TEAM WINS!\n" + blueScoreStack.Score + " to " + redScoreStack.Score; |
|
|
|
|
|
} |
|
|
} |
|
|
else if (redScoreStack.Score > blueScoreStack.Score) |
|
|
else if (redScoreStack.Score > blueScoreStack.Score) |
|
|
{ |
|
|
{ |
|
|
_gameOverMessage.color = Color.red; |
|
|
_gameOverMessage.text += "<color=red>RED TEAM WINS!</color>"; |
|
|
_gameOverMessage.text = "RED TEAM WINS!\n" + redScoreStack.Score + " to " + blueScoreStack.Score; |
|
|
|
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
_gameOverMessage.color = Color.white; |
|
|
_gameOverMessage.text += "<color=white>TIE!</color>"; |
|
|
_gameOverMessage.text = "TIE!\n" + redScoreStack.Score + " to " + blueScoreStack.Score; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
_gameOverMessage.text += "\n\nPress 'R' to replay"; |
|
|
_gameOverMessage.text += "<color=white>\n\nPress 'R' to replay</color>"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|