protected void HurtNpc()
 {
     // hit Npc, and update the stats
     thisNpcBehavior.OnNormalDamage();
     thisUiManager.UpdateNpcText();
     if (thisNpcBehavior.GetNpcHitPoints() > 0)
     {
         thisUiManager.StopAnySlash(thisNpcBehavior.gameObject);
         thisUiManager.ActivateSingleSlash(thisNpcBehavior.gameObject);
     }
 }
Beispiel #2
0
    public void UpdateNpcText()
    {
        int npcHp = thisNpcBehavior.GetNpcHitPoints();

        if (npcHp > 0)
        {
            thisNpcHpText.text = npcHp.ToString();
        }
        else
        {
            thisNpcHpText.text = " ";
            thisNpcZenPrompt.gameObject.SetActive(true);
        }
    }
    public void AnnounceGameResult()
    {
        int theNpcHp    = thisNpcBehavior.GetNpcHitPoints();
        int thePlayerHp = thisPlayerBehavior.GetPlayerHitPoints();

        if (theNpcHp - thePlayerHp > 0)
        {
            //SceneManager.LoadScene("Fail");
            thisAudioManager.StartFadingOut("Fail", thisBg, thisBg.volume, thisFadeOutDuration, t);
        }
        else if (theNpcHp - thePlayerHp == 0)
        {
            //SceneManager.LoadScene("Tie");
            thisAudioManager.StartFadingOut("Tie", thisBg, thisBg.volume, thisFadeOutDuration, t);
        }
        else if (theNpcHp - thePlayerHp < 0)
        {
            //SceneManager.LoadScene("Congrat");
            thisAudioManager.StartFadingOut("Congrat", thisBg, thisBg.volume, thisFadeOutDuration, t);
        }
    }