示例#1
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(gameObject);
            return;
        }

        recordAge = recordAge.AddYear(PlayerPrefs.GetInt("recYear", 0));
        recordAge = recordAge.AddMonth(PlayerPrefs.GetInt("recMonth", 0));

        GameManager.OnFailGame += CheckRecord;
        GameManager.OnPause    += Save;
    }