2024-11-06 13:33:47 +08:00
|
|
|
using cfg.StoryCfg;
|
|
|
|
|
using Code.Scripts.Gameplay.Game;
|
2024-05-17 19:27:02 +08:00
|
|
|
using Cysharp.Threading.Tasks;
|
2023-08-22 19:08:45 +08:00
|
|
|
using Framework;
|
|
|
|
|
using Gameplay;
|
2024-11-06 13:33:47 +08:00
|
|
|
using Gameplay.Data;
|
2023-08-22 19:08:45 +08:00
|
|
|
using Gameplay.SubSystems;
|
|
|
|
|
|
2023-10-19 15:00:19 +08:00
|
|
|
public class GameStateStart : IState
|
2023-08-22 19:08:45 +08:00
|
|
|
{
|
2024-06-11 13:15:54 +08:00
|
|
|
public void OnEnter()
|
2023-08-22 19:08:45 +08:00
|
|
|
{
|
2024-11-06 13:33:47 +08:00
|
|
|
_WaitLoading();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async void _WaitLoading()
|
|
|
|
|
{
|
|
|
|
|
switch (Main.Instance.startType)
|
|
|
|
|
{
|
|
|
|
|
case EGameStartType.Normal:
|
|
|
|
|
await LoadingManager.Instance.ExecuteLoading(new GameStartLoading());
|
|
|
|
|
break;
|
|
|
|
|
case EGameStartType.ForceStory:
|
|
|
|
|
await LoadingManager.Instance.ExecuteLoading(new FakeStoryStartLoadingExecutor());
|
|
|
|
|
var fakeStoryConfig = new DataStoryMain(
|
|
|
|
|
"fakeStory",
|
|
|
|
|
Main.Instance.startParam,
|
|
|
|
|
1,
|
2025-03-27 14:08:27 +08:00
|
|
|
30);
|
2024-11-06 13:33:47 +08:00
|
|
|
|
|
|
|
|
GameStateManager.Instance.ChangeState(new GameStateStory(fakeStoryConfig));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-22 19:08:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnUpdate(float deltaTime)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnExit()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|