using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using System;
|
using System.Linq;
|
|
//通用基金界面战令
|
public partial class BattlePassManager : GameSystemManager<BattlePassManager>
|
{
|
|
//战令类型:红点 通用基金界面
|
Dictionary<int, Redpoint> redpointCommonDict = new Dictionary<int, Redpoint>();
|
|
//通用战令对应的功能id
|
public Dictionary<int, int> typeToFuncIDDict = new Dictionary<int, int>()
|
{
|
{1, 40},
|
{2, 40},
|
{3, 40},
|
{4, 28},
|
{5, 27},
|
};
|
|
public int[] battlePassTypeSortList;
|
|
|
//1-主公等级;2-祝福等级;3-主线关卡;4-古宝数量;5-演武场次数;
|
void UpdateCommonBPRedpoint(int _type)
|
{
|
if (!redpointCommonDict.ContainsKey(_type))
|
{
|
return;
|
}
|
if (!FuncOpen.Instance.IsFuncOpen(typeToFuncIDDict[_type]))
|
{
|
return;
|
}
|
redpointCommonDict[_type].state = RedPointState.None;
|
battlePassDataDict.TryGetValue(_type, out BattlePassData battlePassData);
|
if (battlePassData == null) return;
|
int totalValue = 0;
|
switch ((BattlePassType)_type)
|
{
|
case BattlePassType.LV:
|
{
|
totalValue = PlayerDatas.Instance.baseData.LV;
|
break;
|
}
|
case BattlePassType.BlessLV:
|
{
|
totalValue = BlessLVManager.Instance.m_TreeLV;
|
break;
|
}
|
case BattlePassType.MainLine:
|
{
|
totalValue = PlayerDatas.Instance.baseData.ExAttr1 / 100;
|
break;
|
}
|
case BattlePassType.GuBao:
|
{
|
totalValue = (int)battlePassData.value1;
|
break;
|
}
|
case BattlePassType.Arena:
|
{
|
totalValue = (int)battlePassData.value1;
|
break;
|
}
|
}
|
|
if (HasAnyAward(_type, totalValue))
|
{
|
redpointCommonDict[_type].state = RedPointState.Simple;
|
}
|
}
|
|
|
}
|