public Actor(Point location, int health, IFov fov) : base(location) { MaxHealth = health; Health = MaxHealth; Fov = fov; Inventory = new List <GameObject>(); }
private void DrawMap(IFov fov) { Cursor.Position = new SadRogue.Primitives.Point(0, 0); foreach (var cell in map.Cells()) { var visibility = GetVisibility(cell, fov); this.Draw(cell, visibility, game.HasAmulet); } }
private void DrawGameObjects(IEnumerable <GameObject> gameObjects, IFov fov) { foreach (var gameObject in gameObjects) { var cell = map.GetCellAt(gameObject.Location); var visibility = GetVisibility(cell, fov); this.Draw(gameObject, visibility); } }
private Visibility GetVisibility(ICell cell, IFov fov) { if (showEverything || fov.IsInFov(cell.Location.X, cell.Location.Y)) { return(Visibility.InFov); } else if (map.IsDiscovered(cell.Location)) { return(Visibility.Discovered); } return(Visibility.Hidden); }
public virtual void ReplaceFov(IFov newFov) { Fov = newFov; }
public Monster(MonsterType type, Point location, IFov fov) : base(location, GetStartingHealth(type), fov) { MonsterType = type; }