Jump to content

prateek.pradeep

Members
  • Content Count

    33
  • Joined

  • Last visited

About prateek.pradeep

  • Rank
    Advanced Member
  1. Well found it. While creating particles, iterate on all the sprite in emitter and add and play each particle animation. // enable particle animation of all particles emitter.forEach(function(singleParticle) { singleParticle.animations.add('particleAnim'); singleParticle.animations.play('particleAnim', 30, true); });
  2. I am sorry about create method. I have corrected it in my question. The getRenderTexture method in my custom particle class throws error, when I try to make particles from emitter. Is animation in texture no supported or what? I cannot figure what you are trying to say. Could you be more wordy please.
  3. Hey, Does anybody has an idea on how to animate particles in particle system. I want a spritesheet animation playing on all particles, while these particles roam randomly. Below is the code which I am trying but its not working. function CubeParticle(game, x, y) { window.Phaser.Particle.call(this, game, x, y, game.cache.getRenderTexture('cubeParticle'));}CubeParticle.prototype = Object.create(window.Phaser.Particle.prototype);CubeParticle.prototype.constructor = CubeParticle;function create(){var particle = game.add.sprite(400, 800, 'particles'); particle.animations.add('particleAnim'); p
  4. Well with the current code I get a dotted line having dots placed at random position. what do yo mean by this "I would track the start position and tween the end position, then draw the entire line over again after clearing the graphics. Don't draw it incrementally." Can you speak in terms of code?
  5. Hi, I want to animate line without using sprite sheet. This is what I want. Currently I tried to implement it using Graphics class but cannot achieve it. This is what I tried. var graphics = game.add.graphics(100,100); graphics.lineStyle(4, 0xffffff, 1); var finalPosition = { x: 200, y: 0 }; graphics.moveTo(finalPosition.x, finalPosition.y); var renderLine = game.add.tween(finalPosition) .to({ x: 800, y: 0 }, 3000); renderLine.onUpdateCallback(function() { graphics.lineTo(finalPosition.x, finalPosition.y); graphics.moveTo(fi
  6. In Retro Text 1 example, the font.text value is changing on input movement but the image which is displaying the font is not changing in WebGL/Canvas view of cocoon. i hope Richie RIch will know the root cause for this.
  7. So it means i cannot do anything and my days of hard work is wasted. Alright then.
  8. If i run my game in Cocoon's Webview+ it is jerky but the retro font is working. And if run my game in Canvas/WebGL view my game is as smooth as velvet but the retro font is lost. So i thought to go for WebGL mode with without retro font, with normal text instead. It did not even run the normal text in Canvas/WebGL mode, copied exactly from this example. Here is the code i tried (using Phaser 2.0.5) http://symbolize.web44.net/FB_Share/ What is this sorcery ?
  9. Retro font. If i run my game in Cocoon's Webview+ it is jerky but the retro font is working. And if run my game in Canvas/WebGL view my game is as smooth as velvet but the retro font is lost. So i thought to go for WebGL mode with without retro font, with normal text instead. It did not even run the normal text in Canvas/WebGL mode, copied exactly from this example. Here is the code i tried (using Phaser 2.0.5) http://symbolize.web44.net/FB_Share/ What is this sorcery ?
  10. Shit I am stuck. Howdo I display score now ?
×
×
  • Create New...