24 lines
811 B
C#
24 lines
811 B
C#
using UnityEngine;
|
|
|
|
[CreateAssetMenu(menuName = "CharacterStateMachine/Actions/WaitForInteractionAcceptance")]
|
|
public class WaitForInteractionAcceptance : Action
|
|
{
|
|
public override void StartAct(StateController controller)
|
|
{
|
|
controller.InitiateInteractionWithSelectedObject();
|
|
ProgressPanelController.ActivePanel.Reveal(controller.SelectedInteraction.interactionDescription);
|
|
}
|
|
|
|
public override void EndAct(StateController controller)
|
|
{
|
|
//Debug.Log("Finished waiting for acceptance");
|
|
}
|
|
|
|
private Interaction GetFirstInteraction(StateController controller)
|
|
{
|
|
if (controller.SelectedObject.interactions.Length > 0)
|
|
return controller.SelectedObject.interactions[0];
|
|
return controller.SelectedObject.spyInteractions[0];
|
|
}
|
|
}
|
|
|