void UpdatePlayerFieldOfView() { GroundMap.ComputeFov((int)Player.transform.position.x, (int)Player.transform.position.y, 8, true); ItemsMap.ComputeFov((int)Player.transform.position.x, (int)Player.transform.position.y, 8, true); foreach (var cell in GroundMap.GetAllCells()) { if (GroundMap.IsInFov(cell.X, cell.Y)) { GroundMap.SetCellProperties(cell.X, cell.Y, cell.IsTransparent, cell.IsWalkable, true); } } foreach (var cell in ItemsMap.GetAllCells()) { if (ItemsMap.IsInFov(cell.X, cell.Y)) { ItemsMap.SetCellProperties(cell.X, cell.Y, cell.IsTransparent, cell.IsWalkable, true); } } }