Exemple #1
0
    protected override void DoUpdate()
    {
        base.DoUpdate();
        if (Time.frameCount % 50 == 0)
        {
            updateTime();
        }
        if (flag)
        {
            if (topButtons.transform.localPosition.x < -120)
            {
                left.gameObject.SetActive(true);
            }
            else
            {
                left.gameObject.SetActive(false);
            }
            if (topButtons.transform.localPosition.x < -(indexxx - 6) * 110)
            {
                right.gameObject.SetActive(false);
            }
            else
            {
                right.gameObject.SetActive(true);
            }
        }

        if (NoticeManagerment.Instance.loginTime == 0)
        {
            NoticeManagerment.Instance.loginTime = ServerTimeKit.getLoginTime();
        }
        if (ServerTimeKit.getMillisTime() >= BackPrizeLoginInfo.Instance.getSecondDayTime(NoticeManagerment.Instance.loginTime))       // 跨天//
        {
            NoticeManagerment.Instance.loginTime = ServerTimeKit.getMillisTime();
            if (entranceId == NoticeEntranceType.BACK_NOTICE)           // 回归//
            {
                BackPrizeInfoFPort bpif = FPortManager.Instance.getFPort("BackPrizeInfoFPort") as BackPrizeInfoFPort;
                bpif.BackPrizeLoginInfoAccess(updateTime);
            }
            if (entranceId == NoticeEntranceType.ZHOUNIANQING_NOTICE)           // 福袋、周卡//
            {
                // 福袋//
                RebateInfoFPort rif = FPortManager.Instance.getFPort("RebateInfoFPort") as RebateInfoFPort;
                rif.RebateInfoAccess(updateTime);
                // 周卡//
                WeekCardInfoFPort wcif = FPortManager.Instance.getFPort("WeekCardInfoFPort") as WeekCardInfoFPort;
                wcif.WeekCardInfoAccess(updateTime);
            }
        }
    }
Exemple #2
0
    // 福袋信息//
    void initRebateInfo()
    {
        RebateInfoFPort rebateInfo = FPortManager.Instance.getFPort("RebateInfoFPort") as RebateInfoFPort;

        if (rebateInfo.diamondSample == null && rebateInfo.goldSample == null)
        {
            List <int> ids = RebateSampleManager.Instance.getAllIDs();
            rebateInfo.setDiamondSample(RebateSampleManager.Instance.getDiamondSampleByIDs(ids));
            rebateInfo.setGoldSample(RebateSampleManager.Instance.getGoldSampleByIDs(ids));
        }
        //rebateInfo.RebateInfoAccess(initFinish);
        //rebateInfo.RebateInfoAccess(initSevenDaysHappyInfo);
        rebateInfo.RebateInfoAccess(initShopInfo);
    }
    void Update()
    {
        if ((endTime - ServerTimeKit.getSecondTime()) <= 0)       // 活动已结束已结束//
        {
            timeLabel.text = LanguageConfigManager.Instance.getLanguage("godsWar_141555");
        }
        else
        {
            timeLabel.text = TimeKit.timeTransform((endTime - ServerTimeKit.getSecondTime()) * 1000.0d);
        }

        if (RebateInfoManagement.Instance.loginTime == 0)
        {
            RebateInfoManagement.Instance.loginTime = ServerTimeKit.getLoginTime();
        }
        if (ServerTimeKit.getMillisTime() >= BackPrizeLoginInfo.Instance.getSecondDayTime(RebateInfoManagement.Instance.loginTime))       // 跨天//
        {
            RebateInfoManagement.Instance.loginTime = ServerTimeKit.getMillisTime();

            RebateInfoFPort rif = FPortManager.Instance.getFPort("RebateInfoFPort") as RebateInfoFPort;
            rif.RebateInfoAccess(getRebateInfoCallBack);
        }
    }
    public void initContent(Notice notice, WindowBase win)
    {
        this.win      = win;
        this.ns       = notice.getSample();
        this.m_notice = notice;
        tsample       = TimeConfigManager.Instance.getTimeInfoSampleBySid(ns.timeID);
        startTime     = tsample.mainTimeInfo[0];
        endTime       = tsample.mainTimeInfo[0] + tsample.mainTimeInfo[1];

        closeDetailButton.fatherWindow = win;
        receiveButton.fatherWindow     = win;
        checkRuleButton.fatherWindow   = win;
        closeRule.fatherWindow         = win;

        closeDetailButton.onClickEvent = closeDetail;
        receiveButton.onClickEvent     = receiveButtonClick;
        checkRuleButton.onClickEvent   = checkRuleClick;
        closeRule.onClickEvent         = closeRuleClick;

        //showTimeLabel();
        showDescribLabel();

        RebateInfoFPort rifp = FPortManager.Instance.getFPort("RebateInfoFPort") as RebateInfoFPort;

//		List<int> ids = RebateSampleManager.Instance.getAllIDs();
//		diamondSample = RebateSampleManager.Instance.getDiamondSampleByIDs(ids);
//		goldSample = RebateSampleManager.Instance.getGoldSampleByIDs(ids);
        if (rifp.diamondSample == null && rifp.goldSample == null)
        {
            List <int> ids = RebateSampleManager.Instance.getAllIDs();
            rifp.setDiamondSample(RebateSampleManager.Instance.getDiamondSampleByIDs(ids));
            rifp.setGoldSample(RebateSampleManager.Instance.getGoldSampleByIDs(ids));
        }
        rifp.RebateInfoAccess(getRebateInfoCallBack);

        initeRulePanel(rifp.diamondSample, rifp.goldSample);
    }