/// <summary> Deactivates all the global nodes </summary> public virtual void DeactivateGlobalNodes() { if (!HasGlobalNodes) { return; } foreach (Node node in GlobalNodes) { node.Deactivate(); } if (ActiveSubGraph != null) { ActiveSubGraph.DeactivateGlobalNodes(); } }
/// <summary> Update is called every frame, if this graph has been loaded by a controller </summary> public virtual void Update() { if (ActiveNode != null && ActiveNode.UseUpdate) { ActiveNode.OnUpdate(); } if (ActiveSubGraph != null) { ActiveSubGraph.Update(); } foreach (Node node in GlobalNodes) { if (node.UseUpdate) { node.OnUpdate(); } } }