Quantcast
Channel: 2D Latest Topics
Viewing all articles
Browse latest Browse all 623

gemmatch example

$
0
0

I have been looking at this: http://phaser.io/examples/v2/games/gemmatch example. The columns and rows are positioned starting at the game origin, which can cause the sprites  to appear off centre, when looked at relative to the canvas/game border.

I have aded a couple of lines of code which [visually] centres the 'gems'. The code lets you adjust the  GEM_SPACING and/or canvas/game dimension values, and  updates the 'gems' [group] anchor value accordingly.

However, what I can't seem to do, is to create a margin between the canvas edges and the 'gem' [group], without breaking the code.

All suggestions, welcome.

Thanks....

-u


Viewing all articles
Browse latest Browse all 623

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>