public CavernaPlayerTilesManager(CavernaPlayer player) { _player = player; _doubleFencedPastures = new List<Vector2>(); TilesToPlace = new List<string>(); CaveSpaces[0, 0] = TileTypes.StartingTile; CaveSpaces[0, 1] = TileTypes.Cavern; }
private void SetPlayerPlaceTiles(CavernaPlayer player, List<string> tileList) { bool isCave = tileList[0] == TileTypes.Cavern || tileList[0] == TileTypes.DeepTunnel || tileList[0] == TileTypes.OreMine || tileList[0] == TileTypes.RubyMine || tileList[0] == TileTypes.Tunnel; List<Vector2> validSpots = player.SetTilesToPlace(tileList); _serverSocket.SetPlaceTile(player.ID, tileList[0], validSpots, isCave); }
private void SetPlayerPlaceTile(CavernaPlayer player, string tile) { SetPlayerPlaceTiles(player, new List<string> {tile}); }
private void ReturnControlToPlayer(CavernaPlayer player) { if (player.RearrangeAnimalsCheck()) return; else if (_isHarvest) RunHarvest(); else if (_activeActionSpaceID > 0) GetActions("playerID", _activeActionSpaceID); else { foreach (CavernaActionSpace space in _actionSpaces) { if (!space.IsUsed) _serverSocket.SetActionSpaceActive(space.ID); } } }
public void CollectResources(CavernaPlayer player, int actionSpaceID) { CavernaActionSpace actionSpace = _actionSpaces.Find(x => x.ID == actionSpaceID); actionSpace.CollectResources(_players[0], _serverSocket); }