Jump to content

Changing Height From top to bottom


WombatTurkey
 Share

Recommended Posts

Dumb question, I am sorry but I've been stuck on this for a while.

 

https://jsfiddle.net/Dillybob/J5fUE/213/

 

 

Basically, I'm making an HP orb and when I change the height of the rectangle it needs to sink down not up, if that makes sense.

 

Edit: One sec, my jsfiddle is broke

 

Edit2: No idea, but this is the code:

 var HP_ORB_WIDTH = 155; var HP_ORB_HEIGHT = 135; var bmd = game.add.bitmapData((this.game.width, this.game.height)); bmd.context.rect(50, 50, HP_ORB_WIDTH, HP_ORB_HEIGHT); bmd.context.lineWidth = 2; bmd.context.fillStyle = "#e81957"; bmd.context.fillRect(50, 50, HP_ORB_WIDTH, HP_ORB_HEIGHT); //ctx.globalCompositeOperation = 'destination-atop'; bmd.context.stroke(); var HPORB = game.add.sprite(0, 0, bmd); game.add.tween(HPORB).to({ 	height: 1 }, 5000, Phaser.Easing.Cubic.Out, true);
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...