NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/PVP/PVPManager.cs

42 lines
981 B
C#

using System.Collections;
using System.Collections.Generic;
using Framework;
using Gameplay;
using Gameplay.Level;
using Gameplay.SubSystems;
using PhxhSDK;
using UnityEngine;
public partial class PVPManager : Singlenton<PVPManager>, IInitable
{
private LevelInfo _pvpLevelInfo;
public void Init()
{
EventManager.Instance.Register(EventManager.EventName.AllConfigLoad, OnAllConfigLoad);
}
public void Release()
{
EventManager.Instance.Unregister(EventManager.EventName.AllConfigLoad, OnAllConfigLoad);
}
private void OnAllConfigLoad()
{
var pvpLevelID = TableManager.Instance.Tables.GlobalConfig.PVPLevelID;
_pvpLevelInfo = LevelManager.Instance.GetLevelInfoByID(pvpLevelID);
if (_pvpLevelInfo == null)
{
DebugUtil.LogError($"找不到关卡配置,id:{pvpLevelID}");
return;
}
}
#region API
public void StartToMatch()
{
}
#endregion
}