这里先补充一个得分管理器: 玩家得分设置成一个静态变量: public class ScoreManager : MonoBehaviour { public static int score; // 玩家得分 Text text; // UI void Awake () { text = GetComponent <Text> (); //开始时候重置得分 score = 0; } void Update () { // Set the displayed text to be the wo…