AiMalgam Core 1.1.0
API documentation for the generic Unity3D AI System
Public Attributes | Protected Member Functions | List of all members
NikosAssets.AiMalgam.Settings.Deciders.AiMalgamMultipleDecider Class Reference

A specific AiMalgamBaseDecider to apply multiple children. Has the option (applySettingsSequentialAsync) to apply multiple AiMalgamBaseSettings sequentially in an async manner, via the AiMalgamAsyncSettingsQueueHandler More...

Public Attributes

bool successIfAnyPasses = true
 Validate either only if every child passes (false) or if at least one child passes (true)
 
bool applySettingsSequentialAsync
 Should the AiMalgamBaseSettings be applied one after another via the AiMalgamAsyncActionQueueHandler?
 
bool abortSequenceOnFailedSetting = true
 Abort the running AiMalgamAsyncActionQueueHandler if an AiMalgamBaseAction<BlackboardType> disposed with failure (AiMalgamBaseAction<BlackboardType>.AiMalgamBaseAction<BlackboardType>.Success == false) or did not validate
 
bool restartSequenceOnSameDecision
 Should the AiMalgamAsyncActionQueueHandler restart if this decider is picked again?
 
bool continueSequenceOnDifferentDecisionMade
 Do not abort the AiMalgamAsyncActionQueueHandler on another AiMalgamDecision made
 
- Public Attributes inherited from NikosAssets.AiMalgam.Settings.Deciders.AiMalgamBaseDecider
bool isLeaf
 Only branch to AiMalgamBaseSettings rather than IAiMalgamDeciders, if set to true
 
AiMalgamDeciderListWrapper childDecisionNodes = new AiMalgamDeciderListWrapper()
 Only shown and processed if isLeaf is set to false
 
AiMalgamBaseSettingsListWrapper leafSettingsListWrapper = new AiMalgamBaseSettingsListWrapper()
 Only shown and processed if isLeaf is set to true
 
- Public Attributes inherited from NikosAssets.AiMalgam.Settings.Deciders.AiMalgamDeciderWrapper
AiMalgamDeciderWrapper output
 Used in the AiMalgamNodeGraph. Do not temper with it!
 
AiMalgamBaseCondition condition = default
 The AiMalgamBaseCondition that must validate in order for this decider to traverse further
 
bool removeAllActiveStatesAndActions = false
 If this decider validates, force the requesting AiMalgamEntity to dispose of any AiMalgamState and running AiMalgamBaseAction<BlackboardType>
 
AiMalgamStatesListWrapper removeSpecificActiveStatesAndActions = new AiMalgamStatesListWrapper()
 Removes specific AiMalgamStates and their represented AiMalgamBaseAction<BlackboardType>s on the requesting AiMalgamEntity if this decider validates
 

Protected Member Functions

override AiMalgamApplyDeciderResult ApplyBranchLeafToEntity (AiMalgamEntity aiMalgamEntity, AiMalgamDecision decision, List< AiMalgamBaseSettings > baseSettingsList)
 Handles found AiMalgamBaseSettings and applies them on the requesting AiMalgamEntity (multiple and if applySettingsSequentialAsync is true, via an AiMalgamAsyncActionQueueHandler) More...
 
override AiMalgamDecision LeafTraverse (AiMalgamEntity aiMalgamEntity, AiMalgamDecision decision)
 Do a custom implementation to traverse the leafSettingsListWrapper in your desired fashion More...
 
override AiMalgamDecision BranchTraverse (AiMalgamEntity aiMalgamEntity, AiMalgamDecision decision)
 Do a custom implementation to traverse the childDecisionNodes in your desired fashion More...
 
abstract AiMalgamDecision BranchTraverse (AiMalgamEntity aiMalgamEntity, AiMalgamDecision decision)
 Do a custom implementation to traverse the childDecisionNodes in your desired fashion More...
 
abstract AiMalgamDecision LeafTraverse (AiMalgamEntity aiMalgamEntity, AiMalgamDecision decision)
 Do a custom implementation to traverse the leafSettingsListWrapper in your desired fashion More...
 
virtual AiMalgamApplyDeciderResult ApplyBranchLeafToEntity (AiMalgamEntity aiMalgamEntity, AiMalgamDecision decision, List< AiMalgamBaseSettings > baseSettingsList)
 Handles found AiMalgamBaseSettings and applies them on the requesting AiMalgamEntity More...
 
- Protected Member Functions inherited from NikosAssets.AiMalgam.Settings.Deciders.AiMalgamDeciderWrapper
virtual void HandleRunningStates (AiMalgamEntity aiMalgamEntity, bool success)
 Handle the set removeAllActiveStatesAndActions and removeSpecificActiveStatesAndActions fields here More...
 
- Protected Member Functions inherited from NikosAssets.AiMalgam.Settings.AiMalgamNode
override void Reset ()
 
override void OnEnable ()
 
override void Awake ()
 
override void OnValidate ()
 

Additional Inherited Members

- Public Member Functions inherited from NikosAssets.AiMalgam.Settings.Deciders.AiMalgamBaseDecider
override AiMalgamDecision RootTraverse (AiMalgamEntity aiMalgamEntity, AiMalgamDecision decision)
 Traverse through valid child IAiMalgamDeciders until valid AiMalgamBaseSettings are found to form the AiMalgamDecision More...
 
abstract AiMalgamDecision RootTraverse (AiMalgamEntity aiMalgamEntity, AiMalgamDecision decision)
 Traverse through valid child IAiMalgamDeciders until valid AiMalgamBaseSettings are found to form the AiMalgamDecision More...
 
- Public Member Functions inherited from NikosAssets.AiMalgam.Settings.AiMalgamNode
override void OnOpen ()
 Called if the AiMalgamNodeGraph hosting this Node is opened
 
virtual void NotifyOnNodeChanged ()
 A helper method to notify node value changes and emit the OnNodeChanged event
 
override object GetValue (NodePort port)
 Used in the AiMalgamNodeGraph. More...
 
virtual void ResetMarkingInGraph (AiMalgamEntity requester, bool forceRepaint=false)
 EDITOR ONLY EFFECT. Reset the node's visuals in the AiMalgamNodeGraph More...
 
virtual void MarkInGraph (AiMalgamEntity requester, bool acceptedOrFailed, bool forceRepaint=false)
 EDITOR ONLY EFFECT. Set the node's visuals in the AiMalgamNodeGraph (accepted or failed) More...
 
virtual void MarkInGraph (AiMalgamEntity requester, Color markColor, bool forceRepaint=false)
 EDITOR ONLY EFFECT. Set the node's visuals in the AiMalgamNodeGraph More...
 
AiMalgamDecision RootTraverse (AiMalgamEntity aiMalgamEntity, AiMalgamDecision decision)
 Traverse through valid child IAiMalgamDeciders until valid AiMalgamBaseSettings are found to form the AiMalgamDecision More...
 
- Properties inherited from NikosAssets.AiMalgam.Settings.Deciders.AiMalgamBaseDecider
override bool IsLeaf [get]
 Only branch to AiMalgamBaseSettings rather than IAiMalgamDeciders, if set to true
 
- Properties inherited from NikosAssets.AiMalgam.Settings.Deciders.AiMalgamDeciderWrapper
abstract bool IsLeaf [get]
 Does this decider represent a branch-leaf?
 
- Events inherited from NikosAssets.AiMalgam.Settings.AiMalgamNode
virtual Action< AiMalgamNodeOnNodeChanged
 Emitted, if the node values where changed (OnValidate())
 

Detailed Description

A specific AiMalgamBaseDecider to apply multiple children. Has the option (applySettingsSequentialAsync) to apply multiple AiMalgamBaseSettings sequentially in an async manner, via the AiMalgamAsyncSettingsQueueHandler

Member Function Documentation

◆ ApplyBranchLeafToEntity()

override AiMalgamApplyDeciderResult NikosAssets.AiMalgam.Settings.Deciders.AiMalgamMultipleDecider.ApplyBranchLeafToEntity ( AiMalgamEntity  aiMalgamEntity,
AiMalgamDecision  decision,
List< AiMalgamBaseSettings baseSettingsList 
)
protectedvirtual

Handles found AiMalgamBaseSettings and applies them on the requesting AiMalgamEntity (multiple and if applySettingsSequentialAsync is true, via an AiMalgamAsyncActionQueueHandler)

Parameters
aiMalgamEntityThe requesting AiMalgamEntity to apply the baseSettingsList on
decisionThe final AiMalgamDecision
baseSettingsListThe final AiMalgamBaseSettings list of this (root or sub) branch
Returns
AiMalgamApplyDeciderResult

Reimplemented from NikosAssets.AiMalgam.Settings.Deciders.AiMalgamBaseDecider.

◆ BranchTraverse()

override AiMalgamDecision NikosAssets.AiMalgam.Settings.Deciders.AiMalgamMultipleDecider.BranchTraverse ( AiMalgamEntity  aiMalgamEntity,
AiMalgamDecision  decision 
)
protectedvirtual

Do a custom implementation to traverse the childDecisionNodes in your desired fashion

Parameters
aiMalgamEntityThe requesting AiMalgamEntity to apply the resulting (valid) AiMalgamBaseSettings on
decisionThe AiMalgamDecision to form
Returns
A modified AiMalgamDecision

Implements NikosAssets.AiMalgam.Settings.Deciders.AiMalgamBaseDecider.

◆ LeafTraverse()

override AiMalgamDecision NikosAssets.AiMalgam.Settings.Deciders.AiMalgamMultipleDecider.LeafTraverse ( AiMalgamEntity  aiMalgamEntity,
AiMalgamDecision  decision 
)
protectedvirtual

Do a custom implementation to traverse the leafSettingsListWrapper in your desired fashion

Parameters
aiMalgamEntityThe requesting AiMalgamEntity to apply the resulting (valid) AiMalgamBaseSettings on
decisionThe AiMalgamDecision to form
Returns
A modified AiMalgamDecision

Implements NikosAssets.AiMalgam.Settings.Deciders.AiMalgamBaseDecider.