49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using Cysharp.Threading.Tasks;
|
|
using Gameplay.Level;
|
|
using Gameplay.SubSystems;
|
|
using PhxhSDK;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Gameplay.LegionBattle
|
|
{
|
|
public sealed partial class LegionBattleManager : Singlenton<LegionBattleManager>, IUpdatable
|
|
{
|
|
/// <summary>
|
|
/// 军团战
|
|
/// </summary>
|
|
public LegionBattle CurLegionBattle { get; private set; }
|
|
|
|
public void Update(float deltaTime)
|
|
{
|
|
CurLegionBattle?.Update(deltaTime);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 加载军团战
|
|
/// </summary>
|
|
/// <param name="legionBattleMapId"></param>
|
|
/// <returns></returns>
|
|
public async UniTask<E_LoadingResult> LoadLegionBattle(int legionBattleMapId)
|
|
{
|
|
CurLegionBattle = new LegionBattle(legionBattleMapId);
|
|
await CurLegionBattle.Load();
|
|
|
|
return E_LoadingResult.Success;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 卸载军团战
|
|
/// </summary>
|
|
public async void UnloadLegionBattle()
|
|
{
|
|
if (null != CurLegionBattle)
|
|
{
|
|
await CurLegionBattle.Unload();
|
|
CurLegionBattle.Release();
|
|
CurLegionBattle = null;
|
|
}
|
|
}
|
|
}
|
|
} |