Advertisement
Guest User

Untitled

a guest
May 6th, 2025
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. public void DealDamage()
  2. {
  3.  
  4. if (health != 0)
  5. {
  6. health--;
  7. }
  8. else
  9. {
  10. Destroy(this.gameObject);
  11. }
  12.  
  13. spriteRenderer.material.color = Color.Lerp(wall_color, originalColor, health / health_max);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement