예제 #1
0
파일: DogHumanQTE.cs 프로젝트: linxscc/bnyx
        public void Begin()
        {
            selfController.RoleAnimator.SetInteger("qteState", 1);
            targetController.RoleAnimator.SetTrigger("qte_dog_to_human");

            selfController.IsQte   = true;
            targetController.IsQte = true;

            // 给qte目标设置朝向 add by TangJian 2019/3/20 21:47
            targetController.SetDirectionInt(-selfController.GetDirectionInt());

            LockTarget();

            _qteState = QteState.QteRunning;
        }
예제 #2
0
파일: DogHumanQTE.cs 프로젝트: linxscc/bnyx
 public void OnTargetStateEvent(string stateName, AnimatorStateEventType eventType, Animator animator,
                                AnimatorStateInfo stateInfo,
                                int layerIndex, float time)
 {
     if (_qteState == QteState.QteRunning)
     {
         if (eventType == AnimatorStateEventType.OnStateEnter)
         {
             if (stateName == "Qte_DogToHuman_Struggle")
             {
                 StruggleTimes++;
                 if (StruggleTimes >= 1)
                 {
                     _qteState = QteState.QteFailure;
                     targetController.RoleAnimator.SetTrigger("qte_struggleSuccess");
                 }
             }
         }
     }
 }
예제 #3
0
파일: DogHumanQTE.cs 프로젝트: linxscc/bnyx
 public void Success()
 {
     _qteState = QteState.QteSuccess;
     Tools.Destroy(this);
 }