Fix input issues
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using AppleHills.Data.CardSystem;
|
||||
using Core;
|
||||
using Data.CardSystem;
|
||||
using Input;
|
||||
using Pixelplacement;
|
||||
using UI.Core;
|
||||
using UnityEngine;
|
||||
@@ -144,6 +145,10 @@ namespace UI.CardSystem
|
||||
if (notificationSound != null)
|
||||
notificationSound.Play();
|
||||
|
||||
// Eat input so the characters don't walk around
|
||||
var backpackInput = backpackIcon.gameObject.GetComponentInParent<BackpackInput>();
|
||||
InputManager.Instance.RegisterOverrideConsumer(backpackInput);
|
||||
|
||||
// If no pages are open, push the main menu
|
||||
if (_pageController.CurrentPage == null)
|
||||
{
|
||||
@@ -177,6 +182,8 @@ namespace UI.CardSystem
|
||||
if (newPage == null)
|
||||
{
|
||||
ShowOnlyBackpackIcon();
|
||||
var backpackInput = backpackIcon.gameObject.GetComponentInParent<BackpackInput>();
|
||||
InputManager.Instance.UnregisterOverrideConsumer(backpackInput);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user