2024-04-11 01:55:35 -07:00
|
|
|
using GadGame.Manager;
|
2024-04-15 04:10:00 -07:00
|
|
|
using GadGame.Network;
|
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 CTAState : State<MainFlow>
|
|
|
|
{
|
|
|
|
public override void Enter()
|
|
|
|
{
|
2024-04-24 02:42:04 -07:00
|
|
|
if(UdpSocket.Instance.DataReceived.Gender <= 0.3f) {
|
2024-04-23 20:04:04 -07:00
|
|
|
LoadSceneManager.Instance.LoadSceneWithTransition(Runner.SceneFlowConfig.CTASceneMale.ScenePath);
|
2024-04-24 02:42:04 -07:00
|
|
|
} else if (UdpSocket.Instance.DataReceived.Gender >= 0.7f){
|
2024-04-23 20:04:04 -07:00
|
|
|
LoadSceneManager.Instance.LoadSceneWithTransition(Runner.SceneFlowConfig.CTASceneFemale.ScenePath);
|
2024-04-24 02:42:04 -07:00
|
|
|
} else {
|
2024-04-25 04:54:33 -07:00
|
|
|
LoadSceneManager.Instance.LoadSceneWithTransition(Runner.SceneFlowConfig.CTASceneFemale.ScenePath);
|
2024-04-23 20:04:04 -07:00
|
|
|
}
|
2024-04-11 01:55:35 -07:00
|
|
|
}
|
|
|
|
|
2024-04-25 23:57:30 -07:00
|
|
|
public async override void Update(float time)
|
2024-04-11 01:55:35 -07:00
|
|
|
{
|
2024-04-19 03:46:17 -07:00
|
|
|
if (time >= 10)
|
2024-04-15 04:10:00 -07:00
|
|
|
{
|
2024-04-25 04:54:33 -07:00
|
|
|
Runner.SetState<IdleState>();
|
2024-04-25 23:57:30 -07:00
|
|
|
await LoadSceneManager.Instance.LoadSceneWithTransitionAsync(Runner.SceneFlowConfig.PassByScene.ScenePath);
|
2024-04-15 04:10:00 -07:00
|
|
|
}
|
2024-04-11 01:55:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public override void Exit()
|
|
|
|
{
|
2024-04-19 03:46:17 -07:00
|
|
|
|
2024-04-11 01:55:35 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|