Files
2024-11-20 15:21:28 +01:00

28 lines
569 B
C#

// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Input)]
[Tooltip("Sends an Event when the user hits any Key or Mouse Button.")]
public class AnyKey : FsmStateAction
{
[RequiredField]
[Tooltip("Event to send when any Key or Mouse Button is pressed.")]
public FsmEvent sendEvent;
public override void Reset()
{
sendEvent = null;
}
public override void OnUpdate()
{
if (Input.anyKeyDown)
{
Fsm.Event(sendEvent);
}
}
}
}