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