Rework of base interactables and managed behaviors
This commit is contained in:
committed by
Michal Pikulski
parent
00e1746ac4
commit
f88bd0e2c9
@@ -1,6 +1,6 @@
|
||||
using System.Collections;
|
||||
using Bootstrap;
|
||||
using Core;
|
||||
using Core.Lifecycle;
|
||||
using Core.SaveLoad;
|
||||
using Input;
|
||||
using Pixelplacement;
|
||||
@@ -9,7 +9,7 @@ using UnityEngine;
|
||||
|
||||
namespace UI.Tutorial
|
||||
{
|
||||
public class DivingTutorial : MonoBehaviour, ITouchInputConsumer
|
||||
public class DivingTutorial : ManagedBehaviour, ITouchInputConsumer
|
||||
{
|
||||
public enum ProgressType
|
||||
{
|
||||
@@ -27,18 +27,14 @@ namespace UI.Tutorial
|
||||
private bool _canAcceptInput;
|
||||
private Coroutine _waitLoopCoroutine;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
BootCompletionService.RegisterInitAction(InitializeTutorial);
|
||||
public override int ManagedAwakePriority => 200; // Tutorial runs late, after other systems
|
||||
|
||||
protected override void OnManagedAwake()
|
||||
{
|
||||
// Ensure prompt is hidden initially (even before tutorial initialization)
|
||||
if (tapPrompt != null)
|
||||
tapPrompt.SetActive(false);
|
||||
}
|
||||
|
||||
void InitializeTutorial()
|
||||
{
|
||||
if (playTutorial && !SaveLoadManager.Instance.currentSaveData.playedDivingTutorial)
|
||||
{
|
||||
// TODO: Possibly do it better, but for now just mark tutorial as played immediately
|
||||
@@ -221,7 +217,7 @@ namespace UI.Tutorial
|
||||
// Manual mode: enable input and wait for player tap
|
||||
SetInputEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
_waitLoopCoroutine = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user