Exemple #1
0
    private IEnumerator SuckingBlood(int bloodPerSec, float tickRate)
    {
        PlayerStatsManager playerStats = player.GetComponent <PlayerStatsManager>();

        AudioManager.instance.PlaySound(SoundType.DraculaBite);
        while (npcController.CurrentHealth > 0)
        {
            npcController.DecreaseHealth(bloodPerSec);
            playerStats.IncreaseSatiationValue(bloodPerSec);
            playerStats.IncreaseHealthValue(bloodPerSec);
            Debug.Log("Currently Drinking!");
            yield return(new WaitForSeconds(tickRate));

            AudioManager.instance.PlaySound(SoundType.DraculaDrink);
        }
        player.SuckingBlood = false;
        AudioManager.instance.PlaySound(SoundType.DraculaDrinkDone);
        npcController.Dead();
    }
Exemple #2
0
 public void GainHealth(int health)
 {
     playerStatsManager.IncreaseHealthValue(health);
 }