1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
using BehaviorTreeEngine; public class NewActionNode : ActionNode { void Awake() { // Init node properties from xml files Init(0, 0, 0, ""); // Register this mono behavior node with its distinct composite (forest, tree, node) indices BtEngine.MonoBehaviorNode.Register(forestIndex, treeIndex, nodeIndex, this); } // Use this for initialization void Start () { } // Update is called once per frame void Update () { } // Return: true when done repeat; false otherwise public override bool OnStep() { // Put your code here to be invoked when this node is getting stepped return true; } public override void OnConstruct() { // Put your code here to be invoked when this node is getting loaded } public override void OnDestruct() { // Put your code here to be invoked when this node is getting destroyed } public override void OnReset() { // Put your code here to be invoked when this node is getting reset } public override void OnPause() { // Put your code here to be invoked when this node is getting paused } public override void OnStop() { // Put your code here to be invoked when this node is getting stopped } } |
Copyright © 2016-2020 Qualgame, LLC