public void UpdatePlayerFieldOfView() { Doolayer player = Game.Player; ComputeFov(player.X, player.Y, player.Awareness, true); foreach (Cell cell in GetAllCells()) { if (IsInFov(cell.X, cell.Y)) { SetCellProperties(cell.X, cell.Y, cell.IsTransparent, cell.IsWalkable, true); } } }
public void AddPlayer(Doolayer player) { Game.Player = player; SetIsWalkable(player.X, player.Y, false); UpdatePlayerFieldOfView(); }