How can we reconfigure this to either detect names from the Input Manager or enable us to manually input the string of the name for the Input Manager?
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Input)]
[Tooltip("Sends an Event when a Key is released.")]
public class GetKeyUpString : FsmStateAction
{
[RequiredField]
public KeyCode key;
public FsmEvent sendEvent;
[UIHint(UIHint.Variable)]
public FsmBool storeResult;
public override void Reset()
{
sendEvent = null;
key = KeyCode.None;
storeResult = null;
}
public override void OnUpdate()
{
bool keyUp = Input.GetKeyUp(key);
if (keyUp)
Fsm.Event(sendEvent);
storeResult.Value = keyUp;
}
}
}
My issue is I have logic that depends on a keyUp of a Joystick Button, but can't have that same logic for the Keyboard equivalent keyUp... of both the same action in the Input Manager (in this case 'Attack').