AiMalgam Core 1.1.0
API documentation for the generic Unity3D AI System
|
The base AiMalgamBaseEngineWrapper with core implementations to handle its IAiMalgamBaseActionWrappers More...
Public Member Functions | |
override List< IAiMalgamBaseActionWrapper > | GetStableActiveActions () |
Get IAiMalgamBaseActionWrappers that are actively running and not in the remove queue More... | |
override AiMalgamApplyActionSettingResult | ValidateSettings (AiMalgamBaseSettings settings) |
Validate the given AiMalgamBaseSettings by checking its AiMalgamBaseSettings.conditionToEnter and if the current AiMalgamEntity.currentStates allow it. More... | |
virtual void | AddActionsQueue (List< ActionType > actions) |
override void | RemoveAllActiveActionsAndStatesQueue () |
Clear all AiMalgamStates attached on this AiMalgamEntity and their represented IAiMalgamBaseActionWrappers on this Engine More... | |
virtual void | RemoveActionsQueue (List< ActionType > actionsToRemove) |
virtual void | Tick (BlackboardType blackboard) |
Call this to RemoveActions from the _actionsRemoveQueue, AddActions from the _actionsAddQueue and finally RunActions maintained in Actions More... | |
virtual void | ActionsActiveBlockedByState (AiMalgamState state) |
Dispose all ActionTypes from Actions that are blocked by state More... | |
virtual bool | CanStackSetting (AiMalgamBaseSettings settings, List< ActionType > actionTypes) |
Check if the given settings can be added or stacked against the actionTypes More... | |
virtual bool | CanStackAction (ActionType action, List< ActionType > actionTypes) |
Check if the given action .IAiMalgamBaseActionWrapper.Settings can be added or stacked against the actionTypes More... | |
Public Member Functions inherited from NikosAssets.AiMalgam.Systems.Engines.AiMalgamBaseEngineWrapper | |
abstract AiMalgamApplyActionSettingResult | ApplySettings (AiMalgamBaseSettings settings) |
Apply the AiMalgamBaseSettings to this Engine and convert it to its respective IAiMalgamBaseActionWrapper More... | |
abstract AiMalgamApplyActionSettingResult | ValidateSettings (AiMalgamBaseSettings settings) |
Validate the given AiMalgamBaseSettings by checking its AiMalgamBaseSettings.conditionToEnter and if the current AiMalgamEntity.currentStates allow it. More... | |
abstract void | RemoveAllActiveActionsAndStatesQueue () |
Clear all AiMalgamStates attached on this AiMalgamEntity and their represented IAiMalgamBaseActionWrappers on this Engine More... | |
abstract List< IAiMalgamBaseActionWrapper > | GetStableActiveActions () |
Get IAiMalgamBaseActionWrappers that are actively running and not in the remove queue More... | |
Protected Member Functions | |
virtual void | Awake () |
virtual void | Start () |
virtual void | OnDestroy () |
virtual void | OnEnable () |
virtual void | OnDisable () |
virtual void | Reset () |
virtual void | OnValidate () |
virtual void | AutoFill () |
Automatically fills required and empty fields of this instance | |
virtual void | UnsubscribeEntityStateChanged (AiMalgamEntity entity) |
virtual void | CheckSubscribeEntityStateChanged (AiMalgamEntity entity) |
Check if we should and can subscribe to AiMalgamState changes on AiMalgamEntity and subscribe if possible More... | |
virtual void | UpdateSupportedActionType () |
virtual void | OnAiMalgamEntityStateChanged (AiMalgamBaseEngineWrapper engineWrapper, AiMalgamState state, bool added) |
Dispose specific ActionTypes running in _actions if conditions are met More... | |
virtual void | SortActionsByPriorities (BlackboardType blackboard) |
virtual bool | AddActions (BlackboardType blackboard) |
virtual void | RemoveActions (BlackboardType blackboard) |
virtual void | RunActions (BlackboardType blackboard) |
Protected Attributes | |
AiMalgamEntity | _aiMalgamEntity |
The hosting AiMalgamEntity | |
AiMalgamEntity | _prevAiMalgamEntity |
Used if the developer changed _aiMalgamEntity field or AiMalgamEntity property (at runtime) | |
bool | _subscribeToAnyStateChangedOnEntity = true |
Should any AiMalgamState change on the AiMalgamEntity be reacted upon (for example dispose specific running ActionTypes)? | |
string | _actionTypeSupported = "" |
Which custom ActionType can this Engine be mapped to? Used to generate the ActionTypeSupportedHash for mapping | |
int | _actionTypeSupportedHash = -1 |
Used to map the compatible custom ActionType to this Engine | |
bool | _removeAllActiveActionsAndStates |
Clear all ActionTypes in this Engine next Tick | |
List< ActionType > | _actions = new List<ActionType>() |
The current running ActionTypes | |
Queue< ActionType > | _actionsAddQueue = new Queue<ActionType>() |
The next upcoming ActionTypes to be added in Actions next Tick | |
Queue< ActionType > | _actionsRemoveQueue = new Queue<ActionType>() |
The next ActionTypes to be removed from the Actions list next Tick | |
Properties | |
override AiMalgamEntity | AiMalgamEntity [get, set] |
The hosting AiMalgamEntity. Setting this property updates the subscriptions (_subscribeToAnyStateChangedOnEntity) of this instance accordingly | |
override string | ActionTypeSupported [get, protected set] |
Which custom ActionType can this Engine be mapped to? Setting this property generates the ActionTypeSupportedHash for the mapping mechanic | |
override int | ActionTypeSupportedHash [get] |
Used to map the compatible custom ActionType to this Engine | |
abstract BlackboardType | Blackboard [get, set] |
The for the ActionType needed IAiMalgamBlackboard type that has to be injected in the IAiMalgamBaseActionWrapper and maintained in this Engine | |
List< ActionType > | Actions [get] |
The current running ActionTypes | |
Queue< ActionType > | ActionsAddQueue [get] |
The next upcoming ActionTypes to be added in Actions next Tick | |
Queue< ActionType > | ActionsRemoveQueue [get] |
The next ActionTypes to be removed from the Actions list next Tick | |
Properties inherited from NikosAssets.AiMalgam.Systems.Engines.AiMalgamBaseEngineWrapper | |
abstract string | ActionTypeSupported [get, protected set] |
Which custom IAiMalgamBaseActionWrapper can this Engine be mapped to? Setting this property generates the ActionTypeSupportedHash for the mapping mechanic | |
abstract int | ActionTypeSupportedHash [get] |
Used to map the compatible custom IAiMalgamBaseActionWrapper to this Engine | |
abstract AiMalgamEntity | AiMalgamEntity [get, set] |
The hosting AiMalgamEntity | |
The base AiMalgamBaseEngineWrapper with core implementations to handle its IAiMalgamBaseActionWrappers
ActionType | The for this Engine designated and supported ActionType |
BlackboardType | The for the ActionType needed IAiMalgamBlackboard type that has to be injected in the IAiMalgamBaseActionWrapper and maintained in this Engine |
BlackboardType | : | IAiMalgamBlackboard | |
ActionType | : | AiMalgamBaseAction<BlackboardType> |
|
virtual |
Dispose all ActionTypes from Actions that are blocked by state
state | The blocking AiMalgamState |
|
virtual |
Check if the given action .IAiMalgamBaseActionWrapper.Settings can be added or stacked against the actionTypes
action | The action .IAiMalgamBaseActionWrapper.Settings we want to add to Actions |
actionTypes |
|
virtual |
Check if the given settings can be added or stacked against the actionTypes
settings | The AiMalgamBaseSettings we want to add to Actions |
actionTypes |
|
protectedvirtual |
Check if we should and can subscribe to AiMalgamState changes on AiMalgamEntity and subscribe if possible
entity | The NikosAssets.AiMalgam.AiMalgamEntity to subscribe to |
|
virtual |
Get IAiMalgamBaseActionWrappers that are actively running and not in the remove queue
Implements NikosAssets.AiMalgam.Systems.Engines.AiMalgamBaseEngineWrapper.
|
protectedvirtual |
Dispose specific ActionTypes running in _actions if conditions are met
engineWrapper | The emitting AiMalgamBaseEngineWrapper. Abort, if the emitter was this. |
state | The AiMalgamState that was added or removed |
added | state was removed from or added to our AiMalgamEntity |
|
virtual |
Clear all AiMalgamStates attached on this AiMalgamEntity and their represented IAiMalgamBaseActionWrappers on this Engine
Implements NikosAssets.AiMalgam.Systems.Engines.AiMalgamBaseEngineWrapper.
|
virtual |
Call this to RemoveActions from the _actionsRemoveQueue, AddActions from the _actionsAddQueue and finally RunActions maintained in Actions
blackboard | The BlackboardType to inject to the ActionTypes |
|
virtual |
Validate the given AiMalgamBaseSettings by checking its AiMalgamBaseSettings.conditionToEnter and if the current AiMalgamEntity.currentStates allow it.
settings | Validate those |
Implements NikosAssets.AiMalgam.Systems.Engines.AiMalgamBaseEngineWrapper.