Search the Community
Showing results for tags 'x'.
-
I have an array of items (stored as strings) I am displaying on screen as sprites, in an inventory. I want to update my array when an item is removed from my inventory, so I want to write a function that resets the x position of the objects. I can log out the right object and the right index value, but I can't seem to set the position of the object using this function. Any ideas ? example: inventory('key', 'rock', 'sword', 'note'); resetSlots: function() { //for every item in inventory, slot position is index number. inventory.forEach(function(item, index){ item.x = index * 150; console.log(item.x); //this returns "undefined" }) },
-
Hey everyone! So I'm pretty new to Phaser and I'm having a hard time making the player's bullets stop at a certain point (e.g killing the projectile at around 30px after its original position, etc). I want the player to have a limited projectile range and I'm just wondering how you can implement that because all my attempts of trying to figure it out have failed so far, so I'm seeking help from you guys... Thanks for any advise!
-
Hi, everyone, I am new in the framework of the phaser, and I came to ask your help to know how to create a parallax effect equal to the GitHub site when it is not found the page, example here: https://github.com/errorr4frsf wanted this effect between two background images, where the last image moves contrary to the mouse movement.