示例#1
0
 public void ApplyDamage(float damage)
 {
     if (!isDead && canTakeDamage)
     {
         splatter.Emit(1);
     }
     health -= damage;
     if (health <= 0f)
     {
         Die();
     }
     ThirdPersonUIHandler.master.UpdateHealth(health, maxHealth);
     StartCoroutine(GlobalControl.Flicker(rend, 0f, 0.2f, 0.1f, 0.5f));
 }