Show / Hide Table of Contents

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

View Source

Position

The position of the object.

Declaration
Point Position { get; set; }
Property Value
Type Description
Point

Events

View Source

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>>
View Source

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>>

Extension Methods

PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>?)
PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>?, EventHandler<ValueChangedEventArgs<TProperty>>?)
  • View Source
In this article
Back to top Generated by DocFX