Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. // Creates a interface for the blocks
  2. public interface IBlock{}
  3.  
  4. // The class
  5. public class Block : MonoBehaviour, IBlock{
  6.  
  7. }
  8.  
  9. publci bool HasblockType<IBlock>(this Block block){
  10.     Block blockBelow = block.GetBlockBelow();
  11.     return blockBelow.GetType() == IBlock.GetType();
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement