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

A wrapper class with helper methods and fields that implements the IAiMalgamDecider interface. Is visible and assignable in the Unity inspector More...

Public Member Functions

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...
 

Public Attributes

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

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

Properties

abstract bool IsLeaf [get]
 Does this decider represent a branch-leaf?
 

Additional Inherited Members

- Events inherited from NikosAssets.AiMalgam.Settings.AiMalgamNode
virtual Action< AiMalgamNodeOnNodeChanged
 Emitted, if the node values where changed (OnValidate())
 

Detailed Description

A wrapper class with helper methods and fields that implements the IAiMalgamDecider interface. Is visible and assignable in the Unity inspector

Member Function Documentation

◆ HandleRunningStates()

virtual void NikosAssets.AiMalgam.Settings.Deciders.AiMalgamDeciderWrapper.HandleRunningStates ( AiMalgamEntity  aiMalgamEntity,
bool  success 
)
protectedvirtual

Handle the set removeAllActiveStatesAndActions and removeSpecificActiveStatesAndActions fields here

Parameters
aiMalgamEntityThe AiMalgamEntity to remove the AiMalgamStates and AiMalgamBaseAction<BlackboardType>s
successAre we allowed to do said removals?

◆ RootTraverse()

abstract AiMalgamDecision NikosAssets.AiMalgam.Settings.Deciders.AiMalgamDeciderWrapper.RootTraverse ( AiMalgamEntity  aiMalgamEntity,
AiMalgamDecision  decision 
)
pure virtual

Traverse through valid child IAiMalgamDeciders until valid AiMalgamBaseSettings are found to form the AiMalgamDecision

Parameters
aiMalgamEntityThe requesting AiMalgamEntity to apply the resulting (valid) AiMalgamBaseSettings on
decisionThe previous (or initial) AiMalgamDecision to expand
Returns
The final AiMalgamDecision of this (root or sub) branch

Implements NikosAssets.AiMalgam.Settings.Deciders.IAiMalgamDecider.

Implemented in NikosAssets.AiMalgam.Settings.Deciders.AiMalgamBaseDecider, and NikosAssets.AiMalgam.Settings.Deciders.AiMalgamSubGraphDecider.