IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/Input/GetMousePosition.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

24 lines
536 B
C#

using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
namespace NodeCanvas.Tasks.Actions
{
[Category("Input (Legacy System)")]
public class GetMousePosition : ActionTask
{
[BlackboardOnly] public BBParameter<Vector3> saveAs;
public bool repeat;
protected override void OnExecute() { Do(); }
protected override void OnUpdate() { Do(); }
void Do() {
saveAs.value = Input.mousePosition;
if ( !repeat ) { EndAction(); }
}
}
}