JamesMakesGames

DestructibleCover

Feb 24th, 2022
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.23 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class DestructibleCover : MonoBehaviour, IDamageable
  4. {
  5.     public void Break()
  6.     {
  7.         Destroy(gameObject);
  8.     }
  9.  
  10.     public void Damage(float damageAmount)
  11.     {
  12.         Break();
  13.     }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment