mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-15 09:16:08 +07:00
28 lines
596 B
C#
Executable File
28 lines
596 B
C#
Executable File
// (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);
|
|
}
|
|
}
|
|
}
|
|
} |