This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
project-undercover/Project Undercover/Assets/Scripts/CharacterStateMachine/DecisionScripts/InitiatedInteractionDecision.cs

13 lines
447 B
C#
Raw Normal View History

2017-10-09 18:55:07 -05:00
using UnityEngine;
[CreateAssetMenu(menuName = "CharacterStateMachine/Decisions/InitiatedInteraction")]
public class InitiatedInteractionDecision : Decision
{
public override bool Decide(StateController controller)
{
return Input.GetKeyDown(KeyCode.E) &&
InteractionPanelController.InteractionPrompted() &&
controller.SelectedObject != null &&
controller.SelectedInteraction != null;
}
}