2024-11-21 17:39:33 +08:00
|
|
|
using Framework;
|
2023-12-14 19:00:39 +08:00
|
|
|
using Gameplay.Unit;
|
2024-11-14 14:22:30 +08:00
|
|
|
using LTGame;
|
2023-08-22 19:08:45 +08:00
|
|
|
using TGS;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Gameplay.Level
|
|
|
|
|
{
|
2024-11-14 14:22:30 +08:00
|
|
|
public class LevelStateEnd : BaseLevelState
|
2023-08-22 19:08:45 +08:00
|
|
|
{
|
2024-11-14 14:22:30 +08:00
|
|
|
|
|
|
|
|
public LevelStateEnd(Level level) : base(level, ELevelState.End)
|
2023-08-22 19:08:45 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-25 16:19:44 +08:00
|
|
|
protected override async void _OnEnter(NBaseState exitState,
|
2024-11-14 14:22:30 +08:00
|
|
|
object param)
|
2023-08-22 19:08:45 +08:00
|
|
|
{
|
2024-11-14 14:22:30 +08:00
|
|
|
base._OnEnter(exitState, param);
|
|
|
|
|
|
|
|
|
|
_level.SetPause(true);
|
2024-11-21 17:39:33 +08:00
|
|
|
EventManager.Instance.Send(EventManager.EventName.FightStoryHide);
|
2024-11-22 14:25:49 +08:00
|
|
|
_WaitBlackOut();
|
2024-11-25 16:19:44 +08:00
|
|
|
var level = LevelManager.Instance.CurrentLevel;
|
|
|
|
|
if (level != null)
|
|
|
|
|
{
|
|
|
|
|
var levelInfo = level.GetLevelInfo();
|
|
|
|
|
if (levelInfo != null && levelInfo.fightStoryData != null)
|
|
|
|
|
{
|
|
|
|
|
if (LevelManager.Instance.IsFightStorySettle)
|
|
|
|
|
{
|
|
|
|
|
DebugUtil.Log("FightStory Level Settle");
|
|
|
|
|
await LevelManager.Instance.SettleFightStory();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
LevelManager.Instance.IsFightStorySettle = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//EventManager.Instance.Register(EventManager.EventName.FightStorySettle, _OnSettle);
|
2023-08-22 19:08:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void _OnCellClick(TerrainGridSystem tgs, int cellIndex, int buttonIndex)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void _OnClick(Vector2 screenPosition)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-25 16:19:44 +08:00
|
|
|
// protected override void _OnExit(NBaseState exitState, object param)
|
|
|
|
|
// {
|
|
|
|
|
// base._OnExit(exitState, param);
|
|
|
|
|
//
|
|
|
|
|
// //EventManager.Instance.Unregister(EventManager.EventName.FightStorySettle, _OnSettle);
|
|
|
|
|
// }
|
|
|
|
|
|
2024-11-14 14:22:30 +08:00
|
|
|
|
2024-11-25 16:19:44 +08:00
|
|
|
// private void _OnSettle()
|
|
|
|
|
// {
|
|
|
|
|
//
|
|
|
|
|
// }
|
2023-08-22 19:08:45 +08:00
|
|
|
}
|
|
|
|
|
}
|