コード例 #1
0
        public override void onShowed()
        {
            RefreshData(A3_SevendayModel.getInstance().thisday);
            _instance = this;

            A3_SevenDayProxy.getInstance().addEventListener(A3_SevenDayProxy.SEVENDAYINFO, RefreshData);
            btnOnClick(btns.GetChild(0).gameObject, 0);
            RefreshPointLight();
        }
コード例 #2
0
        //领取按钮
        void getOnClick(int ides)
        {
            switch (ides)
            {
            case 0:
                A3_SevenDayProxy.getInstance().SendProcy(2, day: choseday);
                break;

            case 1:
                A3_SevenDayProxy.getInstance().SendProcy(3);
                break;

            default:
                get_id = A3_SevendayModel.getInstance().dic_data[choseday].task_award.ElementAt(ides - 2).Key;
                A3_SevenDayProxy.getInstance().SendProcy(4, get_id);
                break;
            }
        }
コード例 #3
0
        public void initproxy_ui()
        {
            b_load = true;
            IconHintMgr.getInsatnce().inituiisok = true;;
            IconHintMgr.getInsatnce().initui();
            //关闭第一次预加载的ui
            InterfaceMgr.getInstance().closeUiFirstTime();


            a3_activeOnlineProxy.getInstance().SendProxy(1);
            A3_signProxy.getInstance().sendproxy(1, 0);
            A3_SevenDayProxy.getInstance().SendProcy(1);
            LotteryProxy.getInstance().sendlottery((int)LotteryType.CurrentInfo);
            ExchangeProxy.getInstance().GetExchangeInfo();
            welfareProxy.getInstance().sendWelfare(welfareProxy.ActiveType.selfWelfareInfo);
            A3_AwardCenterServer.getInstance().SendMsg(A3_AwardCenterServer.SERVER_SELFDATA);  //福利数据

            //新手进主城检测摄像机
            SceneCamera.CheckLoginCam();
        }
コード例 #4
0
 public override void onClosed()
 {
     A3_SevenDayProxy.getInstance().removeEventListener(A3_SevenDayProxy.SEVENDAYINFO, RefreshData);
 }
コード例 #5
0
        void initsomething()
        {
            one_num   = 0;
            two_num   = 0;
            three_num = 0;
            //天数obj
            for (int day = 0; day < 7; day++)
            {
                obj_sevenday.Add(getTransformByPath("down/days").GetChild(day).GetComponent <RectTransform>());
            }
            for (int j = 0; j < obj_sevenday.Count; j++)
            {
                int clickday = j + 1;
                new BaseButton(obj_sevenday[j]).onClick = (GameObject go) => { RefreshData(clickday); };
            }

            ////每天的任务数量是一样的(先把obj创建出来,再刷新数据)
            //lst_obj.Clear();
            //int num = A3_SevendayModel.getInstance().dic_data[1].task_award.Keys.Count + 2;
            //for(int k=0;k<num;k++)
            //{
            //    int idx = k;
            //    GameObject objclone = GameObject.Instantiate(grid) as GameObject;
            //    objclone.SetActive(true);

            //    objclone.transform.SetParent(contain.transform, false);
            //    lst_obj.Add(objclone);

            //    objclone.transform.FindChild("Button").transform.GetComponent<Button>().onClick.AddListener(delegate()
            //    {
            //        this.getOnClick(idx);
            //    });
            //    if (k ==0 )
            //    {
            //        objclone.name = 1.ToString();
            //        one_num += 1;
            //    }
            //   else  if(k==1)
            //    {
            //        objclone.name = 2.ToString();
            //        two_num += 1;
            //    }
            //   else if (k >= 2)
            //    {

            //            objclone.name = A3_SevendayModel.getInstance().dic_data[1].task_award.ElementAt(k-2).Value.tab.ToString();
            //            if (int.Parse(objclone.name)==1)
            //                one_num += 1;
            //            else if(int.Parse(objclone.name) == 2)
            //                two_num += 1;
            //            else if(int.Parse(objclone.name) == 3)
            //                three_num += 1;
            //        }
            //    }
            //a3_runestone.commonScroview(contain, num);

            ////tabbtn
            //for (int i = 0; i < btns.childCount; i++)
            //{
            //    int j = i;
            //    new BaseButton(btns.GetChild(i)).onClick = (GameObject go) =>{ btnOnClick(go, j);};
            //}
            //4个点数宝箱obj

            for (int i = 0; i < four_box.childCount; i++)
            {
                int j = i;
                lst_fourbox.Add(four_box.GetChild(i).gameObject);
                GameObject icon = IconImageMgr.getInstance().createA3ItemIcon((uint)A3_SevendayModel.getInstance().jifen_box[j].lst_ta.id, true, A3_SevendayModel.getInstance().jifen_box[j].lst_ta.value, 1);
                icon.transform.SetParent(four_box.GetChild(i).transform.GetChild(0).transform, false);
                icon.transform.FindChild("iconbor").gameObject.SetActive(false);
                icon.transform.FindChild("wk").gameObject.SetActive(false);
                new BaseButton(icon.transform).onClick = (GameObject go) =>
                {
                    if (A3_SevendayModel.getInstance().have_point >= A3_SevendayModel.getInstance().jifen_box[j].param1)
                    {
                        A3_SevenDayProxy.getInstance().SendProcy(5, A3_SevendayModel.getInstance().jifen_box[j].id);
                    }
                    else
                    {
                        itemtipOnclick(go, (uint)A3_SevendayModel.getInstance().jifen_box[j].lst_ta.id, A3_SevendayModel.getInstance().jifen_box[j].lst_ta.value);
                    }
                };
            }
        }