void FinishAction(GameManager.JudgementState judge) { currentMotionOrder.judge = judge; reaction.CreateReaction(judge, Vector3.zero); timeManager.StopTimeGauge(); actionCheck = true; }
public void CreateReaction(GameManager.JudgementState judge, Vector3 judgeResultPosition) { // 五段階評価の表示 GameObject judgeResult = GameObject.Instantiate(jugmentResultImage) as GameObject; judgeResult.transform.SetParent(this.transform); judgeResult.GetComponent <Image> ().sprite = judgeResultSprites [(int)judge]; judgeResult.GetComponent <RectTransform>().localPosition = judgeResultPosition; judgeResult.GetComponent <RectTransform>().localScale = Vector3.one; // ボイスの再生 AudioClip voice = voiceList [(int)judge] [UnityEngine.Random.Range(0, voiceList [(int)judge].Count)]; if (voice == null) { Debug.LogAssertion(judge + "Voice Clip Is null!!"); } audioSource.clip = voice; audioSource.Play(); // スコア加算 GameManager.Instance.AddScore(judge); }