Exemple #1
0
 public void NotifyBabyDied(Vector2 at, NotSafeStuff.DamageType damageType, string notSafeStuff)
 {
     Running = false;
     deathCamera.transform.position = new Vector3(at.x, at.y, -10);
     dieReason.GetComponent <TextMeshProUGUI>().SetText
     (
         "Die Reason: " + damageType.ToString() + "\n" + notSafeStuff
     );
     endPoints.GetComponent <TextMeshProUGUI>().SetText("GAME OVER - " + _points.ToString() + " Points");
     pointsPanel.SetActive(false);
     endPanel.SetActive(true);
 }
    void TakeDamage(NotSafeStuff.DamageType damageType)
    {
        switch (damageType)
        {
        case NotSafeStuff.DamageType.Drowning:
            _animator.SetTrigger("GotToxic");
            break;

        case NotSafeStuff.DamageType.Burn:
            _animator.SetTrigger("GotHeat");
            break;

        case NotSafeStuff.DamageType.ElectricShock:
            _animator.SetTrigger("GotElectric");
            break;
        }
    }