示例#1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         DestroyImmediate(this.gameObject);
     }
 }
示例#2
0
 public void Detach()
 {
     _gameState = null;
 }
示例#3
0
 public void Attach(GameStateSingleton observer)
 {
     _gameState = observer;
 }