Advertisement
BeneFager

Untitled

Jan 12th, 2022
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1.  public class BlockBase : MonoBehaviour
  2.     {
  3.         public int health = default;
  4.         public int damage = default;
  5.         public int points = default;
  6.         public float bouncySpeed = default;
  7.  
  8.         public virtual void Start()
  9.         {}
  10.  
  11.         public virtual void TakeDamage(int x)
  12.         {}
  13.  
  14.         public virtual void Die()
  15.         {}
  16.  
  17.         public virtual void OnCollisionEnter(Collision other)
  18.         {
  19.             //use this to perform checks when the ball hits
  20.         }
  21.  
  22.         public virtual void Bounce(Rigidbody body, ContactPoint point)
  23.         {
  24.             //Bounce here
  25.         }
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement