Package net.sf.gridarta.action
Class MoveSquareTopAction<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.action.AbstractMoveSquareAction<G,A,R>
-
- net.sf.gridarta.action.MoveSquareTopAction<G,A,R>
-
- All Implemented Interfaces:
EditorAction
public class MoveSquareTopAction<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractMoveSquareAction<G,A,R>
AnEditorActionthat moves the selected game object in theSelectedSquareModelto the top.
-
-
Constructor Summary
Constructors Constructor Description MoveSquareTopAction(@NotNull SelectedSquareModel<G,A,R> selectedSquareModel, @Nullable MapManager<G,A,R> mapManager)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandoAction(boolean performAction, G gameObject)Executes the action.voidmoveSquareTop()Action method that moves the selected game object to the top.-
Methods inherited from class net.sf.gridarta.action.AbstractMoveSquareAction
doAction, setAction
-
-
-
-
Constructor Detail
-
MoveSquareTopAction
public MoveSquareTopAction(@NotNull @NotNull SelectedSquareModel<G,A,R> selectedSquareModel, @Nullable @Nullable MapManager<G,A,R> mapManager)Creates a new instance.- Parameters:
selectedSquareModel- the selected square model to updatemapManager- the map manager to track ornull
-
-
Method Detail
-
moveSquareTop
@ActionMethod public void moveSquareTop()
Action method that moves the selected game object to the top.
-
doAction
protected boolean doAction(boolean performAction, @Nullable G gameObject)Description copied from class:AbstractMoveSquareActionExecutes the action.- Specified by:
doActionin classAbstractMoveSquareAction<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
performAction- whether the action should be performedgameObject- the current game object ornullif none is selected- Returns:
- whether the action was or can be performed
-
-