//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Thursday, November 16, 2017
|
//--------------------------------------------------------
|
using UnityEngine;
|
using System.Collections;
|
using UnityEngine.UI;
|
using System.Collections.Generic;
|
using System;
|
|
namespace vnxbqy.UI
|
{
|
|
|
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);
|
|
#region 邮件红点
|
public const int RedPoint_MainMailKey = 24;
|
public const int RedPoint_MailFuncKey = 2401;
|
public Redpoint redpointMainMail = new Redpoint(RedPoint_MainMailKey);
|
public Redpoint redpointMailFunc = new Redpoint(RedPoint_MainMailKey, RedPoint_MailFuncKey);
|
#endregion
|
|
#region 好友红点
|
public const int RedPoint_FriendQuestKey = 26;
|
public const int RedPoint_FriendChatKey = 25; //好友
|
public Redpoint redpointFriendQuest = new Redpoint(RedPoint_FriendQuestKey);
|
public Redpoint redPointFriendChat = new Redpoint(RedPoint_FriendChatKey);
|
#endregion
|
|
#region 背包红点
|
public const int RedPoint_MainPackKey = 102;
|
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 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 fairyLaunch = new Redpoint(RedPoint_key, FAIRY_REDPOINT_KEY1);
|
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;
|
public Redpoint fairyStoreRedPoint = new Redpoint(FAIRY_REDPOINT_KEY2, FAIRYStore_REDPOINT_KEY3);
|
#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 Redpoint openServerRedpoint = new Redpoint(REDPOINT_OPENSERVER);
|
|
//280 开头用于节日祝福
|
public const int RedPoint_HolidayWishes = 280;
|
public Redpoint holidayWishesRedpoint = new Redpoint(RedPoint_HolidayWishes);
|
|
#endregion
|
public const int REDPOINT_OPENRANK = 258;
|
public Redpoint openRankRedpoint = new Redpoint(REDPOINT_OPENRANK);
|
#region 仙盟活动红点
|
public readonly Redpoint fairyActivityRedpoint = new Redpoint(218);
|
#endregion
|
|
|
// 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 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;
|
}
|
}
|
|
}
|
|
}
|
|
|
|