blob: 81c8be5c44cebad8e0ec9cc5d4db2cf71e437a34 (
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 acceleration value.")]
public class GetAcceleration : Action
{
[RequiredField]
[Tooltip("The stored result")]
public SharedVector3 storeResult;
public override TaskStatus OnUpdate()
{
storeResult.Value = Input.acceleration;
return TaskStatus.Success;
}
public override void OnReset()
{
storeResult = Vector3.zero;
}
}
}
|