Exemple #1
0
        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);
                }
            }
        }
Exemple #2
0
 public void AddPlayer(Doolayer player)
 {
     Game.Player = player;
     SetIsWalkable(player.X, player.Y, false);
     UpdatePlayerFieldOfView();
 }