
1.引入URP 2.引入InputSystem 3.引入Fungus 4.引入DoTween 5.引入CinemaMachine 6.引入BehaviorTree 7.引入BehaviorTree动作包 8.配置了渲染管线资源 🥵🥵🥵🥵🥵
23 lines
548 B
C#
23 lines
548 B
C#
using UnityEngine;
|
|
|
|
namespace BehaviorDesigner.Runtime.Tasks.Unity.UnityTime
|
|
{
|
|
[TaskCategory("Unity/Time")]
|
|
[TaskDescription("Sets the scale at which time is passing.")]
|
|
public class SetTimeScale : Action
|
|
{
|
|
[Tooltip("The timescale")]
|
|
public SharedFloat timeScale;
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
Time.timeScale = timeScale.Value;
|
|
return TaskStatus.Success;
|
|
}
|
|
|
|
public override void OnReset()
|
|
{
|
|
timeScale.Value = 0;
|
|
}
|
|
}
|
|
} |