Exemplo n.º 1
0
        private void SetPlayerSpawnedImmediately(GameObject playerGo, Vector2Int cell, Vector2 offset)
        {
            Mob player = playerGo.GetComponent <Mob>();

            player.Cell       = cell;
            player.CellOffset = offset;
            //player.Spawned = true;

            //if (player.IsLocalPlayer)
            if (player.isLocalPlayer)
            {
                PlayerActionController _controller = FindObjectOfType <PlayerActionController>();
                _controller.SetLocalPlayer(player);
            }
        }
Exemplo n.º 2
0
        public override void OnGameLoaded(IServerDataProvider controller)
        {
            WasLoaded = true;

            _visionController = FindObjectOfType <VisionController>();

            if (_visionController == null)
            {
                Debug.LogError("VisionController not found!");
                Debug.Break();
            }

            _grid = FindObjectOfType <Grid>();
            _currentController = this;

            /*FindLocalPlayer();
             *
             * _visionController.SetViewerPosition(_localPlayerMob);*/
        }