blob: c77718c32a8f356cb01ec3f00a6292af71bd780a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
using UnityEngine;
namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityInput
{
[TaskCategory("Basic/Input")]
[TaskDescription("Stores the mouse position.")]
public class GetMousePosition : Action
{
[RequiredField]
[Tooltip("The stored result")]
public SharedVector2 storeResult;
public override TaskStatus OnUpdate()
{
storeResult.Value = Input.mousePosition;
return TaskStatus.Success;
}
public override void OnReset()
{
storeResult = Vector2.zero;
}
}
}
|