
1.引入URP 2.引入InputSystem 3.引入Fungus 4.引入DoTween 5.引入CinemaMachine 6.引入BehaviorTree 7.引入BehaviorTree动作包 8.配置了渲染管线资源 🥵🥵🥵🥵🥵
25 lines
793 B
C#
25 lines
793 B
C#
using UnityEngine;
|
|
|
|
namespace BehaviorDesigner.Runtime.Tasks.Unity.SharedVariables
|
|
{
|
|
[TaskCategory("Unity/SharedVariable")]
|
|
[TaskDescription("Returns success if the variable value is equal to the compareTo value.")]
|
|
public class CompareSharedQuaternion : Conditional
|
|
{
|
|
[Tooltip("The first variable to compare")]
|
|
public SharedQuaternion variable;
|
|
[Tooltip("The variable to compare to")]
|
|
public SharedQuaternion compareTo;
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
return variable.Value.Equals(compareTo.Value) ? TaskStatus.Success : TaskStatus.Failure;
|
|
}
|
|
|
|
public override void OnReset()
|
|
{
|
|
variable = Quaternion.identity;
|
|
compareTo = Quaternion.identity;
|
|
}
|
|
}
|
|
} |