| | |
| | | using System.Collections.Generic;
|
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class MainRedDot : Singleton<MainRedDot> {
|
| | |
|
| | |
|
| | | public class MainRedDot : Singleton<MainRedDot>
|
| | | {
|
| | | public const int RedPoint_key = 1;
|
| | | public const int FAIRY_REDPOINT_KEY1 = 107;
|
| | | public const int RedPoint_key1 = 106;
|
| | | public const int RedPoint_UpFuncBase = 2;
|
| | | public const int RedPoint_VipDot = 35;//VIP界面
|
| | |
|
| | | private Redpoint redPointStrePrentOne = new Redpoint(RedPoint_key);
|
| | | private Redpoint redPointStrePrent = new Redpoint(RedPoint_key,RedPoint_key1);
|
| | | private Redpoint redpointUpFuncBase = new Redpoint(RedPoint_UpFuncBase);
|
| | | private Redpoint welfareRedPoint = new Redpoint(RedPoint_UpFuncBase, 201);
|
| | | private Redpoint rightTopRedpint = new Redpoint(RedPoint_UpFuncBase);
|
| | | private Redpoint redPointStrePrent = new Redpoint(RedPoint_key, RedPoint_key1);
|
| | | private Redpoint welfareRedPoint = new Redpoint(201);
|
| | | private Redpoint realmRedpoint = new Redpoint(114);
|
| | | private Redpoint redPointVipDot = new Redpoint(RedPoint_VipDot);
|
| | |
|
| | |
| | | public const int RedPoint_BagFuncKey = 10201;
|
| | | public const int RedPoint_DepotFuncKey = 10204;
|
| | | public Redpoint redPointMainPack = new Redpoint(RedPoint_MainPackKey);
|
| | | public Redpoint redPointBagFunc = new Redpoint(RedPoint_MainPackKey,RedPoint_BagFuncKey);
|
| | | public Redpoint redPointBagFunc = new Redpoint(RedPoint_MainPackKey, RedPoint_BagFuncKey);
|
| | | public Redpoint redPointDepotFunc = new Redpoint(RedPoint_MainPackKey, RedPoint_DepotFuncKey);
|
| | | #endregion
|
| | |
|
| | | #region 洗炼红点
|
| | | public const int RedPoint_WashFuncKey = 10605;
|
| | | public Redpoint redPointWashFunc = new Redpoint(RedPoint_key1,RedPoint_WashFuncKey);
|
| | | public Redpoint redPointWashFunc = new Redpoint(RedPoint_key1, RedPoint_WashFuncKey);
|
| | | #endregion
|
| | |
|
| | | #region 套装红点
|
| | |
| | | #endregion
|
| | |
|
| | | #region 仙盟公用红点
|
| | | public const int FAIRY_REDPOINT_KEY2 = 10701; |
| | | public const int FAIRY_REDPOINT_KEY2 = 10701;
|
| | | public Redpoint fairyLaunch = new Redpoint(RedPoint_key, FAIRY_REDPOINT_KEY1);
|
| | | public Redpoint fairyBaseFuncRedPoint = new Redpoint(FAIRY_REDPOINT_KEY1, FAIRY_REDPOINT_KEY2);
|
| | | #endregion
|
| | |
| | | #endregion
|
| | |
|
| | | #region 仙盟活动红点
|
| | | public readonly Redpoint fairyActivityRedpoint = new Redpoint(2, 218);
|
| | | public readonly Redpoint fairyActivityRedpoint = new Redpoint(218);
|
| | | #endregion
|
| | |
|
| | | public void Register()
|
| | | {
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= OnRedpointChange;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += OnRedpointChange;
|
| | | }
|
| | |
|
| | | List<int> rightTopHideRedpoints = new List<int>()
|
| | | {
|
| | | 22,
|
| | | 37,
|
| | | 201,
|
| | | 203,
|
| | | 210,
|
| | | 212,
|
| | | 214,
|
| | | 216,
|
| | | 218,
|
| | | };
|
| | |
|
| | | private void OnRedpointChange(int id)
|
| | | {
|
| | | if (rightTopHideRedpoints.Contains(id))
|
| | | {
|
| | | var redpiontState = RedPointState.None;
|
| | | for (int i = 0; i < rightTopHideRedpoints.Count; i++)
|
| | | {
|
| | | var redpointId = rightTopHideRedpoints[i];
|
| | | if (RedpointCenter.Instance.GetRedpointState(redpointId) != RedPointState.None)
|
| | | {
|
| | | redpiontState = RedPointState.Simple;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | rightTopRedpint.state = redpiontState;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|