Rework of base interactables and managed behaviors
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Bootstrap;
|
||||
using Core;
|
||||
using Core.Lifecycle;
|
||||
using Interactions;
|
||||
using UnityEngine;
|
||||
using PuzzleS;
|
||||
@@ -12,7 +12,7 @@ namespace Dialogue
|
||||
{
|
||||
[AddComponentMenu("AppleHills/Dialogue/Dialogue Component")]
|
||||
[RequireComponent(typeof(AppleAudioSource))]
|
||||
public class DialogueComponent : MonoBehaviour
|
||||
public class DialogueComponent : ManagedBehaviour
|
||||
{
|
||||
[SerializeField] private RuntimeDialogueGraph dialogueGraph;
|
||||
|
||||
@@ -35,7 +35,9 @@ namespace Dialogue
|
||||
public string CurrentSpeakerName => dialogueGraph?.speakerName;
|
||||
|
||||
|
||||
private void Start()
|
||||
public override int ManagedAwakePriority => 150; // Dialogue systems
|
||||
|
||||
protected override void OnManagedAwake()
|
||||
{
|
||||
// Get required components
|
||||
appleAudioSource = GetComponent<AppleAudioSource>();
|
||||
@@ -58,11 +60,6 @@ namespace Dialogue
|
||||
speechBubble.UpdatePromptVisibility(HasAnyLines());
|
||||
}
|
||||
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
}
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Register for global events
|
||||
PuzzleManager.Instance.OnStepCompleted += OnAnyPuzzleStepCompleted;
|
||||
ItemManager.Instance.OnItemPickedUp += OnAnyItemPickedUp;
|
||||
|
||||
Reference in New Issue
Block a user