2024-04-25 04:54:33 -07:00
|
|
|
using System.Diagnostics;
|
2024-04-11 01:55:35 -07:00
|
|
|
using GadGame.Manager;
|
|
|
|
using GadGame.Network;
|
2024-04-25 04:54:33 -07:00
|
|
|
using UnityEngine.SceneManagement;
|
2024-04-11 01:55:35 -07:00
|
|
|
|
2024-04-15 04:10:00 -07:00
|
|
|
namespace GadGame.State.MainFlowState
|
2024-04-11 01:55:35 -07:00
|
|
|
{
|
|
|
|
public class IdleState : State<MainFlow>
|
|
|
|
{
|
2024-04-25 04:54:33 -07:00
|
|
|
|
2024-04-11 01:55:35 -07:00
|
|
|
public override void Enter()
|
|
|
|
{
|
2024-04-25 04:54:33 -07:00
|
|
|
PassByAnimation.Instance.Play(false);
|
|
|
|
PassByAnimation.Instance.SetPlayVideo(true);
|
2024-04-11 01:55:35 -07:00
|
|
|
}
|
|
|
|
|
2024-04-15 04:10:00 -07:00
|
|
|
public override void Update(float time)
|
2024-04-11 01:55:35 -07:00
|
|
|
{
|
2024-04-25 04:54:33 -07:00
|
|
|
// if(time < 2) return;
|
2024-04-22 02:10:49 -07:00
|
|
|
|
|
|
|
if (UdpSocket.Instance.DataReceived.PassBy)
|
2024-04-17 20:53:46 -07:00
|
|
|
{
|
2024-04-22 02:10:49 -07:00
|
|
|
Runner.SetState<PassByState>();
|
2024-04-17 20:53:46 -07:00
|
|
|
return;
|
|
|
|
}
|
2024-04-22 02:10:49 -07:00
|
|
|
|
|
|
|
if (UdpSocket.Instance.DataReceived.Engage)
|
2024-04-11 01:55:35 -07:00
|
|
|
{
|
2024-04-22 02:10:49 -07:00
|
|
|
Runner.SetState<EngageState>();
|
2024-04-17 20:53:46 -07:00
|
|
|
return;
|
2024-04-11 01:55:35 -07:00
|
|
|
}
|
2024-04-22 02:10:49 -07:00
|
|
|
// if (UdpSocket.Instance.DataReceived.OnVision)
|
|
|
|
// {
|
|
|
|
// Runner.SetState<ViewedState>();
|
|
|
|
// return;
|
|
|
|
// }
|
2024-04-11 01:55:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public override void Exit()
|
|
|
|
{
|
2024-04-25 04:54:33 -07:00
|
|
|
PassByAnimation.Instance.SetPlayVideo(false);
|
2024-04-11 01:55:35 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|