Struct SimpleBehaviorAction.ActionSettings
A struct used by SimpleBehaviorAction's Create(ActionSettings) method to pass settings onto a simple behavior action.
public struct SimpleBehaviorAction.ActionSettings
- Inherited Members
- Extension Methods
Constructors
ActionSettings(string, ObjectCategory)
Creates a new set of action settings with the given defaults.
public ActionSettings(string name, ObjectCategory context)
Parameters
name
stringThe name of the action to pass to the ActionType.TypeSettings constructor.
context
ObjectCategoryThe context to pass to the ActionType.TypeSettings constructor.
Fields
AllowMultitasking
A function that determines whether multitasking is allowed. The arguments passed are the instance of the simple behavior action, as well as the two arguments passed to CanMultitask(Action). If this is null, the base implementation is used in CanMultitask(Action).
public Func<SimpleBehaviorAction, Action, bool> AllowMultitasking
Field Value
CompletionTime
The amount of time passed to CompleteIfTimeUp(TimeSpan, bool, SkillType, float, bool).
public required TimeSpan CompletionTime
Field Value
ConstructBehavior
A function that constructs the behavior for this simple behavior action.
public required Func<SimpleBehaviorAction, ActionBehavior> ConstructBehavior
Field Value
DisallowedEmotions
A set of emotions that will cancel the simple behavior action, and that will cause new instances of the action not to be constructable.
public EmotionType[] DisallowedEmotions
Field Value
EfficiencyMattersCompletion
Whether efficiency matters for this action settings' CompletionTime. This is passed to CompleteIfTimeUp(TimeSpan, bool, SkillType, float, bool).
public bool EfficiencyMattersCompletion
Field Value
GainedSkill
A skill that is optionally gained in AndThenUpdate(GameTime, TimeSpan, float), where the amount is multiplied with the passed in-game time.
public (SkillType Type, float Amount) GainedSkill
Field Value
OnCompleted
An action that is invoked when an instance of the simple behavior action is completed, in AndThenOnCompleted(CompletionType).
public Action<SimpleBehaviorAction, CompletionType> OnCompleted
Field Value
RestoredNeeds
A a set of needs that are optionally restored in AndThenUpdate(GameTime, TimeSpan, float), where the restoration amounts are multiplied with the passed in-game time.
public (NeedType Type, float Amount)[] RestoredNeeds
Field Value
Settings
A set of ActionType.TypeSettings that should be used. These will be amended with additional info based on these action settings in Create(ActionSettings).
public ActionType.TypeSettings Settings