smart-interactive-display/Assets/GadGame/Scripts/State/MainFlowState/CTAState.cs

30 lines
622 B
C#
Raw Normal View History

2024-04-11 01:55:35 -07:00
using UnityEngine;
using GadGame.Manager;
namespace GadGame.State
{
public class CTAState : State<MainFlow>
{
private float _timer;
public override void Enter()
{
LoadSceneManager.Instance.LoadSceneWithTransition(Runner.SceneFlowConfig.CTAScene.ScenePath);
_timer = 0;
}
public override void Update()
{
_timer += Time.deltaTime;
if (_timer >= 10)
{
Runner.SetState(typeof(IdleState));
}
}
public override void Exit()
{
}
}
}