You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
823 B
26 lines
823 B
using ET.EventType; |
|
using ET.FUIBattle; |
|
using UnityEngine; |
|
|
|
namespace ET |
|
{ |
|
public class BattleEnd_RemoveComponent : AEvent<EventType.BattleEnd> |
|
{ |
|
protected override void Run(BattleEnd args) |
|
{ |
|
RunAsync(args).Coroutine(); |
|
} |
|
|
|
private async ETTask RunAsync(BattleEnd args) |
|
{ |
|
var zoneScene = args.Unit.ZoneScene(); |
|
var fuiComp = zoneScene.GetComponent<FUIComponent>(); |
|
var battleMain = fuiComp.GetUI(FUI_BattleMain.UIResName) as FUIBattleMainComponent; |
|
battleMain.ShowBattleResult(args.IsWin); |
|
|
|
await TimerComponent.Instance.WaitAsync(1000); |
|
await BattleHelper.ExitBattle(args.Unit); |
|
zoneScene.CurrentScene().RemoveComponent<BattleManagerComponent>(); |
|
} |
|
} |
|
} |