private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } GameObject gameController = GameObject.FindGameObjectWithTag("GameController"); gameManager = gameController.GetComponent <GameManager>(); gameState = gameController.GetComponent <GameState>(); }