| | |
| | | public int exp; //当前阶等级经验,每级从0开始
|
| | | public event Action OnHorseUpdateEvent;
|
| | |
|
| | | public int lastClassLV; //皮肤界面点击后红点刷新
|
| | |
|
| | | Dictionary<int, HorseSkin> skinDic = new Dictionary<int, HorseSkin>();
|
| | | public event Action OnSkinUpdateEvent;
|
| | |
| | | horseLV = 0;
|
| | | exp = 0;
|
| | | skinDic.Clear();
|
| | | lastClassLV = 0;
|
| | | }
|
| | |
|
| | | void OnPlayerLoginOk()
|
| | |
| | | UIManager.Instance.OpenWindow<HorseSuccessWin>();
|
| | | }
|
| | |
|
| | | if (!DTC0403_tagPlayerLoginLoadOK.finishedLogin)
|
| | | {
|
| | | lastClassLV = classLV;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
| | | }
|
| | |
|
| | | //皮肤红点
|
| | | public void UpdateSkinRedpoint()
|
| | | void UpdateSkinRedpoint()
|
| | | {
|
| | | skinRedpoint.state = RedPointState.None;
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Horse))
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | //升阶解锁红点
|
| | | foreach (var lv in HorseSkinConfig.rankLVList)
|
| | | {
|
| | | if (classLV >= lv && lastClassLV < lv)
|
| | | {
|
| | | skinRedpoint.state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | //升星解锁红点
|
| | | //升星/解锁红点
|
| | | foreach (var skin in HorseSkinConfig.GetValues())
|
| | | {
|
| | | if (skin.UnlockWay != 2)
|
| | | continue;
|
| | |
|
| | | if (IsSkinActive(skin.SkinID))
|
| | | {
|
| | | if (skin.StarMax > 0)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | //皮肤解锁红点
|
| | | int itemID = skin.UnlockValue;
|
| | | var count = PackManager.Instance.GetItemCountByID(PackType.Item, itemID);
|
| | | if (count >= skin.UnlockNeedCnt)
|
| | |
|
| | | if (skin.UnlockWay == 1)
|
| | | {
|
| | | skinRedpoint.state = RedPointState.Simple;
|
| | | return;
|
| | | if (classLV >= skin.UnlockValue && skin.UnlockValue > 0)
|
| | | {
|
| | | skinRedpoint.state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | //皮肤解锁红点
|
| | | int itemID = skin.UnlockValue;
|
| | | var count = PackManager.Instance.GetItemCountByID(PackType.Item, itemID);
|
| | | if (count >= skin.UnlockNeedCnt)
|
| | | {
|
| | | skinRedpoint.state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return true;
|
| | | }
|
| | | }
|
| | | var skinConfig = HorseSkinConfig.Get(id);
|
| | | if (skinConfig.UnlockWay == 1)
|
| | | var config = HorseSkinConfig.Get(id);
|
| | | if (config.UnlockWay == 1 && config.UnlockValue == 0)
|
| | | {
|
| | | return classLV >= skinConfig.UnlockValue;
|
| | | return true;
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsShowTheHorseRedImg(int skinID)
|
| | | {
|
| | | var skin = HorseSkinConfig.Get(skinID);
|
| | | int lv = skin.UnlockWay == 1 ? skin.UnlockValue : 0;
|
| | | //升阶解锁红点
|
| | | if (classLV >= lv && lastClassLV < lv)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
|
| | | //升星解锁红点
|
| | | if (skin.UnlockWay != 2)
|
| | | return false;
|
| | |
|
| | | if (IsSkinActive(skin.SkinID))
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | //皮肤解锁红点
|
| | | int itemID = skin.UnlockValue;
|
| | | var count = PackManager.Instance.GetItemCountByID(PackType.Item, itemID);
|
| | | if (count >= skin.UnlockNeedCnt)
|
| | |
|
| | | if (skin.UnlockWay == 1)
|
| | | {
|
| | | return true;
|
| | | if (classLV >= skin.UnlockValue && skin.UnlockValue > 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | //皮肤解锁红点
|
| | | int itemID = skin.UnlockValue;
|
| | | var count = PackManager.Instance.GetItemCountByID(PackType.Item, itemID);
|
| | | if (count >= skin.UnlockNeedCnt)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | } |
| | | }
|
| | | return false;
|
| | | }
|