Wiki
Clone wikiRogueSharp / RogueSharp / Cell / README
Cell Class
A class that defines a square on a Map with all of its associated properties
Inheritance Hierarchy
SystemObject
RogueSharpCell
Namespace: RogueSharp
Assembly:
Syntax
publicclassCell
The Cell type exposes the following members.
Constructors
Name | Description |
---|---|
Cell(Int32, Int32, Boolean, Boolean, Boolean) | Construct a new unexplored Cell located at the specified x and y location with the specified properties |
Cell(Int32, Int32, Boolean, Boolean, Boolean, Boolean) | Construct a new Cell located at the specified x and y location with the specified properties |
Properties
Name | Description |
---|---|
IsExplored | Check if the Cell is flagged as ever having been explored by the player |
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 |
IsTransparent | Get the transparency of the Cell i.e. if line of sight would be blocked by this Cell |
IsWalkable | Get the walkability of the Cell i.e. if a character could normally move across the Cell without difficulty |
X | Gets the X location of the Cell starting with 0 as the farthest left |
Y | Y location of the Cell starting with 0 as the top |
Methods
Name | Description |
---|---|
Equals(Object) | Determines whether two Cell instances are equal (Overrides ObjectEquals(Object).) |
Equals(Cell) | Determines whether two Cell instances are equal |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
GetHashCode | Gets the hash code for this object which can help for quick checks of equality or when inserting this Cell into a hash-based collection such as a Dictionary or Hashtable (Overrides ObjectGetHashCode.) |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
ToString | Provides a simple visual representation of the Cell using the following symbols: - . : Cell is transparent and walkable - s : Cell is walkable (but not transparent) - o : Cell is transparent (but not walkable) - # : Cell is not transparent or walkable (Overrides ObjectToString.) |
ToString(Boolean) | Provides a simple visual representation of the Cell using the following symbols: - % : Cell is not in field-of-view - . : Cell is transparent, walkable, and in field-of-view - s : Cell is walkable and in field-of-view (but not transparent) - o : Cell is transparent and in field-of-view (but not walkable) - # : Cell is in field-of-view (but not transparent or walkable) |
Operators
Name | Description |
---|---|
Equality | Determines whether two Cell instances are equal |
Inequality | Determines whether two Cell instances are not equal |
See Also
Reference
[17]: 2014-2016 Faron Bracy
Updated