jorge nunez

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. many thanks, i was struggling with the documentation, when i started noticing that all the documentation was for phaser 2 it was too late, i normally prefer to go with lts (long term support) than being an early adopter, i though to myself "forget about looking for a book for that version"
  2. i'm trying to draw pacman shapes, or slices of pie, they are basically the same what i want is something like this: i know it's an example i can copy and paste from the webpage but it only works on phaser 2, i'm using phaser 3 rather than getting a pie shape i get this: as you can see, it fills the arc with a straight line, but what i want is to complete the shape taking the center of the circle into account, here is the code: style = { font: "bold 14px Arial", fill: "#FFF", boundsAlignH: "center", boundsAlignV: "middle", wordWrap: true, wordWrapWidth: 80 }; graphics1 = game.add.graphics(game.width/2, game.height/2); graphics1.beginFill(0x0000FF); graphics1.arc(0, 0, 200, game.math.degToRad(360-90-45/2), game.math.degToRad(360-90+45/2), false); graphics1.endFill(); text1 = game.add.text(game.width/2-40, game.height/4-40, "phaser 2.4 text bounds", style); text1.align = 'center'; //text1.setTextBounds(game.width/3, 0, game.width/3, game.height/2); sprite1 = game.add.sprite(game.width/2,game.height/2); sprite1.addChild(graphics1); sprite1.addChild(text1); sprite1.pivot.x = game.width/2; sprite1.pivot.y = game.height/2; sprite1.angle += 0*45;