// Update is called once per frame
 void Update()
 {
     if (TimeControl.gameState == TimeControl.GameState.introPose && !introPlayed)
     {
         animator.Play("IntroPose", 0);
         introPlayed = true;
     }
     else if (TimeControl.gameState == TimeControl.GameState.fight && !TimeControl.paused)
     {
         sharedProperties.IsThrown(animator, opponentCharacter, character);
         DetermineSide();
         if (!isAI)
         {
             character.SetBackPressed(sharedProperties.GetBackPressed);
             PlayerControls();
         }
         else
         {
             aiBehavior();
         }
     }
     else
     {
         if (SceneManager.GetActiveScene().name == "Game")
         {
             sharedProperties.KOSequence("You Win");
         }
         else
         {
             sharedProperties.KOSequence(characterName + " Wins");
         }
     }
     if (character.GetHealth() <= 0)
     {
         animator.SetBool("isKOed", true);
     }
     if (!animator.GetBool("isInHitStun"))
     {
         if (comboCounter.GetComboCountP2 > 1)
         {
             comboCounter.GetStartTimerP2 = true;
         }
         comboCounter.GetComboCountP2 = 1;
     }
     healthBar.SetHealth(character.GetHealth());
     superBar.SetSuper(character.GetSuper);
 }
Beispiel #2
0
 void Bar()
 {
     healthBar.SetHealth(currentHealth);
 }