mirror of
https://github.com/wassname/phaser.git
synced 2026-09-12 12:40:47 +08:00
Lots of renderTexture updates and examples added
This commit is contained in:
@@ -25,6 +25,9 @@ Phaser.Graphics = function (game, x, y) {
|
||||
*/
|
||||
this.type = Phaser.GRAPHICS;
|
||||
|
||||
this.position.x = x;
|
||||
this.position.y = y;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Graphics.prototype = Object.create(PIXI.Graphics.prototype);
|
||||
@@ -56,10 +59,14 @@ Phaser.Graphics.prototype.destroy = function() {
|
||||
Phaser.Graphics.prototype.drawPolygon = function (poly) {
|
||||
|
||||
graphics.moveTo(poly.points[0].x, poly.points[0].y);
|
||||
for (var i = 1; i < poly.points.length; i += 1) {
|
||||
|
||||
for (var i = 1; i < poly.points.length; i += 1)
|
||||
{
|
||||
graphics.lineTo(poly.points[i].x, poly.points[i].y);
|
||||
}
|
||||
|
||||
graphics.lineTo(poly.points[0].x, poly.points[0].y);
|
||||
|
||||
}
|
||||
|
||||
Object.defineProperty(Phaser.Graphics.prototype, 'angle', {
|
||||
|
||||
Reference in New Issue
Block a user