示例#1
0
    public void updateScore(string playerName, int score, PlayerColor playerColor)
    {
        Color color = PlayerMeta.convertPlayerColorToHeadColor(playerColor);

        playerText.text  = playerName;
        playerText.color = color;

        scoreText.text  = score.ToString();
        scoreText.color = color;
    }
示例#2
0
 public void setPlayerColor(PlayerColor newColor)
 {
     playerColor = newColor;
     head.GetComponent <SpriteRenderer>().color = PlayerMeta.convertPlayerColorToHeadColor(newColor);
     tail.setTailColor(PlayerMeta.convertPlayerColorToTailColor(newColor));
 }