Exemplo n.º 1
0
 //Helper function to move objects from tile to tile
 public void MoveCharacterToTileCoordinate(CharacterScript character, TileScript newTile)
 {
     character.currentTile.SetTileInhabitant(null);
     character.currentTile = newTile;
     newTile.SetTileInhabitant(character);
     Vector3 newPosition = GetWorldPositionFromTileCoordinate(newTile.tileCoordinate.x,newTile.tileCoordinate.y);
     newPosition.z = character.gameObject.transform.position.z;
     character.gameObject.transform.position = newPosition;
 }