Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Creates a interface for the blocks
- public interface IBlock{}
- // The class
- public class Block : MonoBehaviour, IBlock{
- }
- publci bool HasblockType<IBlock>(this Block block){
- Block blockBelow = block.GetBlockBelow();
- return blockBelow.GetType() == IBlock.GetType();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement