deepsky88

Members
  • Content Count

    15
  • Joined

  • Last visited

  1. nice ^^ thx for quickly answers, i tried a little but i don't like it; i'll go to make one time event that make frames visible in cascade within a second or two, i appreciated your help =)
  2. yep but my shapes of mask is drawn with gimp, i saw that is possible to draw polygon but u need an array with coords, is there a way to make the mask filled with a png? my spreatsheet with frames of fade out
  3. thx it seems the right way, however is there any way to add animation on that mask?
  4. hi, i want to a shaped fade out, like the star one in the simpson:https://www.youtube.com/watch?v=72bUheqRE5o. I tried to attach a fully transparent image of 800 x 600 than adding animations to hit with a spreetsheet of 12 frames (all 800 x 600), but when the animations should start nothing happened and chrome don't reveal any error, is it because of the large spreetsheet or what?
  5. finally found out how to make it work, i simply declared esperienza = 0; in the boot, without the var, seems a bit strange to me but i'm noob lol
  6. not working, always NaN; worked a bit if a define var esperienza in the update function, but after one second returns 0, i'm trying to callback the function outside the update right now
  7. why there's not the same problem with all other variables i declared in boot? i don't understand
  8. i thought there was exactly the opposite lol! thx for info i'll try it =)
  9. i create "var esperienza = 0" in the boot, like all other variables and assets, that little snippet is all in update function, i have to try to separate the callback into a separate function outside the update, the main problem is that without this, esperienza is not defined, thx for answer and inputs, i'll try some things and let u know =)
  10. I had to call an anonymous function inside the event timer, haven't found any other solution... Now i'm stuck with this little guy: game.physics.arcade.overlap(player, exp, function (player,Exp) { Exp.kill(); this.esperienza += 10; exptesto.text = 'Esperienza: ' + this.esperienza; music6.play() },null, this), the score(exptesto in my example) report always NaN, any suggestion?
  11. hi, i've a problem in my code, chrome said:"Cannot read property 'apply' of undefined", below the code interested in: (all after the end of update function) if (game.rnd.integerInRange(0, 50) == 1) { nuvoletta.visible = true; game.time.events.add(Phaser.Timer.SECOND / 1.55, this.riflessi, this); }, riflessi: function () { if ((nuvoletta.visible) && (!pulsanteblocco.downDuration(1000))) { pulsanteblocco.isDown = false; nuvoletta.visible = false; if (life5.visible) { life5.visible = false; (game.add.audio('danno1')).play(); } else if (life4.visible) { life4.visible = false; (game.add.audio('danno1')).play(); } else if (life3.visible) { life3.visible = false; (game.add.audio('danno1')).play(); } else if (life2.visible) { life2.visible = false; (game.add.audio('danno1')).play(); } else if (life1.visible) { life1.visible = false; player.frame = 23; player.body.velocity = 0; } } else if ((!stamina1.visible) && (nuvoletta.visible)) { stamina1.visible = true; } else if ((!stamina2.visible) && (nuvoletta.visible)) { stamina2.visible = true; } else if ((!stamina3.visible) && (nuvoletta.visible)) { stamina3.visible = true; } if ((nuvoletta.visible) && (pulsanteblocco.downDuration(1000))) { (game.add.audio('blocco1')).play(); } nuvoletta.visible = false; },
  12. just create more than one animation and put animations.play into the if, example on your example: a = animation from 1 to 2; b = animation from 2 to 3; if.... a.play else....b.play i'm noob here but i think this can be work
  13. I use Gimp to create maps and sprites and i export images with the png standard, no problem for me, u can simply load that images in phaser like u see in the tutorial.
  14. Hi all,i want to create a single png image of like 800 x 20000 and set collisions inside Phaser, is there a way to set dinamic collisions? I succeded to put that file in my game but my ground is always the same, indipendently of the ground drawn in the png. I could use Tiled but i like doing some personal art style, any help will be appreciated, thx =)