• Content Count

  • Joined

  • Last visited

About marein

  • Rank

Contact Methods

  • Twitter
  1. If I understand your code right, you want to check if the player overlap with a spike. You don't want to move the player and the spike physically. If so, replace this:, this.spikes, this.playerDie, null, this);With this:, this.spikes, this.playerDie, null, this);This should do the trick. But if you want a bouncing player, please show me the createFromTiledObject function. EDIT: You asked for an explanation for my code. In my games I create a class for each object. There is an example on the phaser site
  2. Hey, you need to set this on each spike object. My previous code is an object oriented way to do that. Maybe you don't use the oop way to achieve that. Can you paste your code that create the spikes? I'm looking forward to extend it. Or maybe this example fit your needs Take a look between line 27 and 37.
  3. Hey AmAuron, you can calling the load method again in the preload function of your state where you need it. This works for me. // Some statepreload: function() {'kalimba', 'assets/audio/kalimba.mp3');}// Some other statepreload:function() {'kalimba', 'assets/audio/newkalimba.mp3');}
  4. Hello frokenstein, I think this example fit your needs Take a look at the button object.
  5. Hello Cress, you need to set the spike objects immovable. I do this in the constructor. An example (note: I inject a state, not the entire game): GameObject.Brick = function (state, x, y) { this.state = state; var game =;, game, x, y, 'texture'); this.frameName = 'some_image_name.png'; state.physics.enable(this, Phaser.Physics.ARCADE); // this line is for you this.body.immovable = true;}; I hope this helps.