private void Awake() { CommandValidator = new CommandValidator(this); Cells = FindObjectOfType <Cells>(); Cells.RegisterCellLifecycleObserver(UI); Camera = FindObjectOfType <HexCamera>(); }
/// <summary> /// Called on the server once all players are ready /// </summary> public void StartGameServer() { SetupPlayers(); Data.NextTurn(); Data.SetGameStarted(); Camera.ScrollTo(Grid.GetStartLocation(gamePlayer.ID)); Cells.RegisterCellLifecycleObserver(Data); Debug.Log("Game started for server"); foreach (var player in room.GamePlayers) { player.RpcNotifyGameStart(); } }