RogueSharp
Show / Hide Table of Contents

Interface ICell

A class that defines a square on a Map with all of its associated properties

Inherited Members
System.IEquatable<RogueSharp.ICell>.Equals(RogueSharp.ICell)
Namespace: RogueSharp
Assembly: RogueSharp.dll
Syntax
public interface ICell : IEquatable<ICell>

Properties

| Improve this Doc View Source

IsExplored

Check if the Cell is flagged as ever having been explored by the player

Declaration
bool IsExplored { get; }
Property Value
Type Description
System.Boolean
Remarks

The explored property of a Cell can be used to track if the Cell has ever been in the field-of-view of a character controlled by the player This property will not automatically be updated based on FOV calculations or any other built-in functions of the RogueSharp library.

Examples

As the player moves characters around a Map, Cells will enter and exit the currently computed field-of-view This property can be used to keep track of those Cells that have been "seen" and could be used to show fog-of-war type effects when rendering the map

| Improve this Doc View Source

IsInFov

Check if the Cell is in the currently computed field-of-view For newly initialized maps a field-of-view will not exist so all Cells will return false Field-of-view must first be calculated by calling ComputeFov and/or AppendFov

Declaration
bool IsInFov { get; }
Property Value
Type Description
System.Boolean
Remarks

Field-of-view (FOV) is basically a calculation of what is observable in the Map from a given Cell with a given light radius

Examples

Field-of-view can be used to simulate a character holding a light source and exploring a Map representing a dark cavern Any Cells within the FOV would be what the character could see from their current location and lighting conditions

| Improve this Doc View Source

IsTransparent

Get the transparency of the Cell i.e. if line of sight would be blocked by this Cell

Declaration
bool IsTransparent { get; }
Property Value
Type Description
System.Boolean
Examples

A Cell representing an empty stone floor would be transparent A Cell representing a glass wall could be transparent (even though it may not be walkable) A Cell representing a solid stone wall would not be transparent

| Improve this Doc View Source

IsWalkable

Get the walkability of the Cell i.e. if a character could normally move across the Cell without difficulty

Declaration
bool IsWalkable { get; }
Property Value
Type Description
System.Boolean
Examples

A Cell representing an empty stone floor would be walkable A Cell representing a glass wall may not be walkable (even though it could be transparent) A Cell representing a solid stone wall would not be walkable

| Improve this Doc View Source

X

Gets the X location of the Cell starting with 0 as the farthest left

Declaration
int X { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Y

Y location of the Cell starting with 0 as the top

Declaration
int Y { get; }
Property Value
Type Description
System.Int32
  • Improve this Doc
  • View Source
RogueSharp © 2014-2020 Faron Bracy
Back to top