Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
BDeshiDev committed Feb 1, 2024
2 parents 8d16921 + ba7e3e0 commit 778af33
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace Studio23.SS2.InteractionSystem.Abstract
{
public abstract class InputPromptsControllerBase : MonoBehaviour
{
public UnityEvent<InteractableBase> OnInteractableConfirmed;
public UnityEvent<InteractableBase> OnInteractableConfirmationStarted;
public UnityEvent<InteractableBase> OnInteractableConfirmationCancelled;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public async UniTask ConfirmInteraction(InteractableBase interactableBase)
{
_view.HidePrompts();
_model.ClearPrompts();
OnInteractableConfirmed?.Invoke(interactableBase);
InteractionManager.Instance.StartNewInteraction(interactableBase);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,7 @@ private void RefreshCancellationToken()
_subInteractionCancellationTokens = new CancellationTokenSource();
}

private void HandleInteractableConfirmationCompleted(InteractableBase obj)
{
StartNewInteraction(obj);
}


public void ShowNewInteractables(List<InteractableBase> interactables)
{
Expand Down Expand Up @@ -196,7 +193,6 @@ private void HandleInteractableConfirmationCancelled(InteractableBase obj)

private void Start()
{
_inputPromptsController.OnInteractableConfirmed.AddListener(HandleInteractableConfirmationCompleted);
_inputPromptsController.OnInteractableConfirmationStarted.AddListener(HandleInteractableConfirmationStarted);
_inputPromptsController.OnInteractableConfirmationCancelled.AddListener(HandleInteractableConfirmationCancelled);
}
Expand All @@ -211,7 +207,6 @@ private void OnDestroy()

if (_inputPromptsController != null)
{
_inputPromptsController.OnInteractableConfirmed.RemoveListener(HandleInteractableConfirmationCompleted);
_inputPromptsController.OnInteractableConfirmationStarted.RemoveListener(HandleInteractableConfirmationStarted);
_inputPromptsController.OnInteractableConfirmationCancelled.RemoveListener(HandleInteractableConfirmationCancelled);
}
Expand Down

0 comments on commit 778af33

Please sign in to comment.