Jump to content


  • Content Count

  • Joined

  • Last visited

About dandorf

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Recent Profile Visitors

1126 profile views
  1. Spanish: ¡Buenas! He colaborado con un usuario de Youtube para crear un curso básico de iniciación en Phaser. Con estos tutoriales podrás ir adentrándote en la programación de videojuegos con el framework Phaser (que nos ofrece muchas facilidades). Espero que les sea de ayuda. English: Hey! I've collaborated with a YouTube user to create a basic introductory course in Phaser. With these tutorials you'll go adentrándote in game programming framework with Phaser (which offers many facilities). I hope it will help.
  2. I'm working with different states. Where I have all code of gameplay called "ingame" Ok, I'll use it when calling the game.time.events.add function receives the following parameters: game.time.events.add (1000, this.myFunction, this, arguments); Use this follow: add(delay, callback, callbackContext, arguments) So far so good. The problem comes when wanting to use this function from an extended sprite update (created by me). When I call the function from there "this" refers to the sprite, so you can not put "this" in the third parameter of the function. The context when I use this is Sprite
  3. I'm trying to make something happen when hasTile return false, but never this occurs. I want that when my character has a null tile in front of them, something happens.
  4. That's what I was missing !! Your system works perfectly. Thank you!
  5. I will use this method to do it, but I have a problem. Each enemy has their own health, created a local variable on your sprite. So when I call the function toggleInvincible have to pass as parameter that enemy ... I do not know how. I have the following: HitOn : function(bullet, enemy){ if (enemy.invincible == false) { enemy.health -= 1; bullet.kill(); if (enemy.health == 0) { enemy.killed = true; //a variable create with me enemy.kill(); } else { enemy.invincible = true; //and then we add a timer to restore the player to a vulne
  6. like do to when you hit the enemy, this is around for a while invincible? invincible maybe 2 seconds (blinking, for example), and then he can hit again. I have to use some kind of timmer, the game.now ...?
  7. I think I finally have to make the extended class Sprite. What I can do in my game code itself, or I have to do it in the file "phaser.js"? If I can do in my own game code ... How I can do? Thank you very much for the help.
  8. I created a group with the enemies on the screen. Now I would like to have each enemy hit points (some 2 others 3 others 4, etc ...). Then I thought that if there is way to make a kind of stretched groups phaser (and that he extended class could add a variable to the health points of each enemy ..?) Or do inthe Sprite class phaser .... I do not know how I should approach this. Any help or ideas? Thanks.
  9. AI enemies do things from time to time, etc ... It is time in my game, I have to create enemies. I do not know how to deal with the issue, I would like you to tell me some options there. How to make the enemy walk to the left and to the right, jump from time to time, etc .... that sort of thing. Thanks!!
  10. Just what I needed! Thank you very much.
  11. I want to make an animation when you take a coin, and when the animation is complete, this animation is destroyed, not consuming resources. I've done that take the currency disappears, then appears the animation, but not destroyed after running animation ... I have the following code: var anim = game.add.sprite(coin.x, coin.y, 'coin'); anim .animations.add('walk'); anim .animations.play('walk', 20, false);
  12. Thank you soooo much!!!
  13. can´t do something?
  14. there is any instruction to set the bounding box to an entire group of sprites? I have the following: n_bullets = game.add.group(); n_bullets.enableBody = true; n_bullets.physicsBodyType = Phaser.Physics.ARCADE; n_bullets.createMultiple(10, 'n_bullet'); n_bullets.setAll('anchor.x', 0.5); n_bullets.setAll('anchor.y', 1); n_bullets.setAll('outOfBoundsKill', true); n_bullets.setAll('checkWorldBounds', true);I think setsize method don´t exist for group .
  15. I´m working with ARCADE physicssystem. Thanks!!
  • Create New...