public void OnPlayRollDiceFinish() { RollDiceAni.Pause(); RollSrpite.TrySetComponentValue(string.Format(ConstantData.KeyRollDicePointFormat, _curData.ShowPoint)); RollSrpite.MakePixelPerfect(); if (!_curData.QuickModel) { ConstantData.PlaySoundBySex(_curData.Sex, string.Format(PointSoundFormat, _curData.ShowPoint)); CloudAni.Play(); if (_curData.OneMoreTime) { if (gameObject.activeInHierarchy) { if (_waitForOneMoreTimeCor != null) { StopCoroutine(_waitForOneMoreTimeCor); } _waitForOneMoreTimeCor = StartCoroutine(WaitShowOneMoreTime()); } } } else { CloudSprite.spriteName = ConstantData.KeyDefaultSpriteName; } }
/// <summary> /// 再来一次相关显示 /// </summary> /// <returns></returns> IEnumerator WaitShowOneMoreTime() { OneMoreTime.ResetToBeginning(); yield return(_waiteForOneMoreTimeYield); OneMoreTime.PlayForward(); ConstantData.PlaySoundBySex(_curData.Sex, ConstantData.KeyRollAgin); }
IEnumerator ShowControlDice() { if (_curData.ShowAni) { CostLabel.TrySetComponentValue(YxUtiles.ReduceNumber(_curData.CostCashNum)); if (gameObject.activeInHierarchy) { StartCoroutine(OnShowControlDiceAction.WaitExcuteCalls()); } } ConstantData.PlaySoundBySex(_curData.Sex, ConstantData.KeyControlDice); yield return(_waiteForControlDiceYield); MoveDice(); }
/// <summary> /// 飞机准备 /// </summary> /// <param name="newPlaneData"></param> public void OnPlaneReady(PludoPlaneData newPlaneData) { var readyPlane = GetPlaneById(newPlaneData.DataId); var moveList = new List <Vector3>(); newPlaneData.PlaneStateChange((int)EnumPlaneStatus.Ready); GetMapPosByPlaneData(newPlaneData, false); moveList.Add(newPlaneData.CurPos); ConstantData.PlaySoundBySex(_curPlayerInfo.SexI, ConstantData.KeyStarFly); MoveAndRotateData moveRoateData = new MoveAndRotateData() { MovePath = moveList.ToList(), FinishRotate = newPlaneData.DefTargetPos }; readyPlane.PlaneMovePathWithRotate(moveRoateData, true, delegate { readyPlane.PlaneListReset(); readyPlane.PlaneData.PlaneStateChange((int)EnumPlaneStatus.Ready); }); }