Jump to content

Vishal Gupta

  • Content Count

  • Joined

  • Last visited

About Vishal Gupta

  • Rank
  • Birthday 11/17/1984

Profile Information

  • Gender

Recent Profile Visitors

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

  1. Thanks Tom its working great. thanks a ton
  2. Hi Tom, i have tried this code but its not working i am having a circle inside a circle i have an object when they collide i needs the point of collide so that i can play animation on object touch the circle boundary.
  3. Thanks Tom i will try and let you know.
  4. Hi I am using phaser box2d plugin and using setBodyContactCallback for getting call back when body touch how can i get the touching point x and y so that i can play some animation there. The call back params are body1 body2 fixture1 fixture2 callback
  5. Hi All, i have a texture image and i want to create some graphics like line, circle, rectangle with that texture image. How can i do that with bitmap data and graphics??
  6. Thanks drhayes, I will try and let you know
  7. Hi All, i have to move a sprite on an arc, I have start angle and end angle now i have to move the sprite on arc in loop with reverse effect. i am using tween to do this like on onUpdateCallback i set the position of sprite with radius*Math.sin() and radius*Math.cos() but its not working perfectly. so is there any way by which i can find the value between start and end angle either in increasing order or in decreasing order so that i can make my sprite animate. This is the code currently i am using var diff = this.endAngle-this.startAngle, delta = 2*diff
  8. Hi Joetan, I think you should place a check for number of files loaded like below, You must call this before load start game.load.onFileComplete.add(function(progress, cacheKey, success, totalLoaded, totalFiles){ if(game.load.totalQueuedFiles() === 0){ // this.game.state.start('GameState'); this.startPlay(); // start game from here } }, this);
  9. Hi All, I want to make effect of moving a sprite in loop infinitely like i have a chain image and i want to move its y position on update so it looks like its running all time.
  10. Thanks for the reply and the way you guys suggests. although i am able to do this thing by using Phaser Bitmap data. by using replaceRGB with changing black or white color to any color with alpha 0. var sprite = new Phaser.Image(game,0,0,'clock',1); var sprite2 = new Phaser.Image(game,0,0,'clock',0); var bmd = game.make.bitmapData(53,40); bmd.load(sprite); bmd.replaceRGB(0, 0, 0, 255, 0, 0, 0, 0); var bmd1 = game.make.bitmapData(53,40); bmd1.alphaMask(sprite2,bmd); game.add.image(400, 0, bmd1);
  11. How to make jpeg transparent(i think it can be done with bitmap data but how)? In the attached image i just need a clock image without black background the process i am thinking is make the second frame jpeg bitmap transparent and mask the first frame.
  12. Hi I am creating a graphics arc and adding it into sprite. the graphics size is different than sprite size var graphics = game.add.graphics(cx,cy); graphics.clear(); graphics.beginFill(0x00FF00); graphics.arc(0,0, 15, 0,3.14*2, false); graphics.endFill(); var ui = new Phaser.Image(game,0,0); ui.addChild(graphics); console.log(ui.width,ui.height); console.log(graphics.width,graphics.height); Both console must give same output??
  • Create New...