smart-interactive-display/Assets/GadGame/Scripts/MainFlow.cs

37 lines
809 B
C#
Raw Normal View History

using System;
using GadGame.Manager;
2024-04-11 01:55:35 -07:00
using GadGame.SO;
using GadGame.State;
2024-04-15 04:10:00 -07:00
using GadGame.State.MainFlowState;
using Sirenix.OdinInspector;
2024-04-11 01:55:35 -07:00
2024-04-15 04:10:00 -07:00
namespace GadGame
2024-04-11 01:55:35 -07:00
{
public class MainFlow : SingletonStateRunner<MainFlow>
2024-04-11 01:55:35 -07:00
{
public SceneFlowConfig SceneFlowConfig;
public event Action<float> OnReadyCountDown;
public event Action<bool> OnReady;
2024-04-11 01:55:35 -07:00
protected override void Awake()
{
base.Awake();
DontDestroyOnLoad(gameObject);
}
private void Start()
{
2024-04-15 04:10:00 -07:00
SetState<IdleState>();
2024-04-11 01:55:35 -07:00
}
public void ReadyCountDown(float duration)
{
OnReadyCountDown?.Invoke(duration);
}
public void Ready(bool ready)
{
OnReady?.Invoke(ready);
}
2024-04-11 01:55:35 -07:00
}
}