Ejemplo n.º 1
0
 public void Switch()
 {
     if (gameState == null)
     {
         gameState = GameStateChangeEvent.Import();
     }
     gameState.Value = targetState;
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     gameState = GameStateChangeEvent.Import();
 }
 void OnEnable()
 {
     gameStates = GameStateChangeEvent.Import();
     gameStates.AddHandler(OnGameStateChange);
     OnGameStateChange();
 }