Jump to content

Setting the color and width of a Phaser Line


Recommended Posts

You can use graphics to visualize your line:

  var line = new Phaser.Line(0, 0, 100, 100);
  var graphics=game.add.graphics(0,0);
  //var graphics=game.add.graphics(line.start.x,line.start.y);//if you have a static line
  graphics.lineStyle(10, 0xffd900, 1);
  graphics.moveTo(line.start.x,line.start.y);//moving position of graphic if you draw mulitple lines


Link to comment
Share on other sites


  • Recently Browsing   0 members

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