I have a function called collisioncheck. Right now it works perfectly by checking variables that apply to a player, such as playerPosX, playerVelX, playermaskIMG, etc.
What I want to do is something like collisioncheck(object), so that say I call collisioncheck(player) it will check the variables like above with playerPosX etc. and if I call collisioncheck(zombie) then it will instead check zombiePosX, etc.
How could I do this?
If you have any questions please ask as I am not really very good at explaining this... thanks in advance!
posX,velX,maskIMG, regardless of whether it is aplayer,zombieor something else?