Jandeilson

Members
  • Content Count

    18
  • Joined

  • Last visited

About Jandeilson

  • Rank
    Member

Contact Methods

  • Website URL
    http://joguindie.com.br
  • Twitter
    jandeilson

Profile Information

  • Gender
    Male
  • Location
    Brazil
  • Interests
    Indie Games
  1. How do I add proper events to the start and end of the drag? Sorry, but I do not know how to do. :( The only thing I want to do is move sprites "hearts1" group by dragging. Thank you!
  2. So ... anyone would know how to do that?
  3. Game.Level1 = { create: function () { this.game.physics.startSystem(Phaser.Physics.P2JS); //Background bg = this.game.add.sprite(0, 0, 'bg_game'); bg.animations.add('loop'); bg.animations.play('loop', 5, true); //Rotate Heart //rotateHeart = this.game.add.sprite(this.game.world.centerX, this.game.world.centerY, 'rotateHeart'); //rotateHeart.animations.add('loop'); //rotateHeart.animations.play('loop', 5, true); //rotateHeart.anchor.setTo(0.5, 0.5); //Enemy Ball 1 enemyBall = this.game.add.sprite(this.game.world.centerX, this.game.world.centerY, 'enemyBall'); enemyBall.animations.add('loop'); enemyBall.animations.play('loop', 5, true); enemyBall.pivot.x = 150; enemyBall.pivot.y = 150; //this.game.add.tween(enemyBall.scale).to( { x: 2.5, y: 2.5 }, 5000, Phaser.Easing.Linear.None, true, 0, 5000, true); this.game.physics.enable(enemyBall, Phaser.Physics.P2JS); enemyBall.body.angularVelocity = 10; enemyBall.body.immovable = true; //Heart P1 hearts1 = this.game.add.group(); hearts1.enableBody = true; hearts1.physicsBodyType = Phaser.Physics.P2JS; for (var i = 0; i < 4; i++) { heart1 = hearts1.create(i*176+32, 72, 'heart1'); heart1.inputEnabled = true; heart1.input.enableDrag(); } }, update: function() { }, hearts1Kill: function (enemyBall, hearts1) { hearts1.kill(); }};Above you can see my code, I'll be happy to get your help, because I really do not know how to make it work.
  4. Hi everyone, I'm trying to drag a group of sprites with Physics P2, but not working. Someone can help me? With ARCADE physical drag works, but does not work with P2.
  5. Understand... I hope it is fixed as soon as possible. Thanks for the note.
  6. Hi guys! I'm trying to make a group collides with a sprite, but does not work. Whenever I add new physical parameters of the Phaser 2 in the group, drag and collide stops working. How do I group with drag collide with sprite? MY CODE: game.Level1 = { create: function () { //Background bg = this.game.add.sprite(0, 0, 'bg_game'); bg.animations.add('loop'); bg.animations.play('loop', 5, true); //Enemy Ball 1 enemyBall = this.game.add.sprite(this.game.world.centerX, this.game.world.centerY, 'enemyBall'); enemyBall.animations.add('loop'); enemyBall.animations.play('loop', 5, true); enemyBall.pivot.x = enemyBall.width * 2.5; enemyBall.pivot.y = enemyBall.height * 2.5; //this.game.add.tween(enemyBall.scale).to( { x: 2.5, y: 2.5 }, 5000, Phaser.Easing.Linear.None, true, 0, 5000, true); this.game.physics.enable(enemyBall, Phaser.Physics.ARCADE); //enemyBall.body.angularVelocity = 100; //Heart P1 hearts1 = this.game.add.group(); //For some reason this function disables the drag. See this example: http://goo.gl/mKt1Hs hearts1.enableBody = true; hearts1.physicsBodyType = Phaser.Physics.ARCADE; for (var i = 0; i < 4; i++) { heart1 = hearts1.create(i*176+32, 72, 'heart1'); heart1.inputEnabled = true; heart1.input.enableDrag(false, true); } }, update: function() { this.game.physics.arcade.collide(hearts1, enemyBall); }, };
  7. Thanks! It worked perfectly! But the sprite changes its position. How to make the same rotate around statically?
  8. The solution I found for my problem was as follows: // Colect Sprite colectSprite: function (character, sprite) { this.score += 1; //My mistake was that I was destroying the sprite before being counted 1 score. Putting a "sprite.kill();" before "if (this.score === 1)..." //A sprite can be destroyed only 1 score is counted. if (this.score === 1) { sprite.kill(); character.kill(); this.game.add.sprite(295, 155, 'character2'); } } It was something like that solved my problem. Emphasize that you need to reset the records every overlap.
  9. Hi people! I want to make the "yellow sprite" rotate around the "red sprite", which would make this code work? Seeing the example of rotation points here I see that it is possible, but how to make it work with sprites instead of points? You can see a picture to better illustrate what I want to do. Thank you!
  10. Hi everyone! Where "Drag quickly" a sprite of a group for a sprite specifies the same exceeds the set amount of score. I need to drag the sprites of the group quickly without this bug occurs. As I understand the problem is that when you drag the sprite of group quickly the score sometimes is greater than 1, which is the value set for each sprite of group. SOLVED!
  11. Now I understand better... maybe I've made ​​a mess in my head. Thanks for the clarification! Were useful.
  12. I did not know this Brackets... tried a few moments and it looks awesome.
  13. Because the tutorials that use Visual Studio. So... why tutorials use Visual Studio?
  14. Hello people! I'm very new to developing with HTML 5 and all that ... so I wanted your help regarding a doubt. About using Visual Studio, I really need to use it to create a good game in HTML5 with the Phaser? Understand web development, so it's easier for me to just programming by a text editor like Notepad + + or Sublime Text. I want to develop without Visual Studio, it is possible without too many complications? Incidentally, I do not know much about Visual Studio. Thank you!