I have an "if" statement: if(curBlock = BrickType.Dirt) and I want it to see is your "Current Block" is dirt. BrickType is an enum: `public enum BrickType {Dirt, ect...}, because I have many different block types. So, I want it to be so that when I break a block, it checks what type of block it is, then it adds it to your inventory, but I get the error: Assets/Scripts/PlayerIO.cs(69,31): error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected. So is there a way I can have it check what block it is? Also is there a easier way to add it to your inventory, instead of having an "if" statement for every block?
↧