Search the Community
Showing results for tags 'check'.
-
Any object which has a position x, y. Is there a way to force the object to check the position of x, y-1 and if cleared to go. This check should be carried out until the object is alive. Or, as an option, even lower when the object dies forwards the event to the upper ... Maybe someone tell me how to implement it ...
-
Hi, i'm trying to create an object to the right of another object. I want it to check if there is an object that exists already, and if not then create the same object to the right 48 px. I tried this: grass = game.add.sprite(0, 0, 'grass'); if (!grass.body.touching.right) { game.add.sprite(grass+48, 0, 'grass'); }but no luck. any solutions? p.s. i'm fairly new to the Phaser framework, and i'm still learning how to do things like collision checking in phaser. Thanks!