//각각의 0,1,2,3 에따라서 표정 대사가 달라짐 public void ComboReaction(int combo) { ///으아아아아아 코통 받는다아아아아아!!!! 대충짬... 음 이걸 따로 뺴서... 쿨럭... int temp = Random.Range(0, 3);//0,1,2 if(combo < 11 && combo > 0) { temp = Random.Range(0, 5);//0,1,2,3,4 switch (temp) { case 0: case 1: Speak(((unitychanCount)combo).ToString(), 1f); break; case 2: Speak("GP_GOOD_00"); break; case 3: Speak("GP_GOOD_01"); break; case 4: Speak("GP_GOOD_02"); break; } } else { temp = Random.Range(0, 3);//0,1,2 switch( temp) { case 0: Speak("GP_COMBO_HIGH_00"); break; case 1: Speak("GP_COMBO_HIGH_01"); break; case 2: Speak("GP_EXCELLENT_00"); break; } } if (temp > 1) { temp = Random.Range(0, 3); StaticMotionSelector((unitychanStaticMotion)temp, 0.3f, 2f); } }
//Routine for Static Motion IEnumerator ssStaticMotionSelector(unitychanStaticMotion motion,float sTime,float remain) { anim.CrossFade(motion.ToString(), sTime); yield return StartMotionCorotine(waitFuntion(remain)); anim.SetTrigger("WaitTrigger"); currentMotionCorotine = null; }
void Update() { if(Input.GetKeyDown(KeyCode.Q)) { if(StopMotionCorotine()) { Debug.Log("b"); StaticMotionSelector(temp, 10f, 2f); } else { Debug.Log("a"); StaticMotionSelector(temp, 0.1f, 2f); } temp += 1; } }
public Coroutine StaticMotionSelector(unitychanStaticMotion motion,float sTime,float remain) { return StartMotionCorotine(ssStaticMotionSelector(motion, sTime, remain)); }