Namespace GoRogue
Classes
AdjacencyRule
Class representing a method for determining which coordinates are adjacent to a given coordinate, and which directions those neighbors are in. Cannot be instantiated -- premade static instances are provided.
AdvancedLayeredSpatialMap<T>
A more complex version of LayeredSpatialMap<T> that does not require the items in it to implement IHasID, instead requiring the specification of a custom System.Collections.Generic.IEqualityComparer<T> to use for hashing and comparison of items.
AdvancedMultiSpatialMap<T>
A more complex version of MultiSpatialMap<T> that does not require the items in it to implement IHasID, instead requiring the specification of a custom System.Collections.Generic.IEqualityComparer<T> to use for hashing and comparison of items.
AdvancedSpatialMap<T>
A more complex version of SpatialMap<T> that does not require the items in it to implement IHasID, instead requiring the specification of a custom System.Collections.Generic.IEqualityComparer<T> to use for hashing and comparison of items.
BoundedRectangle
This class defines a rectanglar area, whose position is automatically "locked" to being inside a rectangular bounding box as it is changed. A typical use might be keeping track of a camera's view area.
ComponentContainer
A class implementing a flexible, type-based system for adding components to objects. To utilize it, you can either give your object that you want to have components a ComponentContainer field, or if you wish to avoid the extra field to access components, you may either inherit from ComponentContainer, or have your object implement IHasComponentsvia a backing field of type ComponentContainer.
Direction
Represents the concept of a "direction" on a grid, and "defines" the coordinate plane GoRogue uses via the YIncreasesUpward flag. Interacts with Coord and other supported library's equivalent types to allow easy translation of positions in a direction, and contains numerous helper functions for retrieving directions in various orders, getting direction closest to a line, etc.
DisjointSet
Basic representation of a disjoint set data structure.
Distance
Class representing methods of calculating distance on a grid. You cannot create instances of this class using a constructor -- instead this class contains static instances representing the various distance calculations.
Effect<TriggerArgs>
Class designed to represent any sort of in-game effect. This could be anything from a simple physical damage effect to a heal effect or permanent effects. These might include AOE effects, damage over time effects, or even potentially a special effect that simply boosts a stat.
EffectArgs
Default argument for any effect. Any class that is used as the template argument for an effect must inherit from this class.
EffectTrigger<TriggerArgs>
Represents an "event" that can automatically trigger and manage one or more Effect<TriggerArgs> instances, and acts as part of the implementation of duration in Effect.
FOV
Implements the capability to calculate a grid-based field of view for a map.
IDGenerator
Class designed as a helper for situations where you need to generate and assign a unique integer to each instance of a class, eg. for a class implementing IHasID.
ItemEventArgs<T>
Event arguments for spatial map events pertaining to an item (ItemAdded, ItemRemoved, etc.)
ItemMovedEventArgs<T>
Event arguments for spatial maps ItemMoved event.
LayeredSpatialMap<T>
ISpatialMap<T> implementation that can be used to efficiently represent multiple "layers" of objects, with each layer represented as an ISpatialMap<T> instance. It provides the regular spatial map functionality, as well as adds layer masking functionality that allow functions to operate on specific layers only.
LayerMasker
Allows convenient interpretation and creation of layer masks (bit-masks) that can be used to interact with LayeredSpatialMap<T> and Map.
Lines
Provides implementations of various (line-drawing) algorithms which are useful for for generating points closest to a line between two points on a grid.
MathHelpers
Static class consisting of mathematical "helper" functions and constants -- things like angle unit conversions, and other helpful functions.
MultiSpatialMap<T>
An implementation of ISpatialMap<T> that allows multiple items to reside at any given position at the same time. If you wish to allow only one item to reside at each location at a time, use SpatialMap<T> instead. For a situation involving different categories or layers of items, you may want to look at LayeredSpatialMap<T>.
Radius
Class representing different shapes that define the concept of a radius on a grid. You cannot create instances of this class using a constructor -- instead, this class contains static instances representing the various radius shapes.
RadiusAreaProvider
Class containing functions capable of returning all unique positions inside of a given radius and (optional) bounds.
Reflection
Contains a series of functions that complement the reflection capabilities of C#, to conveniently allow for things like iterating over all types that a given type can be casted to.
SpatialMap<T>
An implementation of ISpatialMap<T> that allows only one item at each position at a time. If you need multiple items to be able to reside at one location at the same time, use MultiSpatialMap<T> or LayeredSpatialMap<T> instead.
Utility
Static class containing extension helper methods for various built-in C# classes, as well as a static helper method for "swapping" references.
Structs
Coord
A structure that represents a standard 2D grid coordinate. Provides numerous static functions, operators, and implicit converstions that enable common grid/position-related math and operations, as well as enable interoperability with position representations from other libraries.
Rectangle
Represents a rectangle in terms of grid squares. Provides numerous static functions that enable creation and common operations involving rectangles, as well as implicit conversion operators that enable interoperability with rectangle representations from other libraries.
Interfaces
IHasComponents
Interface for an object that has components that can be added, removed, checked for, and retrieved by type. Typically, you would implement this via a backing field of type ComponentContainer, which implements the logic for these functions.
IHasID
Interface for a class that has an ID value, typically used for items in a spatial map, or generally for purposes of hashing.
IHasLayer
Interface to be implemented by objects that will be added to a LayeredSpatialMap<T>.
IReadOnlyDisjointSet
Read-only representation of DisjointSet
IReadOnlyFOV
Read-only interface of the FOV class.
IReadOnlyLayeredSpatialMap<T>
Interface implementing only the read-only functions for LayeredSpatialMap<T>/ AdvancedLayeredSpatialMap<T>.
IReadOnlyRadiusAreaProvider
Read-only interface of RadiusAreaProvider.
IReadOnlySpatialMap<T>
Implements the read-only interface of ISpatialMap<T>.
ISortedComponent
Optional interface that may be implemented by components to ensure they are returned in a specific order when GetComponent<T>() is called. Components are not required to implement this interface, however components that do not will be returned after any components that do.
ISpatialMap<T>
Interface common to spatial map implementations provided with GoRogue, which are designed to be a convenient way to store items that reside on a map. TLDR; If you're about to use a List to store all the objects on a map, consider using a (GoRogue-provided) ISpatialMap implementation instead.
ISpatialTuple<T>
Interface specifying return type for item-location pairs in spatial maps.
Enums
AdjacencyRule.Types
Enum representing AdjacencyRule types. Each AdjacencyRule instance has a Type field which contains the corresponding value from this enum. Useful for easy mapping of AdjacencyRule types to a primitive type (for cases like a switch statement).
Direction.Types
Enum representing Direction types. Each Direction instance has a Type field which contains the corresponding value from this enum. Useful for easy mapping of Direction types to a primitive type (for cases like a switch statement).
Distance.Types
Enum representing Distance types. Each Distance instance has a Type field which contains the corresponding value from this enum. Useful for easy mapping of Distance types to a primitive type (for cases like a switch statement).
Lines.Algorithm
Various supported line-drawing algorithms.
Radius.Types
Enum representing Radius types. Each Radius instance has a Type field which contains the corresponding value from this enum. Useful for easy mapping of Radius types to a primitive type (for cases like a switch statement).