refactor on journey runtime manager
This commit is contained in:
parent
91c193dc8a
commit
296bae093e
@ -23,8 +23,6 @@ namespace Intrepid.Gameplay.Journey.Runtime
|
|||||||
[GroupInjections, SerializeField] private JourneyGameplayGate gameplayGate;
|
[GroupInjections, SerializeField] private JourneyGameplayGate gameplayGate;
|
||||||
[GroupInjections, SerializeField] private JourneyLandingService landingService;
|
[GroupInjections, SerializeField] private JourneyLandingService landingService;
|
||||||
|
|
||||||
public bool IsBooted { get; private set; }
|
|
||||||
|
|
||||||
public void StartBoot(
|
public void StartBoot(
|
||||||
JourneyRuntimeBootMode bootMode,
|
JourneyRuntimeBootMode bootMode,
|
||||||
Action<StageTag> onFinished,
|
Action<StageTag> onFinished,
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Intrepid.Diagnostics;
|
using Intrepid.Diagnostics;
|
||||||
using Intrepid.FSM;
|
using Intrepid.FSM;
|
||||||
@ -9,7 +10,8 @@ namespace Intrepid.Gameplay.Journey.Runtime.Loading
|
|||||||
private FStateMachine<StageTag, StageLoadingService> StateMachine { get; } = new();
|
private FStateMachine<StageTag, StageLoadingService> StateMachine { get; } = new();
|
||||||
private IState<StageTag, StageLoadingService> CurrentState => StateMachine.GetCurrentState();
|
private IState<StageTag, StageLoadingService> CurrentState => StateMachine.GetCurrentState();
|
||||||
|
|
||||||
public StageTag CurrentStageTag => CurrentState.GetStateKey();
|
public StageTag CurrentStageTag => CurrentState?.GetStateKey();
|
||||||
|
public bool HasCurrentStage => CurrentStageTag.IsNotNull();
|
||||||
public bool IsLoadingFinished => CurrentState?.Implementation()?.IsLoadingFinished ?? false;
|
public bool IsLoadingFinished => CurrentState?.Implementation()?.IsLoadingFinished ?? false;
|
||||||
public bool IsRunning => StateMachine.IsRunning;
|
public bool IsRunning => StateMachine.IsRunning;
|
||||||
|
|
||||||
|
|||||||
@ -29,9 +29,6 @@ namespace Intrepid.Gameplay.Journey.Runtime.Transition
|
|||||||
private Action<JourneyTravelRequest> OnFinished { get; set; }
|
private Action<JourneyTravelRequest> OnFinished { get; set; }
|
||||||
private Action<JourneyTravelRequest> OnFailed { get; set; }
|
private Action<JourneyTravelRequest> OnFailed { get; set; }
|
||||||
|
|
||||||
public JourneyStageLoader StageLoader => stageLoader;
|
|
||||||
public JourneyLandingService LandingService => landingService;
|
|
||||||
public JourneyGameplayGate GameplayGate => gameplayGate;
|
|
||||||
public bool IsRunning => CurrentRequest is not null;
|
public bool IsRunning => CurrentRequest is not null;
|
||||||
public bool IsProcessFinished =>
|
public bool IsProcessFinished =>
|
||||||
CurrentRequest is not null &&
|
CurrentRequest is not null &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user