mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
18 lines
376 B
JavaScript
18 lines
376 B
JavaScript
|
|
||
|
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { create: create });
|
||
|
|
||
|
function create() {
|
||
|
|
||
|
var graphics = game.add.graphics(50,50);
|
||
|
|
||
|
// set a fill and line style
|
||
|
graphics.beginFill(0xFF0000);
|
||
|
graphics.lineStyle(10, 0xFF0000, 1);
|
||
|
|
||
|
// draw a shape
|
||
|
graphics.moveTo(50,50);
|
||
|
graphics.lineTo(250, 50);
|
||
|
graphics.endFill();
|
||
|
|
||
|
}
|