Created
February 13, 2015 02:15
-
-
Save ashblue/43332b61a8f86f19521d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
namespace BehaviorDesigner.Runtime.Tasks | |
{ | |
[HelpURL ("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=53"), TaskDescription ("Behavior Reference allows you to run another behavior tree within the current behavior tree."), TaskIcon ("BehaviorTreeReferenceIcon.png")] | |
public abstract class BehaviorReference : Action | |
{ | |
[Tooltip ("Should the shared variables automatically be inherited from the parent tree?")] | |
public bool autoInheritVariables = true; | |
[Tooltip ("External behavior array that this task should reference")] | |
public SharedObjectList externalBehaviors; | |
public virtual ExternalBehavior[] GetExternalBehaviors () | |
{ | |
return this.externalBehaviors.Value.Select(i => (ExternalBehavior)i).ToArray(); | |
} | |
public override void OnReset () | |
{ | |
this.externalBehaviors = null; | |
this.autoInheritVariables = true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment