// Update is called once per frame
 void Update()
 {
     if (!characterMovePlayer.CheckIsPlaying())
     {
         currentlyPlayedMove = null;
         // Only set the collider to false if we have enabled it once before
         if (activeBodypartCollider != null)
         {
             activeBodypartCollider.enabled = false;
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Updates the strength and speed values to the values of the sliders.
 /// </summary>
 private void updateStrengthAndSpeed(int speed, int strength)
 {
     move.SetSpeed(speed);
     move.SetStrength(strength);
     //If animation is already playing, replay it as speed changes.
     if (movePlayer != null && movePlayer.CheckIsPlaying())
     {
         movePlayer.PlayMove(this.move);
     }
 }