예제 #1
0
 protected void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         if (App.GetGameData <MdxGameData>().CouldOut)
         {
             YxMessageBox.Show(new YxMessageBoxData
             {
                 Msg       = App.GetGameManager <MdxGameManager>().TipStringFormat.SureAboutQuit,
                 IsTopShow = false,
                 Listener  = (box, btnName) =>
                 {
                     if (btnName == YxMessageBox.BtnLeft)
                     {
                         App.QuitGame();
                     }
                 },
                 BtnStyle = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle,
             });
         }
         else
         {
             YxMessageBox.DynamicShow(new YxMessageBoxData
             {
                 Msg       = App.GetGameManager <MdxGameManager>().TipStringFormat.IsInGameing,
                 IsTopShow = false,
                 Delayed   = 5,
             });
         }
     }
 }
예제 #2
0
 protected void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         if (App.GetGameData <BjlGameData>().CouldOut)
         {
             YxMessageBox.Show(new YxMessageBoxData
             {
                 Msg       = "确定要退出游戏吗!?",
                 IsTopShow = false,
                 Listener  = (box, btnName) =>
                 {
                     if (btnName == YxMessageBox.BtnLeft)
                     {
                         App.QuitGame();
                     }
                 },
                 BtnStyle = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle,
             });
         }
         else
         {
             YxMessageBox.DynamicShow(new YxMessageBoxData
             {
                 Msg       = "正在游戏中,无法退出游戏!?",
                 IsTopShow = false,
                 Delayed   = 5,
             });
         }
     }
 }
예제 #3
0
 public void OnQuitGame()
 {
     if (App.GetGameData <BjlGameData>().CouldOut)
     {
         YxMessageBox.DynamicShow(new YxMessageBoxData
         {
             Msg       = "确定要退出游戏吗!?",
             IsTopShow = false,
             Listener  = (box, btnName) =>
             {
                 if (btnName == YxMessageBox.BtnLeft)
                 {
                     App.QuitGame();
                 }
             },
             BtnStyle = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle,
         });
     }
     else
     {
         YxMessageBox.DynamicShow(new YxMessageBoxData
         {
             Msg       = "正在游戏中,无法退出游戏!?",
             IsTopShow = false,
             Delayed   = 5,
         });
     }
 }
예제 #4
0
 /// <summary>
 /// 退出游戏
 /// </summary>
 public void QuitGame()
 {
     CloseListView();
     if (App.GetGameData <BlackJackGameData>().IsPlaying)
     {
         YxMessageBox.DynamicShow(new YxMessageBoxData
         {
             Msg     = "正在游戏中,无法退出游戏!",
             Delayed = 5,
         });
     }
     else
     {
         YxMessageBox.DynamicShow(new YxMessageBoxData
         {
             Msg      = "您确定要退出游戏吗!?",
             BtnStyle = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle,
             Listener = (box, btnName) =>
             {
                 if (btnName == YxMessageBox.BtnLeft)
                 {
                     App.QuitGame();
                 }
             },
             IsTopShow = true,
         });
     }
 }
예제 #5
0
        public void Play()
        {
            if (App.GameData.GetPlayerInfo().CoinA < 100)
            {
                YxMessageBox.DynamicShow(new YxMessageBoxData {
                    Msg = "金币不够,不能打赏."
                });
                return;
            }
            GirlAn.Play(0);
            App.GetRServer <BjlGameServer>().Reward();
            int a = Random.Range(0, 100) % 3;

            switch (a)
            {
            case 0:
                Facade.Instance <MusicManager>().Play("aoman");
                break;

            case 1:
                Facade.Instance <MusicManager>().Play("dese");
                break;

            case 2:
                Facade.Instance <MusicManager>().Play("maimeng");
                break;
            }
        }
예제 #6
0
 public void OnQuitGame()
 {
     if (App.GetGameData <MdxGameData>().CouldOut)
     {
         YxMessageBox.DynamicShow(new YxMessageBoxData
         {
             Msg       = TipStringFormat.SureAboutQuit,
             IsTopShow = false,
             Listener  = (box, btnName) =>
             {
                 if (btnName == YxMessageBox.BtnLeft)
                 {
                     App.QuitGame();
                 }
             },
             BtnStyle = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle,
         });
     }
     else
     {
         YxMessageBox.DynamicShow(new YxMessageBoxData
         {
             Msg       = TipStringFormat.IsInGameing,
             IsTopShow = false,
             Delayed   = 5,
         });
     }
 }
예제 #7
0
        public void OnClickGift()
        {
            //if(_spriteAnim.isPlaying)
            //    return;
            if (App.GameData.GetPlayerInfo().CoinA < 100)
            {
                YxMessageBox.DynamicShow(new YxMessageBoxData {
                    Msg = "金币不够,不能打赏.",
                });
                return;
            }

            //App.GetRServer<GameServer>().Reward();
            _spriteAnim.namePrefix = AnimReward;
            _spriteAnim.ResetToBeginning();
            _spriteAnim.Play();
        }
예제 #8
0
 public void OnClickChangeRoomBtn()
 {
     CloseListView();
     if (App.GetGameData <BlackJackGameData>().IsPlaying)
     {
         YxDebug.Log("正在游戏中,无法更换房间!");
         YxMessageBox.DynamicShow(new YxMessageBoxData
         {
             Msg     = "正在游戏中,无法更换房间!",
             Delayed = 5,
         });
     }
     else
     {
         YxDebug.Log("正在更换房间....");
         App.GetRServer <BlackJackGameServer>().ChangeRoom();
     }
 }