Class MovePositionables
- Namespace
- AlphaFramework.Editor.World.Commands
- Assembly
- AlphaFramework.Editor.dll
Moves one or more Positionable<TCoordinates>s.
public class MovePositionables : SimpleCommand, IUndoCommand
- Inheritance
-
objectMovePositionables
- Implements
- Inherited Members
Constructors
MovePositionables(IEnumerable<Positionable<Vector2>>, Vector2, Action?)
Creates a new command for moving one or more Positionable<TCoordinates>s.
public MovePositionables(IEnumerable<Positionable<Vector2>> positionables, Vector2 target, Action? callback = null)
Parameters
positionablesIEnumerable<Positionable<Vector2>>The Positionable<TCoordinates>s to be moved.
targetVector2The terrain position to move the entities to.
callbackActionOptional callback to be invoked after moving entities (e.g., to update pathfinding).
Methods
OnExecute()
Set the changed Positions.
protected override void OnExecute()
OnUndo()
Restore the original Positions.
protected override void OnUndo()