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

A custom Node to be displayed in the AiMalgamNodeGraph used for several setting types to define your AI behavior. Inherit this for custom settings that need to be displayed in AiMalgamNodeGraph. Is visible and assignable in the Unity inspector More...

Public Member Functions

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

Protected Member Functions

override void Reset ()
 
override void OnEnable ()
 
override void Awake ()
 
override void OnValidate ()
 

Events

virtual Action< AiMalgamNodeOnNodeChanged
 Emitted, if the node values where changed (OnValidate())
 

Detailed Description

A custom Node to be displayed in the AiMalgamNodeGraph used for several setting types to define your AI behavior. Inherit this for custom settings that need to be displayed in AiMalgamNodeGraph. Is visible and assignable in the Unity inspector

Member Function Documentation

◆ GetValue()

override object NikosAssets.AiMalgam.Settings.AiMalgamNode.GetValue ( NodePort  port)

Used in the AiMalgamNodeGraph.

Parameters
portNot important for this implementation of XNode
Returns
Should return this instance

◆ MarkInGraph() [1/2]

virtual void NikosAssets.AiMalgam.Settings.AiMalgamNode.MarkInGraph ( AiMalgamEntity  requester,
bool  acceptedOrFailed,
bool  forceRepaint = false 
)
virtual

EDITOR ONLY EFFECT. Set the node's visuals in the AiMalgamNodeGraph (accepted or failed)

Parameters
requesterThe requesting AiMalgamEntity to check if setting the markings are allowed or not
acceptedOrFailedThe node color (true = green/ false = red) by default
forceRepaintrepaint is very expensive, use with caution!

◆ MarkInGraph() [2/2]

virtual void NikosAssets.AiMalgam.Settings.AiMalgamNode.MarkInGraph ( AiMalgamEntity  requester,
Color  markColor,
bool  forceRepaint = false 
)
virtual

EDITOR ONLY EFFECT. Set the node's visuals in the AiMalgamNodeGraph

Parameters
requesterThe requesting AiMalgamEntity to check if setting the markings are allowed or not
markColorThe node color to update in the AiMalgamNodeGraph
forceRepaintrepaint is very expensive, use with caution!

◆ ResetMarkingInGraph()

virtual void NikosAssets.AiMalgam.Settings.AiMalgamNode.ResetMarkingInGraph ( AiMalgamEntity  requester,
bool  forceRepaint = false 
)
virtual

EDITOR ONLY EFFECT. Reset the node's visuals in the AiMalgamNodeGraph

Parameters
requesterThe requesting AiMalgamEntity to check if setting the markings are allowed or not
forceRepaintrepaint is very expensive, use with caution!