示例#1
0
        void OnStartScrollAni(object obj)
        {
            // 播放滚动声音
            Facade.Instance <MusicManager>().Play("CardScroll");
            var gdata = App.GetGameData <Mx97GlobalData>();

            for (var i = 0; i < 9; i++)
            {
                var mv = MoveItems[i];
                if (mv == null)
                {
                    continue;
                }
                mv.ArgA              = 1f;
                mv.ArgB              = 60.0f;
                mv.ArgC              = 1.0f;
                mv.ArgD              = 1.0f;
                mv.HoverTime         = 1.0f;
                mv.SwitchCountToStop = 20;

                var fruitId = gdata.StartData.MFruitList[i];
                mv.StopSpriteName = gdata.GetNameById(fruitId);
                mv.StartScroll();

                //将最终停止的水果放置容器
                if (BigWin.getInstance().finalFruits.Count >= 9)
                {
                    BigWin.getInstance().finalFruits.Clear();
                }

                BigWin.getInstance().finalFruits.Add(mv.StopSpriteName);
            }

            _mIsSendedStopMsg = false;
        }
示例#2
0
        private void OnSwitchBtnWhenStop(object obj)
        {
            //刷按钮
            StartCoroutine(TimerToSwitchBtn(0, false));

            var gdata = App.GetGameData <Mx97GlobalData>();
            var mGold = gdata.StartData.MGotJackpotGlod;

            //var realGold = mGold - App.GetGameData<Mx97GlobalData>().AnteRateAll * App.ShowGoldRate;

            if (ScoreTipObj != null)
            {
                ScoreTipObj.SetActive(true);
            }
            if (ScoreLabel != null)
            {
                ScoreLabel.text = YxUtiles.GetShowNumberForm(mGold);
            }

            //控制是否显示结算
            if (0 >= mGold)
            {
                if (_mIsAutoStart)
                {
                    StartCoroutine(TimerToSwitchBtn(.5f, true));
                }

                return;
            }

            //if (_mIsAutoStart) { _mIsAutoStart = false; }   --不会终止自动

            if (TheJackpotWindow != null)
            {
                TheJackpotWindow.Show();
                TheJackpotWindow.UpdateView(mGold);

                if (_mIsAutoStart)
                {
                    _mIsAutoStart = false;

                    if (!BigWin.getInstance().IsBigWin())
                    {
                        StartCoroutine(TheJackpotWindow.customHide(autoIntervalTime));
                        StartCoroutine(TimerToSwitchBtn(autoIntervalTime, true));
                    }
                }
            }
        }
示例#3
0
        protected override void OnFreshView()
        {
            if (!(Data is int))
            {
                return;
            }

            var lengths = uiSprites.Length;//数集个数
            var number  = (int)Data;

            if (BigWin.getInstance().IsBigWin())
            {
                bigWin.Play();
            }
            else
            {
                Facade.Instance <MusicManager>().Play("Winning");
            }

            var str = YxUtiles.GetShowNumber(number).ToString("0.00").PadLeft(lengths, '0');

            SwapResultPic(str);

            //Debug.LogError("str---------:" + str);

            for (var i = lengths - 1; i >= 0; i--)
            {
                uiSprites[i].GetComponent <UISprite>().enabled    = true;
                uiSprites[i].GetComponent <UISprite>().spriteName = "n_" + str.Substring(i, 1);
            }

            if (str.IndexOf('-') != -1)
            {
                for (int i = 0; i < str.IndexOf('-'); i++)
                {
                    uiSprites[i].GetComponent <UISprite>().enabled = false;
                }
            }
            else
            {
                LightsCtrl.GetInstance().ChangeLightStatus(LightsCtrl.StatusL.win);  //win light
            }
        }
示例#4
0
        public void ParseData(ISFSObject sfsObject)
        {
            MLineList.Clear();
            MFruitList.Clear();

            MIsAllBar = sfsObject.GetBool("allb");

            string strLogLines = "";

            int[] lines = sfsObject.GetIntArray("lines");
            for (int i = 0; i < lines.Length; i++)
            {
                MLineList.Add(lines[i]);

                strLogLines = strLogLines + " " + lines[i] + "";
            }
            YxDebug.Log("  ----> RespStart: Lines info of start data is " + strLogLines + " ! \n");

            MSeven = sfsObject.GetInt("seven");

            MTotalGold = sfsObject.GetLong("ttgold");

            MIsAllFruit = sfsObject.GetBool("allf");

            //全水果、Bar
            BigWin.getInstance().isAllFruit = MIsAllFruit;
            BigWin.getInstance().isAllBar   = MIsAllBar;

            MGotJackpotGlod = sfsObject.GetInt("gold");

            string strLogFruits = "";

            int[] fruit = sfsObject.GetIntArray("fruits");
            for (int i = 0; i < fruit.Length; i++)
            {
                MFruitList.Add(fruit[i]);

                strLogFruits = strLogFruits + " " + fruit[i] + "";
            }
            YxDebug.Log("  ----> RespStart: Fruit info of start data is " + strLogFruits + " ! \n");

            MType = sfsObject.GetInt("type");
        }