mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
临时提交
This commit is contained in:
24
JNFrame/Assets/BehaviorTreeSlayer/Scripts/Actions/Log.cs
Normal file
24
JNFrame/Assets/BehaviorTreeSlayer/Scripts/Actions/Log.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace BehaviorTreeSlayer
|
||||
{
|
||||
public class Log : ActionNode
|
||||
{
|
||||
[OutField]
|
||||
public string Text = "";
|
||||
|
||||
public Log()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Log(string text)
|
||||
{
|
||||
Text = text;
|
||||
}
|
||||
|
||||
public override TaskResult Tick(double dt, object args = null)
|
||||
{
|
||||
UnityEngine.Debug.Log(Text);
|
||||
return TaskResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
@@ -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:
|
33
JNFrame/Assets/BehaviorTreeSlayer/Scripts/Actions/Wait.cs
Normal file
33
JNFrame/Assets/BehaviorTreeSlayer/Scripts/Actions/Wait.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Xml.Serialization;
|
||||
namespace BehaviorTreeSlayer
|
||||
{
|
||||
public class Wait : ActionNode
|
||||
{
|
||||
[OutField]
|
||||
public double time = 3;
|
||||
double t;
|
||||
[ShowMe]
|
||||
private double timer;
|
||||
public Wait()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Wait(double time)
|
||||
{
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public override TaskResult Tick(double dt, object args = null)
|
||||
{
|
||||
timer += dt;
|
||||
if (timer >= time)
|
||||
{
|
||||
UnityEngine.Debug.Log(timer);
|
||||
timer = 0;
|
||||
return TaskResult.OK;
|
||||
}
|
||||
return TaskResult.Running;
|
||||
}
|
||||
}
|
||||
}
|
@@ -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:
|
Reference in New Issue
Block a user