29 lines
650 B
C#
29 lines
650 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
using MyBT;
|
|
|
|
public class StructureTest : MonoBehaviour {
|
|
|
|
[Task]
|
|
public void SucceedImmediate (string s) {
|
|
Debug.Log("SucceedImmediate " + s + " " + Task.getState);
|
|
if (Task.isStartingOrRunning) {
|
|
//if (Task.Debug(this))
|
|
//Debug.Log("SucceedImmediate " + s + " " + Task.GetState(this));
|
|
Task.SetSucceeded();
|
|
}
|
|
}
|
|
|
|
[Task]
|
|
public void FailImmediate (string s) {
|
|
Debug.Log("FailImmediate " + s + " " + Task.getState);
|
|
if (Task.isStartingOrRunning) {
|
|
//if (Task.Debug(this))
|
|
//Debug.Log("FailImmediate "+ s);
|
|
Task.SetFailed();
|
|
}
|
|
}
|
|
}
|