
1.引入URP 2.引入InputSystem 3.引入Fungus 4.引入DoTween 5.引入CinemaMachine 6.引入BehaviorTree 7.引入BehaviorTree动作包 8.配置了渲染管线资源 🥵🥵🥵🥵🥵
30 lines
880 B
C#
30 lines
880 B
C#
using UnityEngine;
|
|
|
|
namespace BehaviorDesigner.Runtime.Tasks.Unity.UnityVector3
|
|
{
|
|
[TaskCategory("Unity/Vector3")]
|
|
[TaskDescription("Multiply the Vector3 by a float.")]
|
|
public class Multiply : Action
|
|
{
|
|
[Tooltip("The Vector3 to multiply of")]
|
|
public SharedVector3 vector3Variable;
|
|
[Tooltip("The value to multiply the Vector3 of")]
|
|
public SharedFloat multiplyBy;
|
|
[Tooltip("The multiplication resut")]
|
|
[RequiredField]
|
|
public SharedVector3 storeResult;
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
storeResult.Value = vector3Variable.Value * multiplyBy.Value;
|
|
return TaskStatus.Success;
|
|
}
|
|
|
|
public override void OnReset()
|
|
{
|
|
vector3Variable = Vector3.zero;
|
|
storeResult = Vector3.zero;
|
|
multiplyBy = 0;
|
|
}
|
|
}
|
|
} |