// Start is called before the first frame update void Awake() { MaxKeyNum = FindObjectsOfType <Key>().Length; KeyNum = 0; OnCollectKey += (() => SetKeyNum()); }
private void OnDisable() { OnCollectKey = null; }