Пример #1
0
 void Awake()
 {
     m_instance = this;
 }
Пример #2
0
        /// <summary>
        /// 打开结算界面
        /// </summary>
        public void OpenResult(ISFSObject data = null)
        {
            var selfRd = GetData(Self);

            if (data != null)
            {
                var pwins = data.GetUtfStringArray("pwins");
                var index = 0;

                foreach (var pwin in pwins)
                {
                    var info = pwin.Split(',');

                    if (index < Top.Length && int.Parse(info[1]) != 0)
                    {
                        var topRd = GetData(Top[index]);
                        topRd.Top.text  = (index + 1).ToString();
                        topRd.Name.text = info[2];
                        long coin;
                        long.TryParse(info[1], out coin);
                        topRd.Gold.text = "¥" + YxUtiles.GetShowNumberForm(coin);
                        index++;
                    }
                }

                for (var i = index; i < Top.Length; i++)
                {
                    var topRd = GetData(Top[i]);
                    SetDataNull(topRd);
                }
                selfRd.Top.text  = "本家";
                selfRd.Gold.text = "¥" + YxUtiles.GetShowNumberForm(data.GetInt("win"));

                if (data.GetInt("win") > 0)
                {
                    Facade.Instance <MusicManager>().Play("Win");
                    var gameMgr = App.GetGameManager <CschGameManager>();
                    //gameMgr.LeftLampCtrl.PlayLamp();
                    //gameMgr.RightLampCtrl.PlayLamp();
                }

                selfRd.Name.text = App.GameData.GetPlayer().Nick;
                var bankerRd = GetData(Banker);
                bankerRd.Name.text = App.GetGameManager <CschGameManager>().BankerMgr.Banker.Nick;
                bankerRd.Gold.text = "¥" + YxUtiles.GetShowNumberForm(data.GetInt("bankWin"));

                PlayerRecord.GetInstance().ShowRealResultRecord();
            }
            else
            {
                SetDataNull(selfRd);

                foreach (var t in Top)
                {
                    var topRd = GetData(t);
                    SetDataNull(topRd);
                }
            }



            BG.SetActive(true);
            var game       = App.GetGameManager <CschGameManager>();
            var rbMgr      = App.GetGameManager <CschGameManager>().RightBottomMgr;
            var upBetValue = rbMgr.UpBetValue;

            if (!game.Execute)
            {
                for (var i = 0; i < game.Regions.Length; i++)
                {
                    upBetValue[i] = 0;
                }
            }
            else
            {
                game.Execute = false;
            }

            RecordCtrl.GetInstance().AssignmentLastRound();

            for (var i = 0; i < game.Regions.Length; i++)
            {
                upBetValue[i] = 0;
            }

            CoinSpriteVisCtrl();
        }