Interface IPositionable
An interface describing an object which has a position on a grid and can move around.
Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
public interface IPositionable
Remarks
Objects which have a position can implement this interface, which can be useful to make such objects easily compatible with automatically syncing spatial map classes like AutoSyncMultiSpatialMap<T>.
Other algorithms may be able to make use of this interface as well if all they need is an object with a position.
Properties
Position
The position of the object.
Declaration
Point Position { get; set; }
Property Value
Type | Description |
---|---|
Point |
Events
PositionChanged
Event which should be fired when the object's position changes.
Declaration
event EventHandler<ValueChangedEventArgs<Point>> PositionChanged
Event Type
Type | Description |
---|---|
EventHandler<ValueChangedEventArgs<Point>> |
PositionChanging
Event which should be fired right before the object's position changes.
Declaration
event EventHandler<ValueChangedEventArgs<Point>> PositionChanging
Event Type
Type | Description |
---|---|
EventHandler<ValueChangedEventArgs<Point>> |