79 lines
1.9 KiB
C#
79 lines
1.9 KiB
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
using MyBT;
|
|||
|
|
|||
|
public enum SampleEnum {
|
|||
|
value0,
|
|||
|
value1
|
|||
|
}
|
|||
|
|
|||
|
[Task]
|
|||
|
public class TestScript : MonoBehaviour {
|
|||
|
public string classInstanceIdentifier;
|
|||
|
|
|||
|
[Task]
|
|||
|
public void StringFunction(string s) {
|
|||
|
if (Task.isStartingOrRunning) {
|
|||
|
if (Task.isDebugging)
|
|||
|
Debug.Log("TestScript.StringFunction: " + classInstanceIdentifier + " " + Task.getState + " " + s);
|
|||
|
Task.SetSucceeded();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
[Task]
|
|||
|
public void FloatFunction(float f) {
|
|||
|
if (Task.isStartingOrRunning) {
|
|||
|
if (Task.isDebugging)
|
|||
|
Debug.Log("TestScript.FloatFunction: " + classInstanceIdentifier + " " + Task.getState + " " + f);
|
|||
|
Task.SetSucceeded();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
[Task]
|
|||
|
public void IntFunction(int i) {
|
|||
|
if (Task.isStartingOrRunning) {
|
|||
|
if (Task.isDebugging)
|
|||
|
Debug.Log("TestScript.IntFunction: " + classInstanceIdentifier + " " + Task.getState + " " + i);
|
|||
|
Task.SetSucceeded();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
[Task]
|
|||
|
public void BoolFunction(bool b) {
|
|||
|
if (Task.isStartingOrRunning) {
|
|||
|
if (Task.isDebugging)
|
|||
|
Debug.Log("TestScript.BoolFunction: " + classInstanceIdentifier + " " + Task.getState + " " + b);
|
|||
|
Task.SetSucceeded();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
[Task]
|
|||
|
public void PublicFunction() {
|
|||
|
if (Task.isStartingOrRunning) {
|
|||
|
if (Task.isDebugging)
|
|||
|
Debug.Log("TestScript.PublicEnumFunction: " + classInstanceIdentifier + " " + Task.getState);
|
|||
|
Task.SetSucceeded();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
[Task]
|
|||
|
private void PrivateFunction() {
|
|||
|
if (Task.isStartingOrRunning) {
|
|||
|
if (Task.isDebugging)
|
|||
|
Debug.Log("TestScript.PrivateFunction: " + classInstanceIdentifier + " " + Task.getState);
|
|||
|
Task.SetSucceeded();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
// enums maybe not working...
|
|||
|
[Task]
|
|||
|
public void EnumFunction (SampleEnum enumValue) {
|
|||
|
if (Task.isStartingOrRunning) {
|
|||
|
if (Task.isDebugging)
|
|||
|
Debug.Log("TestScript.EnumFunction: " + classInstanceIdentifier + " " + Task.getState + " " + enumValue);
|
|||
|
Task.SetSucceeded();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|