Fix deprecation and other warnings

This commit is contained in:
Michal Pikulski
2025-11-10 23:18:01 +01:00
parent a049c6a750
commit 961da5e729
14 changed files with 16 additions and 48 deletions

View File

@@ -35,11 +35,7 @@ namespace Levels
[SerializeField] private bool startUnlocked = false;
private SpriteRenderer iconRenderer;
// Settings reference
private IInteractionSettings interactionSettings;
private bool switchActive = true;
private bool isUnlocked;
/// <summary>
@@ -48,8 +44,7 @@ namespace Levels
internal override void OnManagedAwake()
{
base.OnManagedAwake();
switchActive = true;
if (iconRenderer == null)
iconRenderer = GetComponent<SpriteRenderer>();
@@ -143,15 +138,7 @@ namespace Levels
{
return base.CanBeClicked() && isUnlocked;
}
/// <summary>
/// Setup: Prevent re-entry while interaction is in progress.
/// </summary>
protected override void OnInteractionStarted()
{
switchActive = false;
}
/// <summary>
/// Main interaction logic: Spawn menu and switch input mode.
/// </summary>
@@ -202,7 +189,7 @@ namespace Levels
private void OnMenuCancel()
{
switchActive = true; // Allow interaction again if cancelled
InputManager.Instance.SetInputMode(InputMode.GameAndUI);
}