Exemple #1
0
 protected virtual void AnimaCut()
 {
     if (lastCutisAboveToBelow)
     {
         iTween.RotateTo(render.gameObject, iTween.Hash(
                             "z", AngleAttack.y - 45,
                             "time", TimeShit,
                             "islocal", true,
                             "easeType", iTween.EaseType.easeOutExpo,
                             "oncomplete", "onAttackComplete",
                             "oncompletetarget", this.gameObject));
         lastCutisAboveToBelow = false;
         OnCutBegin?.Invoke();
     }
     else
     {
         if (Time.time - lastTimeCut > TimeShit * 2)
         {
             iTween.RotateTo(render.gameObject, iTween.Hash(
                                 "z", AngleAttack.y - 45,
                                 "time", TimeShit / 2,
                                 "islocal", true,
                                 "easeType", iTween.EaseType.easeOutCubic,
                                 "oncomplete", "onBeginAttackToFirstCut",
                                 "oncompletetarget", this.gameObject));
         }
         else
         {
             onBeginAttackToFirstCut();
         }
     }
 }
Exemple #2
0
 private void onBeginAttackToFirstCut()
 {
     iTween.RotateTo(render.gameObject, iTween.Hash(
                         "z", AngleAttack.x - 45,
                         "time", TimeShit,
                         "islocal", true,
                         "easeType", iTween.EaseType.easeOutCubic,
                         "oncomplete", "onAttackComplete",
                         "oncompletetarget", gameObject));
     lastCutisAboveToBelow = true;
     OnCutBegin?.Invoke();
 }