protected override void OnHide() { LightsCtrl.GetInstance().ChangeLightStatus(LightsCtrl.StatusL.idle); if (bigWin.isPlaying) { bigWin.Stop(); } }
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 } }