using System; using System.Collections.Generic; using NodeCanvas.Framework; using ParadoxNotion; using ParadoxNotion.Design; using UnityEngine; using UnityEngine.InputSystem; namespace NodeCanvas.Tasks.Actions { [Category("Reset/Input")] [Description("Check if input condition was matched this frame by phase.")] public class CheckInputValue : ActionTask where T : struct{ public BBParameter actionName; public BBParameter outputTo; private T value; private SignalDefinition signalDefinition; protected override string info { get { return $"Get Value of Input: \"{actionName.value}\""; } } protected override string OnInit(){ try { signalDefinition = Resources.Load("InputSignal"); } catch (Exception e) { Debug.LogError($"Error finding the Input Signal defintion: {e.Message}"); throw; } return null; } protected override void OnExecute(){ // Debug.Log($"{outputTo.value}, {agent.actions[actionName.value].ReadValue()}"); outputTo.value = agent.actions[actionName.value].ReadValue(); EndAction(); } } }