Example #1
0
        public void SetRedPointNodeNum(string str, int num)
        {
            var nodeList = str.Split('.');

            if (nodeList.Length == 1 && nodeList[0] != RedPointConst.main)
            {
                EB.Debug.LogWarning("SetRedPointNodeNum str Error:{0}", str);
                return;
            }
            RedPointNode node = Root;

            for (int i = 1; i < nodeList.Length; ++i)
            {
                if (!node.childs.ContainsKey(nodeList[i]))
                {
                    EB.Debug.LogWarning("Please add \"{0}\" to LTRedPointSystem.TreeList.SetRedPointNodeCallBack str Error in:{0} - {1}", str, nodeList[i]);
                    return;
                }
                node = node.childs[nodeList[i]];

                if (i == nodeList.Length - 1)
                {
                    //EB.Debug.LogError("测试红点:Set->{0}:{1}", str, num);
                    node.SetNum(num);
                }
            }
        }
Example #2
0
        private void InitRedPointTressNode()
        {
            Root      = new RedPointNode();
            Root.name = RedPointConst.main;

            for (int i = 0; i < TrssList.Count; ++i)
            {
                RedPointNode node       = Root;
                string[]     treeNodeAy = TrssList[i].Split('.');
                if (treeNodeAy[0] != node.name)
                {
                    EB.Debug.LogWarning("InitRedPointTressNode Error:{0}", treeNodeAy[0]);
                    continue;
                }

                if (treeNodeAy.Length > 1)
                {
                    for (int j = 1; j < treeNodeAy.Length; ++j)
                    {
                        if (!node.childs.ContainsKey(treeNodeAy[j]))
                        {
                            node.childs.Add(treeNodeAy[j], new RedPointNode());
                        }
                        node.childs[treeNodeAy[j]].name   = treeNodeAy[j];
                        node.childs[treeNodeAy[j]].parent = node;

                        node = node.childs[treeNodeAy[j]];
                    }
                }
            }
        }
Example #3
0
        public void RemoveRedPointNodeCallBack(string str, LTRedPointSystem.OnNumChange callBack)
        {
            var nodeList = str.Split('.');

            if (nodeList.Length == 1 && nodeList[0] != RedPointConst.main)
            {
                EB.Debug.LogWarning("SetRedPointNodeCallBack str Error:{0}", str);
                return;
            }
            RedPointNode node = Root;

            for (int i = 1; i < nodeList.Length; ++i)
            {
                if (!node.childs.ContainsKey(nodeList[i]))
                {
                    EB.Debug.LogWarning("SetRedPointNodeCallBack str Error in:{0} - {1}", str, nodeList[i]);
                    return;
                }
                node = node.childs[nodeList[i]];

                if (i == nodeList.Length - 1)
                {
                    node.numChangeFunc -= callBack;
                    return;
                }
            }
        }
Example #4
0
 private void SetHeroMedalRP(RedPointNode node)
 {
     HeroMedalRP.CustomSetActive(node.num > 0);
 }
Example #5
0
 private void ChargeMonthGiftRP(RedPointNode node)
 {
     controller.GObjects["Gift3RedPoint"].CustomSetActive(node.num > 0);
 }
Example #6
0
 private void SetLegionFbRP(RedPointNode node)
 {
     FubenRedPoint.CustomSetActive(node.num > 0);
 }
Example #7
0
 private void SetTransferDartRP(RedPointNode node)
 {
     TransferDartRedPoint.CustomSetActive(node.num > 0);
 }
Example #8
0
 private void SetLoginRP(RedPointNode node)
 {
     LoginRP.CustomSetActive(node.num > 0);
 }
Example #9
0
 private void SetTechnologyRP(RedPointNode node)
 {
     controller.GObjects["TechnologyRedPoint"].CustomSetActive(node.num > 0);
 }
Example #10
0
 private void SetApplyRP(RedPointNode node)
 {
     managetRedPointObj.CustomSetActive(node.num > 0);
 }
Example #11
0
 private void SetchargeRP(RedPointNode node)
 {
     chargered.CustomSetActive(node.num > 0);
 }
Example #12
0
 private void SetlevelupRP(RedPointNode node)
 {
     levelupred.CustomSetActive(node.num > 0);
 }
Example #13
0
 private void SetloginRP(RedPointNode node)
 {
     loginred.CustomSetActive(node.num > 0);
 }
Example #14
0
 private void SetLimitRP(RedPointNode node)
 {
     controller.GObjects["DailyLimitRP"].CustomSetActive(node.num > 0);
 }
Example #15
0
 private void SetMainInstanceGiftRP(RedPointNode node)
 {
     MainInstanceGiftRP.CustomSetActive(node.num > 0);
 }
Example #16
0
 private void SetDiamondGiftRP(RedPointNode node)
 {
     DiamondGiftRP.CustomSetActive(node.num > 0);
 }
Example #17
0
 private void ChallengeRP(RedPointNode node)
 {
     controller.GObjects["ChallengeRPObj"].CustomSetActive(node.num > 0);
 }
Example #18
0
 private void ExpRP(RedPointNode node)
 {
     controller.GObjects["ExpIIntanceRPObj"].CustomSetActive(node.num > 0);
 }
Example #19
0
 private void SetDonateRP(RedPointNode node)
 {
     controller.GObjects["DonateRedPoint"].CustomSetActive(node.num > 0);
 }
Example #20
0
 private void GoldRP(RedPointNode node)
 {
     controller.GObjects["GoldInstanceRPObj"].CustomSetActive(node.num > 0);
 }
Example #21
0
 private void SetMercenaryRP(RedPointNode node)
 {
     controller.GObjects["MercenaryRedPoint"].CustomSetActive(node.num > 0);
 }
Example #22
0
 private void MaxBoxRP(RedPointNode node)
 {
 }
Example #23
0
 private void SetTaskRP(RedPointNode node)
 {
     TaskRP.CustomSetActive(node.num > 0);
 }
Example #24
0
 private void AwakenRP(RedPointNode node)
 {
     controller.GObjects["AwakenRPObj"].CustomSetActive(node.num > 0);
 }
Example #25
0
 private void SetLegionWarRP(RedPointNode node)
 {
     LegionWarRedPoint.CustomSetActive(node.num > 0);
 }
Example #26
0
 private void ClimingTowerRP(RedPointNode node)
 {
     controller.GObjects["SleepTowerRPObj"].CustomSetActive(node.num > 0);
 }
Example #27
0
 private void SetInvitedTitleRP(RedPointNode node)
 {
     redPoint[2].CustomSetActive(node.num > 0);
 }
Example #28
0
 private void SetWeekRedPoint(RedPointNode node)
 {
     RedPointList[2].gameObject.CustomSetActive(node.num > 0);
 }
Example #29
0
 private void SetRP(RedPointNode node)
 {
     redPoint.CustomSetActive(node.num > 0);
 }
Example #30
0
 private void SetLevelAwardRP(RedPointNode node)
 {
     LevelAwardRP.CustomSetActive(node.num > 0);
 }