Class MoveItemsBetweenContainersAction<TContainer, TStackable>
public abstract class MoveItemsBetweenContainersAction<TContainer, TStackable> : MultiAction, IGenericDataHolder where TContainer : Furniture, IContainerObject<Stacked<TStackable>>
Type Parameters
TContainerTStackable
- Inheritance
-
JsonTypeSafeGenericDataHolderMoveItemsBetweenContainersAction<TContainer, TStackable>
- Implements
-
IGenericDataHolder
- Inherited Members
-
JsonTypeSafeGenericDataHolder.GetDataKeys()
- Extension Methods
Constructors
MoveItemsBetweenContainersAction(ActionType, ActionInfo, Func<Stacked<TStackable>, object>, Func<Stacked<TStackable>, string>, Func<Stacked<TStackable>, TextureRegion>, bool)
protected MoveItemsBetweenContainersAction(ActionType type, ActionInfo info, Func<Stacked<TStackable>, object> getOrderKey, Func<Stacked<TStackable>, string> getItemDisplayName, Func<Stacked<TStackable>, TextureRegion> getItemTexture, bool removeWhenEmpty)
Parameters
typeActionTypeinfoActionInfogetOrderKeyFunc<Stacked<TStackable>, object>getItemDisplayNameFunc<Stacked<TStackable>, string>getItemTextureFunc<Stacked<TStackable>, TextureRegion>removeWhenEmptybool
Methods
AndThenInitialize()
Initializes the main action. This method is called after Handler has all completed.
protected override void AndThenInitialize()
AndThenIsCompleted()
MultiAction version of IsCompleted(). This method returns whether or not the main action is completed.
protected override CompletionType AndThenIsCompleted()
Returns
- CompletionType
Whether the main action is completed
AndThenOnCompleted(CompletionType)
MultiAction version of OnCompleted(CompletionType). This method gets called when the main action completes.
protected override void AndThenOnCompleted(CompletionType type)
Parameters
typeCompletionTypeThe completion of the main action
AndThenUpdate(GameTime, TimeSpan, float)
MultiAction version of Update(GameTime, TimeSpan, float). This method is called every update frame while the main action is active. By default, only MainElapsedTime is increased.
protected override void AndThenUpdate(GameTime time, TimeSpan passedInGame, float speedMultiplier)
Parameters
timeGameTimeThe current game time
passedInGameTimeSpanThe amount of time that has passed, in game time
speedMultiplierfloatThe game speed multiplier, which represents how fast things should happen, which is usually determined by Speed
CanExecute(bool)
public static ActionType.CanExecuteDelegate CanExecute(bool checkCreator = true)
Parameters
checkCreatorbool
Returns
CreateFirstActions()
Return a set of actions that should be executed before this action. Even if the yield statement is used, all actions will be collected into a list at the start of this action's invocation. If no action gets returned in this function, this action fails. If the returned set only contains null items, no first actions will be executed.
protected override IEnumerable<Action> CreateFirstActions()
Returns
- IEnumerable<Action>
A set of actions that should run before this action