Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Hi, I was wondering which one would be. I have set the game's viewport to 800x600 and the world bounds to 2048x1024. The player moves and the camera follows it. I want to dynamically load the tiles that are in the bounds of the viewport while the player moves around and kill the ones that are out. I was naively trying to kill() onOutOfBounds and then revive() onEnterBounds. Did not work but i don't know why. Apparently behind scenes is doing: !this.game.world.bounds.intersects(this._bounds)So i tried to replicate the functionality building an array of the killed tiles onOutOfBounds and,
  2. Thank you. Polygon does not have fill() method but as stated in the Graphics doc, drawPolygon() "Draws a {Phaser.Polygon} or a {PIXI.Polygon} filled". Graphics object does not seem to provide that neither. Anyway my intention is not even fill it or show it, i will use it only for debuging purposes, as i want to use its points to replicate the behaviour on the chained tweens example. I usually do this in Turbulenz by enabling the 2DDebug viewport. Apparently in Phaser i must use game.debug.geom() for that purpose but i see that only accepts basic shapes and lines as a parameter, am i right?
  3. Hi, I just started testing Phaser and i am trying to render a simple polygon on screen: var g = new Phaser.Graphics(game);var p = new Phaser.Polygon(10,10,70,70,70,10,10,10);g.drawPolygon( p );Using v2.0.6. Am i missing something?
  • Create New...