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); } }
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);*/ }