/// <summary> /// Set /// </summary> public void Set(MultiPlayApi.GetSoulResponseData response, Action <uint> onCreateWhale, Action onFinished) { // レスポンス受け取り this.response = response; // 各コールバックセット this.onCreateWhale = onCreateWhale; this.onFinished = onFinished; // スロット段階 this.jackpotChanceId = this.response.tMultiSoulBall.soul / 3; this.animator.SetInteger("JackpotChanceId", (int)this.jackpotChanceId); // 取得するId (現在1~5まで、あり) this.lotteryId = this.response.jackpotHit ? this.response.mMultiJackpotLottery[0].lotteryId : 0; // 1段スロット、リール停止値設定 if (this.jackpotChanceId == 1) { this.slotMachineFrame.sprite = this.slotMachineFrames[this.jackpotChanceId - 1]; StopValueRule(); } // 2段スロット、リール停止値設定 else if (this.jackpotChanceId == 2) { this.slotMachineFrame.sprite = this.slotMachineFrames[this.jackpotChanceId - 1]; StopValueRule(); } // 3段スロット、リール停止値設定 else { this.slotMachineFrame.sprite = this.slotMachineFrames[this.jackpotChanceId - 1]; // ジャックポッド(3段のみ) if (lotteryId == 1) { // ジャックポットセット(0番目のslotSprite) SetSlotResult(0, 0, 0); } else { StopValueRule(); } } }
/// <summary> /// 龍魂取得アニメーション再生 /// </summary> public void PlayGetSoulAnimation(MultiPlayApi.GetSoulResponseData soulResponse, Vector3 dropPosition) { this.soulResponse = soulResponse; //スロット開始かどうか bool isSlot = this.soulResponse.tMultiSoulBall.soul % 3 == 0; if (isSlot) { //スロット開始するのでこれ以上カウントダウンしない if (this.updateFeverTimeCoroutine != null) { StopCoroutine(this.updateFeverTimeCoroutine); this.updateFeverTimeCoroutine = null; } //スロット演出開始を通知 (SceneChanger.currentScene as Battle.MultiBattleScene).OnStartSlot(); } uint i = (this.soulResponse.tMultiSoulBall.soul - 1) % 3; this.souls[i].PlayGetAnimation(this.soulResponse.tMultiSoulBall.soul, dropPosition, this.transform as RectTransform, () => { if (isSlot) { SoundManager.Instance.PlaySe(SeName.SOUL_COMP); //カウントダウン途中で止められたかもしれないので、カウントダウン表示をリセット this.shapeGauge.fillAmount = 0f; this.SetBallNum(0); //スロット開始なら龍魂画面外に飛び出す(演出中はタッチブロック) this.bgBlack.SetActive(true); this.touchBlock.SetActive(true); this.animator.Play("SoulFlyOut", 0, 0f); } }); }