提交行为树

This commit is contained in:
PC-20230316NUNE\Administrator
2024-10-26 19:59:47 +08:00
parent 1ad20b67da
commit 82513fea04
320 changed files with 51310 additions and 30015 deletions

View File

@@ -0,0 +1,26 @@
using JNGame.Math;
namespace BehaviorTreeSlayer
{
public class Log : ActionNode
{
[OutField]
public string Text = "";
public Log()
{
}
public Log(string text)
{
Text = text;
}
public override TaskResult Tick(LFloat dt, object args = null)
{
UnityEngine.Debug.Log(Text);
return TaskResult.OK;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 12eb3d1ed40dd6841a70f69a5dbab9b5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: -5442936267250999957, guid: 0000000000000000d000000000000000, type: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,38 @@
using System.Xml.Serialization;
using JNGame.Math;
namespace BehaviorTreeSlayer
{
public class Wait : ActionNode
{
[OutField]
public LFloat time = 3;
LFloat t;
[ShowMe]
private LFloat timer;
public Wait()
{
}
public Wait(LFloat time)
{
this.time = time;
}
public override TaskResult Tick(LFloat dt, object args = null)
{
timer += dt;
if (timer >= time)
{
UnityEngine.Debug.Log(timer);
timer = 0;
return TaskResult.OK;
}
return TaskResult.Running;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8757ac0a11021a34da305a81f5b8b230
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 3306451490063965843, guid: 0000000000000000d000000000000000, type: 0}
userData:
assetBundleName:
assetBundleVariant: