//	private void BtnMenu(string currBtn,int ie,bool isvel)
//	{
//		InputRoomNum.onValidate += OnInputChanged;
//		RoomNumberLabel.text = InputRoomNum.value;
//		if (isvel == true)
//			RoomNumberLabel.text = RoomNum;
//		else
//			RoomNumberLabel.text = str;
//		RoomNumberLabel.transform.parent.GetComponent<UIInput>().enabled = isvel;
//		RoomNumberLabel.transform.parent.GetComponent<BoxCollider> ().enabled = isvel;
//		BtnCreateRoom.GetComponentInChildren<UILabel>().text = currBtn;
//		for(int i = 0; i < PaneSprite.Length;i++)
//			if(TypeMap == MAPTYPE.EASYMAP && i > (int)MAPTYPE.EASYMAP)
//				PaneSprite[i].gameObject.SetActive(i == ie);
//	}
    private void StartBtnOnPress(int ie, bool press)
    {
        if (press)
        {
            return;
        }
        switch ((STATE_BTN)ie)
        {
        case STATE_BTN.BTN_CREATE_ROOM:
            CreateOrAddRoom();
            break;

        case STATE_BTN.BTN_BACK:
            //senlin
            //UILobby.Instance.OnCancel();
            break;

        case STATE_BTN.BTN_EASY:
        case STATE_BTN.BTN_HIGH:
        case STATE_BTN.BTN_MIDDLE:
            TypeMap = (MAPTYPE)(ie + TypeStart);

            break;
        }
        if ((STATE_BTN)ie == STATE_BTN.BTN_MIDDLE)
        {
            IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideSelectPrimaryBtnEnd);
        }
    }
        void SubmitRegister()
        {
            if (IsFirstInput)
            {
                noPass.gameObject.SetActive(true);
                MsgInfoManager.Instance.ShowMsg((int)ERROR_TYPE.eT_FillInNiceName);
                return;
            }
            if (!CheckNameInput())
            {
                noPass.gameObject.SetActive(true);
                MsgInfoManager.Instance.ShowMsg((int)ERROR_TYPE.eT_FillInNiceName);
                return;
            }



            List <string> split   = GameMethod.GetSplit();
            string        currStr = nickNameInput.value;

            foreach (string item in split)
            {
                int currPos = currStr.IndexOf(item, StringComparison.OrdinalIgnoreCase);
                if (currPos > -1)
                {
                    MsgInfoManager.Instance.ShowMsg(-130861);
                    return;
                }
            }
            IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideCommitRegisterEnd);

            byte[] bytes = Encoding.UTF8.GetBytes(nickNameInput.label.text);
            CGLCtrl_GameLogic.Instance.GameCompleteBaseInfo(SelectServerData.Instance.serverUin, bytes, Convert.ToInt32(spriteHead.spriteName), isBoy);
        }
Esempio n. 3
0
        void OnSelectHero()
        {
            //if (seletState == SelectHeroState.InitSelect)
            //    return;
            UIToggle toggle = UIToggle.current;

            if (toggle != null && toggle.group == mHeroShowGroup && toggle.value)
            {
                for (int i = 0; i < mHeroShowList.Count; i++)
                {
                    if (mHeroShowList[i] != toggle)
                    {
                        continue;
                    }
                    mSelectIndex = i;
                    ShowDestribe(i); //描述
                    if (UpdateSureBtn(i))
                    {                //是否可点击
                        IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideSelectHeroHeadEnd);
                        NotifyServerMyPreSelect(i);
                    }

                    break;
                }
            }
        }
 public void CreateOrAddRoom()
 {
     if (string.Equals(BtnCreateRoom.GetComponentInChildren <UILabel>().text, CreateRoom))
     {
         IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideSelectCreateRoomBtnEnd);
         if (string.IsNullOrEmpty(RoomPassWordLabel.text))
         {
             CGLCtrl_GameLogic.Instance.CreateRoom((int)TypeMap, "");
         }
         else
         {
             CGLCtrl_GameLogic.Instance.CreateRoom((int)TypeMap, RoomPassWordLabel.text);
         }
     }
     else
     {
         if (string.IsNullOrEmpty(InputRoomNum.label.text) || string.Equals(InputRoomNum.label.text, "-------"))
         {
             MsgInfoManager.Instance.ShowMsg((int)ERROR_TYPE.eT_NullRoomID);
             //MsgConfigInfo msg = ConfigReader.GetMsgInfo((int)ERROR_TYPE.eT_NullRoomID);
             //if (msg != null)
             //    MsgInfoManager.Instance.ShowMsg((MsgInfoManager.MsgType)msg.msgType, (int)ERROR_TYPE.eT_NullRoomID);
         }
         else
         {
             //				Debug.LogError( string.IsNullOrEmpty(InputRoomNum.label.text) + " " + );
             CGLCtrl_GameLogic.Instance.AddRoom(RoomNumberLabel.text, RoomPassWordLabel.text);
         }
     }
 }
Esempio n. 5
0
 void OnDisable()
 {
     IGuideTaskManager.Instance().RemoveTaskStartListerner(EGameEvent.eGameEvent_UIGuideNewsGuideStart, StartIGuideTask);
     IGuideTaskManager.Instance().RemoveTaskStartListerner(EGameEvent.eGameEvent_UIGuideSelfDefBtnStart, StartIGuideTask);
     IGuideTaskManager.Instance().RemoveTaskStartListerner(EGameEvent.eGameEvent_UIGuideMatchBtnStart, StartIGuideTask);
     if (CustomButton != null)
     {
         CustomButton.RemoveListener(PvpBtnOnPress);
     }
     if (BtnModeSelect != null)
     {
         for (int i = 0; i < BtnModeSelect.childCount; i++)
         {
             ButtonOnPress btn = BtnModeSelect.Find(modeName[i]).GetComponent <ButtonOnPress>();
             btn.RemoveListener(PvpBtnOnPress);
         }
     }
     if (BtnGuide != null)
     {
         for (int i = 0; i < BtnGuide.childCount; i++)
         {
             ButtonOnPress btn = BtnGuide.Find("Guide" + (i + 1)).GetComponent <ButtonOnPress>();
             btn.RemoveListener(PvpBtnOnPress);
         }
     }
     if (BtnCancel != null)
     {
         BtnCancel.RemoveListener(PvpBtnOnPress);
     }
     //FriendButton.RemoveListener(PvpBtnOnPress);
 }
Esempio n. 6
0
 void SelfBtnMoveInEnd()
 {
     IGuideTaskManager.Instance().SendTaskEffectShow(EGameEvent.eGameEvent_UIGuideNewsGuideEnd);
     IGuideTaskManager.Instance().SendTaskEffectShow(EGameEvent.eGameEvent_UIGuideSelfDefBtnEnd);
     IGuideTaskManager.Instance().SendTaskEffectShow(EGameEvent.eGameEvent_UIGuideMatchBtnEnd);
     EventDelegate.Remove(tweenBtnScale.onFinished, SelfBtnMoveInEnd);
 }
Esempio n. 7
0
        void InitEffect()
        {
            mStartObj.SetActive(false);
            mReadyObj.SetActive(false);
            mTteamObj[0].transform.localPosition = new Vector3(mTteamObj[0].transform.localPosition.x - mXOffset, mTteamObj[0].transform.localPosition.y, mTteamObj[0].transform.localPosition.z);
            TweenPosition.Begin(mTteamObj[0], mMoveDuring, new Vector3(mTteamObj[0].transform.localPosition.x + mXOffset, mTteamObj[0].transform.localPosition.y, mTteamObj[0].transform.localPosition.z));
            mTteamObj[1].transform.localPosition = new Vector3(mTteamObj[1].transform.localPosition.x + mXOffset, mTteamObj[1].transform.localPosition.y, mTteamObj[1].transform.localPosition.z);
            TweenPosition.Begin(mTteamObj[1], mMoveDuring, new Vector3(mTteamObj[1].transform.localPosition.x - mXOffset, mTteamObj[1].transform.localPosition.y, mTteamObj[1].transform.localPosition.z));
            UICommon.UICommonMethod.TweenAlphaBegin(mMidObj, 0f, 0f);
            mTweenAlpha = UICommon.UICommonMethod.TweenAlphaBegin(mMidObj, mAlphaDuring, 1f);
            EventDelegate.Add(mTweenAlpha.onFinished, FinishMove, true);
            for (int i = 0; i < mSeatBtnList.Count; i++)
            {
                mSeatBtnList[i].AddListener(i, BtnEvent);
                if (mSeatBtnList.Count < SeatTeam)
                {
                    mSoulObj[i].gameObject.SetActive(false);
                }
            }
            mBtnStart.AddListener((int)GameRoomBtn.STARTBATTLE, BtnEvent);
            mBtnQuit.AddListener((int)GameRoomBtn.LEAVEBATTLE, BtnEvent);
            mBtnSend.AddListener(SendTalk);
            mRoomState = RoomState.StartFlashState;

            //UIGuide
            IGuideTaskManager.Instance().AddTaskStartListerner((Int32)GameEventEnum.GameEvent_UIGuideRoomBeginBtnStart, StartIGuideTask);
            IGuideTaskManager.Instance().SendTaskTrigger((Int32)GameEventEnum.GameEvent_UIGuideTriggerRoomBeginGame);

            IGuideTaskManager.Instance().AddTaskStartListerner((Int32)GameEventEnum.GameEvent_UIGuideBackLobbyBtnStart, StartIGuideTask);
            IGuideTaskManager.Instance().SendTaskTrigger((Int32)GameEventEnum.GameEvent_UIGuideTriggerBackLobby);
        }
Esempio n. 8
0
    // Update is called once per frame
    void Update()
    {
        //更新buff
        BlGame.Skill.BuffManager.Instance.Update();
        //更新特效
        BlGame.Effect.EffectManager.Instance.UpdateSelf();
        //更新提示消失
        MsgInfoManager.Instance.Update();
        //场景声音更新
        SceneSoundManager.Instance.Update();
        //声音更新
        BlGame.AudioManager.Instance.OnUpdate();
        //更新游戏状态机
        GameStateManager.Instance.Update(Time.deltaTime);
        //更新网络模块
        NetworkManager.Instance.Update(Time.deltaTime);
        //更新界面引导
        IGuideTaskManager.Instance().OnUpdate();
        //小地图更新
        MiniMapManager.Instance.Update();

        //UI更新
        WindowManager.Instance.Update(Time.deltaTime);

        //特效后删除机制
        BlGame.Effect.EffectManager.Instance.HandleDelete();

        //GameObjectPool更新
        GameObjectPool.Instance.OnUpdate();

        //游戏时间设置
        GameTimeData.Instance.OnUpdate();
    }
Esempio n. 9
0
        void OnSelectHero()
        {
            UIToggle toggle = UIToggle.current;

            if (toggle != null && toggle.group == mHeroShowGroup && toggle.value)
            {
                //mHeroShowList在 InitWight中添加了所有的toggle
                for (int i = 0; i < mHeroShowList.Count; i++)
                {
                    if (mHeroShowList[i] != toggle)
                    {
                        continue;
                    }

                    mSelectIndex = i;
                    ShowDestribe(i);      //英雄描述信息
                    if (UpdateSureBtn(i)) //更新按钮状态并判断是否可点击选择按钮
                    {
                        //是否可点击
                        IGuideTaskManager.Instance().SendTaskEnd((Int32)GameEventEnum.GameEvent_UIGuideSelectHeroHeadEnd);
                        NotifyServerMyPreSelect(i);//通知服务端点击的英雄
                    }
                    break;
                }
            }
        }
Esempio n. 10
0
        //隐藏
        public override void OnDisable()
        {
            IGuideTaskManager.Instance().RemoveTaskStartListerner((Int32)GameEventEnum.GameEvent_UIGuideSelectHeroHeadStart, StartIGuideTask);
            IGuideTaskManager.Instance().RemoveTaskStartListerner((Int32)GameEventEnum.GameEvent_UIGuideSelectHeroCommitStart, StartIGuideTask);

            mScrollView.onDragFinished -= OnDragFinished;
            mFirstCountTime             = 60;
            mSecondCountTime            = 10;
        }
Esempio n. 11
0
 //显示
 public override void OnEnable()
 {
     SetSelectHeroState(SelectHeroState.InitSelect);
     ShowPlayerNickName();
     mArrowUpDown[0].gameObject.SetActive(false);
     mArrowUpDown[1].gameObject.SetActive(true);
     mScrollView.onDragFinished += OnDragFinished;
     IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideRoomBeginBtnEnd);
 }
Esempio n. 12
0
        void FinishMove()
        {
            //UIGuide
            IGuideTaskManager.Instance().SendTaskEffectShow((Int32)GameEventEnum.GameEvent_UIGuideRoomBeginBtnEnd);
            IGuideTaskManager.Instance().SendTaskEffectShow((Int32)GameEventEnum.GameEvent_UIGuideBackLobbyBtnEnd);

            // TweenAlpha.Begin(spriteTalkBg.cachedGameObject,0f,talkBgAlpha);
            mRoomState = RoomState.JoinSeatState;
            EventDelegate.Remove(mTweenAlpha.onFinished, FinishMove);
        }
Esempio n. 13
0
 //显示
 public override void OnEnable()
 {
     //设置选择状态为InitSelect
     SetSelectHeroState(SelectHeroState.InitSelect);
     ShowPlayerNickName(); //显示玩家昵称
     mArrowUpDown[0].gameObject.SetActive(false);
     mArrowUpDown[1].gameObject.SetActive(true);
     mScrollView.onDragFinished += OnDragFinished;//添加滚动事件
     IGuideTaskManager.Instance().SendTaskEnd((Int32)GameEventEnum.GameEvent_UIGuideRoomBeginBtnEnd);
 }
 void OnEnable()
 {
     EnableBoxEvent(true);
     AddEvent();
     DoMoveIn();
     //UIGuide
     IGuideTaskManager.Instance().AddTaskStartListerner(EGameEvent.eGameEvent_UIGuideSelectPrimaryBtnStart, StartIGuideTask);
     IGuideTaskManager.Instance().AddTaskStartListerner(EGameEvent.eGameEvent_UIGuideCreateRoomBtnStart, StartIGuideTask);
     IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideTriggerCreateRoom);
 }
Esempio n. 15
0
    private void PvpBtnOnPress(int ie, bool press)
    {
        //if (isKeyPress) {
        if (press)
        {
            return;
        }

        switch ((BUTTON_STATE)ie)
        {
        case BUTTON_STATE.BTNCUSTOM:
            IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideSelfDefBtnEnd);

            //senlin
            //UILobby.Instance.SetLobbyPvpButtom(LobbyPvpButtom.CUSTOM);
            break;

        case BUTTON_STATE.BTNMODE_EASY:
            SetTimeLabel(MAPTYPE.MIDDLEMAP, ie);    //中级场。
            break;

        case BUTTON_STATE.BTNMODE_HIGH:
            SetTimeLabel(MAPTYPE.HIGHMAP, ie);
            break;

        case BUTTON_STATE.BTNMODE_MIDDLE:
            SetTimeLabel(MAPTYPE.MIDDLEMAP, ie);
            break;

        case BUTTON_STATE.BTN_GUIDE_ONE:
            //CGLCtrl_GameLogic.Instance.AskEnterNewsGuideBattle((int)MAPTYPE.NEWS_GUIDE_1);
            break;

        case BUTTON_STATE.BTN_GUIDE_TWO:

            break;

        case BUTTON_STATE.BTN_GUIDE_THREE:

            break;

        case BUTTON_STATE.BTN_CANCEL:
            BtnCancel.transform.parent.gameObject.SetActive(false);
            isDownTime = false;
            CGLCtrl_GameLogic.Instance.LeaveRoom();

            GCToCS.AskStopQuickBattle pMsg = new GCToCS.AskStopQuickBattle();
            BlGame.Network.NetworkManager.Instance.SendMsg(pMsg, (int)pMsg.msgnum);
            break;

        case BUTTON_STATE.BTN_FRIENDLIST:
            break;
        }
        //	}
    }
Esempio n. 16
0
 private void EnterSelectHero()
 {
     MsgInfoManager.Instance.ShowMsg(10); //通过id读取配置文件。来显示“请选择英雄”
     //  SetBtnSure(true);//激活确定按钮  小谷注释 应该是在点击头像时激活,此时激活?
     EnableToggle(true);                  //激活英雄列表中的英雄头像
     FirstCountDown();                    //第一次倒计时
     //InSelect状态的作用仅仅是退出EnterState,但是在此状态下并没有做任何操作
     SetSelectHeroState(SelectHeroState.InSelect);
     //UIGuide
     IGuideTaskManager.Instance().AddTaskStartListerner((Int32)GameEventEnum.GameEvent_UIGuideSelectHeroHeadStart, StartIGuideTask);
     IGuideTaskManager.Instance().AddTaskStartListerner((Int32)GameEventEnum.GameEvent_UIGuideSelectHeroCommitStart, StartIGuideTask);
     IGuideTaskManager.Instance().SendTaskTrigger((Int32)GameEventEnum.GameEvent_UIGuideTriggerSelectHero);
 }
        void SelectHead(int ie, bool isDown)
        {
            ButtonOnPress btn        = headList.ElementAt(ie);
            Transform     headParent = btn.transform;

            spriteHead.spriteName = headParent.Find("Portrait").Find("Sprite").GetComponent <UISprite>().spriteName;
            ShowSelect(btn);
            lastToggle = btn;

            submitBtn.isEnabled = true;

            IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideSelectHeadEnd);
        }
Esempio n. 18
0
        private void EnterSelectHero()
        {
            MsgInfoManager.Instance.ShowMsg(10);
            SetBtnSure(true);
            EnableToggle(true);
            FirstCountDown();
            SetSelectHeroState(SelectHeroState.InSelect);

            //UIGuide
            IGuideTaskManager.Instance().AddTaskStartListerner(EGameEvent.eGameEvent_UIGuideSelectHeroHeadStart, StartIGuideTask);
            IGuideTaskManager.Instance().AddTaskStartListerner(EGameEvent.eGameEvent_UIGuideSelectHeroCommitStart, StartIGuideTask);
            IGuideTaskManager.Instance().SendTaskTrigger(EGameEvent.eGameEvent_UIGuideTriggerSelectHero);
        }
    void OnDisable()
    {
        for (int i = 0; i < SpriteEasyOrHigh.Length; i++)
        {
            SpriteEasyOrHigh[i].RemoveListener(StartBtnOnPress);
        }
        BtnBack.RemoveListener(StartBtnOnPress);
        EventDelegate.Remove(BtnCreateMenu.onChange, BtnCreateOrAdd);
        EventDelegate.Remove(BtnAddRoomMenu.onChange, BtnCreateOrAdd);

        EventCenter.RemoveListener <EErrorCode>(EGameEvent.eGameEvent_AskAddInBattle, StartSelfResult);
        IGuideTaskManager.Instance().RemoveTaskStartListerner(EGameEvent.eGameEvent_UIGuideSelectPrimaryBtnStart, StartIGuideTask);
        IGuideTaskManager.Instance().RemoveTaskStartListerner(EGameEvent.eGameEvent_UIGuideCreateRoomBtnStart, StartIGuideTask);
    }
Esempio n. 20
0
        private void RandomSelectHero()
        {
            IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideSelectHeroHeadEnd);
            IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideSelectHeroCommitEnd);
            EnabledSurePress(false);
            TweenRotation obj = mSpriteUnits[0].transform.parent.GetComponent <TweenRotation>();

            obj.enabled = true;
            //UITweener tween = TweenRotation.Begin(obj, 1f, Quaternion.EulerRotation(180f, 0f, 0f));
            obj.method = UITweener.Method.EaseOut;
            EventDelegate.Add(obj.onFinished, LastCountDown);

            mSkinsDisable.gameObject.SetActive(false);
            mSkinsToggle.value = true;
        }
Esempio n. 21
0
        private void RandomSelectHero()
        {
            IGuideTaskManager.Instance().SendTaskEnd((Int32)GameEventEnum.GameEvent_UIGuideSelectHeroHeadEnd);
            IGuideTaskManager.Instance().SendTaskEnd((Int32)GameEventEnum.GameEvent_UIGuideSelectHeroCommitEnd);

            EnabledSurePress(false);                                                             //禁用确定按钮
            TweenRotation obj = mSpriteUnits[0].transform.parent.GetComponent <TweenRotation>(); //十位动画组件

            obj.enabled = true;

            obj.method = UITweener.Method.EaseOut;
            EventDelegate.Add(obj.onFinished, LastCountDown);

            mSkinsDisable.gameObject.SetActive(false); //禁用选择皮肤的灰色图片  来显示绿色图
            mSkinsToggle.value = true;
        }
Esempio n. 22
0
 void OnEnable()
 {
     init();
     GradualChange.value = 0;
     y                = 270f;
     isDownTime       = false;
     MoveSprite.count = 0;
     //UIGuide
     IGuideTaskManager.Instance().AddTaskStartListerner(EGameEvent.eGameEvent_UIGuideNewsGuideStart, StartIGuideTask);
     IGuideTaskManager.Instance().AddTaskStartListerner(EGameEvent.eGameEvent_UIGuideSelfDefBtnStart, StartIGuideTask);
     IGuideTaskManager.Instance().AddTaskStartListerner(EGameEvent.eGameEvent_UIGuideMatchBtnStart, StartIGuideTask);
     IGuideTaskManager.Instance().SendTaskTrigger(EGameEvent.eGameEvent_UIGuideTriggerNewsGuide);
     IGuideTaskManager.Instance().SendTaskTrigger(EGameEvent.eGameEvent_UIGuideTriggerSelfDefGame);
     IGuideTaskManager.Instance().SendTaskTrigger(EGameEvent.eGameEvent_UIGuideTriggerMatchGame);
     TweenScale.Begin(CustomButton.gameObject, 0f, tweenScaleBtnVector);
     CustomButton.gameObject.SetActive(false);
 }
Esempio n. 23
0
        void StartIGuideTask(Int32 taskId)
        {
            List <GameObject> objList = new List <GameObject>();

            switch ((GameEventEnum)taskId)
            {
            case GameEventEnum.GameEvent_UIGuideRoomBeginBtnEnd:
                objList.Add(mBtnStart.gameObject);
                break;

            case GameEventEnum.GameEvent_UIGuideBackLobbyBtnEnd:
                objList.Add(mBtnQuit.gameObject);
                break;
            }

            IGuideTaskManager.Instance().SendTaskMarkObjList(taskId, objList);
        }
        bool CheckNameInput()
        {
            if (String.IsNullOrEmpty(nickNameInput.label.text))
            {
                ShowTip(nullName);
                return(false);
            }

            if (!CTools.CheckName(nickNameInput.label.text))
            {
                ShowTip(invalideName);
                return(false);
            }

            IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEent_UIGuideInputNickNameEnd);
            return(true);
        }
Esempio n. 25
0
        private void OnCommitHero(int ie, bool press)
        {
            EnabledSurePress(false);//设置按钮不可显示

            if (press || mSeletState != SelectHeroState.InSelect)
            {
                return;
            }

            if (mSelectIndex != -1)
            {
                IGuideTaskManager.Instance().SendTaskEnd((Int32)GameEventEnum.GameEvent_UIGuideSelectHeroCommitEnd);
                //通知服务器确定选择的英雄
                HolyGameLogic.Instance.EmsgToss_AskSelectHero((UInt32)HeroCtrl.Instance.heroInfoList.ElementAt(mSelectIndex).HeroSelectNum);

                mSkinsDisable.gameObject.SetActive(false); //选择皮肤
                mSkinsToggle.value = true;                 //皮肤
            }
        }
    void StartIGuideTask(EGameEvent taskId)
    {
        //List<BoxCollider> box = new List<BoxCollider>();
        List <GameObject> objList = new List <GameObject>();

        switch (taskId)
        {
        case EGameEvent.eGameEvent_UIGuideSelectCreateRoomBtnEnd:
            IGuideTaskManager.Instance().SendTaskEffectShow(EGameEvent.eGameEvent_UIGuideSelectCreateRoomBtnEnd);
            objList.Add(BtnCreateRoom.gameObject);
            break;

        case EGameEvent.eGameEvent_UIGuideSelectPrimaryBtnEnd:
            objList.Add(SpriteEasyOrHigh[1].gameObject);
            break;
        }

        IGuideTaskManager.Instance().SendTaskMarkObjList(taskId, objList);
    }
Esempio n. 27
0
        void BtnEvent(int ie, bool pressed)
        {
            if (pressed)
            {
                return;
            }
            switch ((GameRoomBtn)ie)
            {
            case GameRoomBtn.SEAT1:
            case GameRoomBtn.SEAT2:
            case GameRoomBtn.SEAT3:
            case GameRoomBtn.SEAT4:
            case GameRoomBtn.SEAT5:
            case GameRoomBtn.SEAT6:
                if (!PlayerManager.Instance.LocalAccount.IsReady() || PlayerManager.Instance.LocalAccount.IsMaster())
                {
                    RoomCtrl.Instance.ChangeSeat(ie + 1);
                }
                break;

            case GameRoomBtn.SEAT7:
            case GameRoomBtn.SEAT8:
                RoomCtrl.Instance.ChangeSeat(ie + 1);
                break;

            case GameRoomBtn.STARTBATTLE:
                BtnStart();
                break;

            case GameRoomBtn.LEAVEBATTLE:
                IGuideTaskManager.Instance().SendTaskEnd((Int32)GameEventEnum.GameEvent_UIGuideBackLobbyBtnEnd);
                if (!PlayerManager.Instance.LocalAccount.isGameLookViewer() && PlayerManager.Instance.LocalAccount.IsReady() && !PlayerManager.Instance.LocalAccount.IsMaster())
                {
                    MsgInfoManager.Instance.ShowMsg((int)ERROR_TYPE.eT_CancelReady);
                }
                else
                {
                    HolyGameLogic.Instance.LeaveRoom();
                }
                break;
            }
        }
Esempio n. 28
0
 void SetTimeLabel(MAPTYPE _type, int ie)
 {
     BtnCancel.transform.parent.gameObject.SetActive(true);
     for (int i = 0; i < SpriteBg.Length; i++)
     {
         SpriteBg[i].gameObject.SetActive((i + 1) == ie);
     }
     type       = _type;
     isDownTime = true;
     if (CountDownTime.gameObject.activeSelf == true)
     {
         startTime = 0;
         ShowCount(CountDownTime, (int)startTime);
     }
     if (type == MAPTYPE.MIDDLEMAP)
     {
         IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideMatchBtnEnd);
     }
     CGLCtrl_GameLogic.Instance.QuickBattle((int)type);
 }
Esempio n. 29
0
    void StartIGuideTask(EGameEvent taskId)
    {
        //List<BoxCollider> box = new List<BoxCollider>();
        List <GameObject> objList = new List <GameObject>();

        switch (taskId)
        {
        case EGameEvent.eGameEvent_UIGuideNewsGuideEnd:
            objList.Add(BtnGuide.Find("Guide1").gameObject);
            break;

        case EGameEvent.eGameEvent_UIGuideSelfDefBtnEnd:
            objList.Add(CustomButton.gameObject);
            break;

        case EGameEvent.eGameEvent_UIGuideMatchBtnEnd:
            objList.Add(BtnModeSelect.Find(modeName[0]).gameObject);
            break;
        }


        IGuideTaskManager.Instance().SendTaskMarkObjList(taskId, objList);
    }
Esempio n. 30
0
        private void OnCommitHero(int ie, bool press)
        {
            //if (press)
            //{
            //    objHightLight.gameObject.SetActive(true);
            //}
            //else
            //{
            EnabledSurePress(false);
            // }
            if (press || mSeletState != SelectHeroState.InSelect)
            {
                return;
            }
            if (mSelectIndex != -1)
            {
                IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideSelectHeroCommitEnd);
                CGLCtrl_GameLogic.Instance.EmsgToss_AskSelectHero((UInt32)HeroCtrl.Instance.heroInfoList.ElementAt(mSelectIndex).HeroSelectNum);

                mSkinsDisable.gameObject.SetActive(false);
                mSkinsToggle.value = true;
            }
        }