| | |
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, November 16, 2017
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | |
|
| | |
|
| | |
|
| | | 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界面
|
| | | public const int RedPoint_Share = 66; //sdk分享等
|
| | |
|
| | | private Redpoint rightTopRedpint = new Redpoint(RedPoint_UpFuncBase);
|
| | |
|
| | | private Redpoint redPointStrePrentOne = new Redpoint(RedPoint_key);
|
| | | 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 Redpoint rankActRepoint = new Redpoint(RankActRepoint);
|
| | |
|
| | | #region 角色红点
|
| | | public Redpoint roleRedpoint = new Redpoint(RedPoint_key, 101);
|
| | | public Redpoint roleTagRedpoint = new Redpoint(101, 10101);
|
| | | #endregion
|
| | |
|
| | | //public Redpoint jadeDynastyRedpoint = new Redpoint(1, 117);
|
| | |
|
| | |
| | | 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);
|
| | | #endregion
|
| | |
|
| | | #region 套装红点
|
| | | public const int RedPoint_SuitFuncKey = 10604;
|
| | | public Redpoint redPointSuitFunc = new Redpoint(RedPoint_key1, RedPoint_SuitFuncKey);
|
| | | #endregion
|
| | |
|
| | |
|
| | | #region 仙盟公用红点
|
| | | public const int FAIRY_REDPOINT_KEY2 = 10701;
|
| | |
| | | public Redpoint fairyBaseFuncRedPoint = new Redpoint(FAIRY_REDPOINT_KEY1, FAIRY_REDPOINT_KEY2);
|
| | | #endregion
|
| | |
|
| | | #region 仙盟活跃红点
|
| | | public const int FAIRYLiven_REDPOINT_KEY3 = 1070107;
|
| | | public Redpoint fairyLivenRedPoint = new Redpoint(FAIRY_REDPOINT_KEY2, FAIRYLiven_REDPOINT_KEY3);
|
| | | #endregion
|
| | |
|
| | |
|
| | | #region 仙盟商店红点
|
| | | public const int FAIRYStore_REDPOINT_KEY3 = 1070106;
|
| | |
| | | #endregion
|
| | |
|
| | |
|
| | | #region 坐骑红点/灵宠红点
|
| | |
|
| | | public const int RedPoint_PetKey = 105;
|
| | | public Redpoint redPointPetKeyFunc = new Redpoint(RedPoint_key, RedPoint_PetKey);
|
| | | public const int RedPoint_MountPackKey = 10501;
|
| | | public Redpoint redPointMountFunc = new Redpoint(RedPoint_PetKey, RedPoint_MountPackKey);
|
| | | public const int RedPoint_PetKey2 = 10502;
|
| | | public Redpoint redPonintPetFunc2 = new Redpoint(RedPoint_PetKey, RedPoint_PetKey2);
|
| | | #endregion
|
| | |
|
| | | #region 开服活动红点
|
| | | public const int REDPOINT_OPENSERVER = 209;
|
| | |
| | | public readonly Redpoint fairyActivityRedpoint = new Redpoint(218);
|
| | | #endregion
|
| | |
|
| | | //IL红点 从400开始使用,单红点(400-599)尽量按顺序排
|
| | | public static int jpbnRedPoint = 401; //极品白拿
|
| | | public static int zxthRedPoint = 402; //在线特惠
|
| | | public static int gntqRedPoint = 403; //功能特权卡
|
| | | public static int hfhdRedPoint = 406; //合服活动
|
| | | public static int faqiRedPoint = 408; //修炼(法器)红点
|
| | | public static int wfqzRedPoint = 409; //玩法前瞻
|
| | | public static int QYRedPoint = 410; //情缘
|
| | | public static int SugarRedPoint = 411; //喜糖
|
| | | public static int CharmRedPoint = 412; //提升魅力
|
| | | public static int XYYGRedPoint = 413; //幸运云购
|
| | | public static int GSCJRedPoint = 416; //古神成就
|
| | | public static int TTLRedPoint = 418; //通天令
|
| | | public static int TDLBRedPoint = 421; //天帝礼包
|
| | | public static int CrossServerQualifyingRedPoint = 423; //跨服(万界)争霸
|
| | | public static int cbgRedpoint = 428; //藏宝阁红点
|
| | | public static int achievementRedpoint = 431; //成就红点
|
| | | public static int buy1Free5Redpoint = 433; //买1送5红点
|
| | | public static int RechargeGenerousGiftWinRedpoint = 434; //充值豪礼入口
|
| | | public static int LvZhanlingRedpoint = 435; //等级战令入口红点
|
| | | public static int RealmLvZhanlingRedpoint = 436; //境界战令入口红点
|
| | | public static int CelestialStarTowerRedpoint = 437; //天星塔战令入口红点
|
| | | public static int GuBaoTotalStarsRedpoint = 438; //古宝战令入口红点
|
| | | public static int DailySpecialsRedpoint = 439; //每日特惠入口红点
|
| | | public static int CZBMRedpoint = 440; //成长必买入口红点
|
| | |
|
| | | // boss首杀
|
| | | public const int REDPOINT_BOSSFIRSTKILL = 600;
|
| | | public const int ForeverCardRedPoint = 441; //终身卡红点
|
| | | public const int BossTrialRepoint = 442; //boss凭证
|
| | | public const int NewDayActionRedPoint = 443; //日期型(类节日)活动
|
| | |
|
| | | public static int BlessedLandRedpoint = 444; //福地红点
|
| | | public const int FuyuanSumRechargeRedpoint = 445; //福缘- 累充
|
| | | public const int OnHookRedpoint = 446; //挂机
|
| | | public const int RedPoint_FamilyRecharge = 447; //仙盟充值协助
|
| | | public const int CustomizedGiftRedpoint = 448; //自选礼包
|
| | | public const int LoginZhanLingRedpoint = 449; //登录战令
|
| | | public const int GatheringSoulZhanLingRedpoint = 450; //聚魂战令
|
| | | public const int TreasureLuckyDrawRedpoint = 451; //古宝抽奖
|
| | | public const int MjxbRedpoint = 452; //秘境寻宝
|
| | | public const int CrossServerGodBattleFieldAssort = 453; //古神战场组队
|
| | | public const int GatherSourRedpointEnter = 454; //聚魂入口红点
|
| | | public const int QCTrainActRedpoint = 455; //骑宠养成活动
|
| | | public const int RankActRepoint = 456; //排行榜活动的中介红点
|
| | | public const int TreasurePavilionRankActRepoint = 457; //古宝养成排行榜活动
|
| | | public const int CelestialPalaceRepoint = 458; //仙宫
|
| | | public const int PhantasmPavilionRepoint = 459; //幻境阁
|
| | | public const int PhantasmPavilionZhanLingRepoint = 460; //幻境战令
|
| | | public const int FairyAffinityRepoint = 461; //仙缘
|
| | | public const int FairyEmbleManageRepoint = 462;//仙盟徽章管理入口红点
|
| | | public const int CycleHallRepoint = 463; //轮回殿
|
| | | public const int YunShiRepoint = 464; //运势
|
| | | public const int LianQiRepoint = 465; //仙匠大会
|
| | | public const int FairySiegeRepoint = 466; //仙盟攻城战
|
| | | public const int MailRepoint = 467; //邮箱
|
| | | public const int RedPoint_MR648 = 900; // BT功能红点 - 每日648
|
| | | |
| | |
|
| | |
|
| | |
|
| | | public void Register()
|
| | | {
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= OnRedpointChange;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += OnRedpointChange;
|
| | |
|
| | | }
|
| | |
|
| | | public List<int> rightTopHideRedpoints = new List<int>()
|
| | | {
|
| | | 203,
|
| | | 209,
|
| | | 210,
|
| | | 212,
|
| | | 213,
|
| | | 214,
|
| | | 216,
|
| | | 280,
|
| | | 401,
|
| | | 402,
|
| | | 403,
|
| | | 406,
|
| | | 413,
|
| | | 421,
|
| | | 423,
|
| | | 433,
|
| | | 434,
|
| | | 443,
|
| | | 452,
|
| | | 500,
|
| | | 900,
|
| | | };
|
| | |
|
| | | 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;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|