Example #1
0
    public Player(int playerId, GameObject playerSpaceShip, TilesGraph curentTile)
    {
        this.PlayerId        = playerId;
        this.PlayerSpaceShip = playerSpaceShip;

        if (curentTile != null)
        {
            MovePlayerToTile(curentTile);
        }
    }
Example #2
0
 public void AddConnection(TilesGraph tile, ConnectionType connectionType = ConnectionType.forward)
 {
     if (connectionType == ConnectionType.forward)
     {
         _forwardConnections.Add(tile);
     }
     else
     {
         _backwardsConnections.Add(tile);
     }
 }
Example #3
0
 public void MovePlayerToTile(TilesGraph tile)
 {
     CurentTile = tile;
     PlayerSpaceShip.transform.position = tile.transform.position + Vector3.up;
 }