dimanche 8 janvier 2017

Sprite movement on mask

I have an Avatar class that extends the Sprite class. I also have a Room class that contains a Bitmap of "walkable" areas and non-walkable areas, as well as the room's artwork itself.

I need to make sure that the user can only walk on the white/transparent parts of the room "mask," without actually showing the black and white mask. What functions can I use to ensure that the user doesn't go into the black parts of the mask, quickly?

Aucun commentaire:

Enregistrer un commentaire