2023-12-25 18:51:23 +08:00
|
|
|
using System.Collections.Generic;
|
2023-12-22 15:27:48 +08:00
|
|
|
using Framework;
|
|
|
|
|
using PhxhSDK;
|
|
|
|
|
|
2023-12-25 18:51:23 +08:00
|
|
|
public class SignUpManager: Singlenton<SignUpManager>, IInitable
|
2023-12-22 15:27:48 +08:00
|
|
|
{
|
2023-12-25 18:51:23 +08:00
|
|
|
private Dictionary<int, SignObjAccumulate> _accumulateDic;
|
|
|
|
|
|
|
|
|
|
public void Init()
|
|
|
|
|
{
|
|
|
|
|
_Init();
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.CheckNeedShowSignUp, _OnCheckShowSignUp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Release()
|
|
|
|
|
{
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.CheckNeedShowSignUp, _OnCheckShowSignUp);
|
|
|
|
|
}
|
|
|
|
|
private void _Init()
|
|
|
|
|
{
|
|
|
|
|
_accumulateDic = new Dictionary<int, SignObjAccumulate>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void _CreateSignObjs()
|
|
|
|
|
{
|
|
|
|
|
_CreateAccumulateObjs();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//创建累计充值的对象
|
|
|
|
|
private void _CreateAccumulateObjs()
|
|
|
|
|
{
|
|
|
|
|
if (_accumulateDic.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
_accumulateDic.Clear();
|
|
|
|
|
}
|
|
|
|
|
_CreateAccumulateObj(1);
|
|
|
|
|
}
|
2023-12-22 15:27:48 +08:00
|
|
|
|
2023-12-25 18:51:23 +08:00
|
|
|
private void _CreateAccumulateObj(int signId)
|
|
|
|
|
{
|
|
|
|
|
if (!_accumulateDic.ContainsKey(signId))
|
|
|
|
|
{
|
|
|
|
|
var accSignObj = SignObjAccumulate.CreateObj(signId);
|
|
|
|
|
_accumulateDic.Add(signId, accSignObj);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void _OnCheckShowSignUp()
|
|
|
|
|
{
|
|
|
|
|
_CreateSignObjs();
|
|
|
|
|
}
|
2023-12-22 15:27:48 +08:00
|
|
|
}
|