Esempio n. 1
0
        private void Awake()
        {
            CommandValidator = new CommandValidator(this);

            Cells = FindObjectOfType <Cells>();
            Cells.RegisterCellLifecycleObserver(UI);

            Camera = FindObjectOfType <HexCamera>();
        }
Esempio n. 2
0
        /// <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();
            }
        }