• Content Count

  • Joined

  • Last visited

About isepulveda

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. create: function(){ count = 0; this.cursor = game.input.keyboard.createCursorKeys(); game.stage.backgroundColor = "#4488AA"; this.player = game.add.sprite(600, 250, 'player'); this.player.anchor.setTo(0.5, 0.5); game.physics.arcade.enable(this.player); this.friend = game.add.sprite(400, 250, 'friend'); this.friend.anchor.setTo(0.5, 0.5); game.physics.arcade.enable(this.friend); // Create a Rectangle var rectangle = new Phaser.Rectangle(0, 515, 1000, 200); // Create a BitmapData just to plot the points to var bmd = game.add.bitmapData(game.width, game.height); bmd.rect(rectangle.x, rectangle.y, rectangle.width, rectangle.height, '#ffffff'); bmd.addToWorld(); this.message = game.add.text(500, 540, 'Hello, thank you for coming to save us.', {font: "18px Arial", fill: "#333333", align: "center"}); this.message.anchor.setTo(0.5, 0.5); this.timer = game.time.create(false); * 4, update, this); function update(){ count++; if(count === 0 ){ this.message.setText("1. We need your help to save the world"); }else if(count === 1){ this.message.setText("To be able to save the world, you must gain magic."); }else if(count === 2){ this.message.setText("The mini games in each world will give you a new magic spell. You must complete the mini-game before exploring the rest of the world. Good luck to you."); } } }, I am trying to display a dialogue between two characters.
  2. I used a function within the create: function. game.input.onDown.addOnce(update, this); function update(){ count++; if(count <= 1){ this.message.setText("We need your help to save the world"); return count; } } }, update: function(){ } Now, I am trying to update the text for each click. Can anyone help?
  3. I have been trying to use phaser examples in my games. I noticed that the examples are not using states. The game that I am developing is using states, so I can't use the examples because I keep getting errors. Here's an example of what I am talking about: Phaser example: game.input.onDown.addOnce(updateText, this); my code game.input.onDown.addOnce(this.updateText(), this); What am I doing wrong? What can I do different?
  4. Thanks. I created a function and then used it with, this);
  5. So I'm creating a game. When my character falls off the game world, she is reset to the beginning. I've created a group of aliens, and when they fall off the game world, I want them to be added back to the game like I added my main character. Why can't I use the same code as my main character with a group?
  6. isepulveda


    So I added a map for my game. The tiles show up fine, but my character is able to walk over the edges. Is there a way for me to fix that on tilemap?