blob: ddeb76f825d453e5227671b3f3528b80df2d4c5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
using UnityEngine;
namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityInput
{
[TaskCategory("Basic/Input")]
[TaskDescription("Returns success when the specified key is released.")]
public class IsKeyUp : Conditional
{
[Tooltip("The key to test")]
public KeyCode key;
public override TaskStatus OnUpdate()
{
return Input.GetKeyUp(key) ? TaskStatus.Success : TaskStatus.Failure;
}
public override void OnReset()
{
key = KeyCode.None;
}
}
}
|