Table of Contents

Class MovePositionables

Namespace
AlphaFramework.Editor.World.Commands
Assembly
AlphaFramework.Editor.dll

Moves one or more Positionable<TCoordinates>s.

public class MovePositionables : SimpleCommand, IUndoCommand
Inheritance
object
MovePositionables
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

positionables IEnumerable<Positionable<Vector2>>

The Positionable<TCoordinates>s to be moved.

target Vector2

The terrain position to move the entities to.

callback Action

Optional 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()