Пример #1
0
        public void OnRobClick(RobDartItem data)
        {
            if (clickLimit)
            {
                EB.Debug.Log("OnRobClick °´Å¥CDÖÐÀ¹½ØÂß¼­Î´Ö´ÐÐ");
                return;
            }
            EB.Debug.Log("OnRobClick Ö´ÐоüÍÅÀ¹½ØÂß¼­");
            clickLimit = true;
            RegisterMonoUpdater();
            if (!AllianceEscortUtil.IsMeetRobCondition())
            {
                return;
            }
            var mItemData = data.GetItemData();

            switch (AlliancesManager.Instance.DartData.State)
            {
            case eAllianceDartCurrentState.Transfer:
            case eAllianceDartCurrentState.Transfering:
                var ht = Johny.HashtablePool.Claim();
                ht.Add("0", EB.Localizer.GetString("ID_ROB_DART"));
                MessageTemplateManager.ShowMessage(902053, ht, null);
                break;

            case eAllianceDartCurrentState.None:
            case eAllianceDartCurrentState.Robing:
            case eAllianceDartCurrentState.Rob:
                AlliancesManager.Instance.RobDartInfo.RobAwards = mItemData.Award;
                AlliancesManager.Instance.Rob(mItemData.Uid, mItemData.DartId, delegate(Hashtable result)
                {
                    if (result != null)
                    {
                        GlobalMenuManager.Instance.CloseMenu("LTAllianceEscortHud");
                        string targetSceneName = EB.Dot.String("escortAndRob.robDart.info.targetSceneName", result, string.Empty);
                        string strPos          = EB.Dot.String("escortAndRob.robDart.info.pos", result, string.Empty);
                        Vector3 to_pos         = GM.LitJsonExtension.ImportVector3(strPos);
                        Vector3 from_pos       = new Vector3(25.0f, 0.0f, 45.0f);

                        //SceneLogic.Transfer_RobDart(MainLandLogic.GetInstance().CurrentSceneName, from_pos, 90.0f, targetSceneName, to_pos, 90.0f, mItemData.Uid, mItemData.DartId);
                        //AlliancesManager.Instance.Fight(mItemData.Uid, mItemData.DartId);
                        AlliancesManager.Instance.RobFight(mItemData.Uid, mItemData.DartId);
                    }
                });
                break;
            }
        }
Пример #2
0
        public override void Awake()
        {
            base.Awake();
            clickLimit = false;
            var t = mDMono.transform;

            TransferDartTimeLabel       = t.GetComponent <UILabel>("Tips/ActivityTimeLabel/TimeLabel");
            ResidueRobNumLabel          = t.GetComponent <UILabel>("ResidueNum/Label");
            ResidueTransferDartNumLabel = t.GetComponent <UILabel>("GotoTransferBtn/ResidueNum");
            PageNumLabel = t.GetComponent <UILabel>("PageNum");
            LeftPageBtn  = t.GetComponent <UIButton>("PageLeftBtn");
            RightPageBtn = t.GetComponent <UIButton>("PageRightBtn");
            ItemArray    = new RobDartItem[4];
            ItemArray[0] = t.GetMonoILRComponent <RobDartItem>("UIGrid/0");
            ItemArray[1] = t.GetMonoILRComponent <RobDartItem>("UIGrid/0 (1)");
            ItemArray[2] = t.GetMonoILRComponent <RobDartItem>("UIGrid/0 (2)");
            ItemArray[3] = t.GetMonoILRComponent <RobDartItem>("UIGrid/0 (3)");

            t.GetComponent <UIButton>("PageLeftBtn").onClick.Add(new EventDelegate(OnLeftPageClick));
            t.GetComponent <UIButton>("PageRightBtn").onClick.Add(new EventDelegate(OnRightPageClick));
            t.GetComponent <UIButton>("RefreshBtn").onClick.Add(new EventDelegate(OnRefreshClick));
        }