mirror of
https://github.com/photonstorm/phaser
synced 2024-12-12 14:22:54 +00:00
34ee2b0b20
Fixed docs issue in Tilemap. Created landscape pointer test, confirmed working fine (issue #276)
37 lines
640 B
JavaScript
37 lines
640 B
JavaScript
|
|
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update, render: render });
|
|
|
|
function preload() {
|
|
|
|
game.load.image('pic', '../assets/pics/questar.png');
|
|
|
|
}
|
|
|
|
var image;
|
|
var bmd;
|
|
|
|
function create() {
|
|
|
|
game.add.image(0, 0, 'pic');
|
|
|
|
console.log('pic?');
|
|
|
|
// bmd = game.add.bitmapData(800, 600);
|
|
// bmd.context.fillStyle = 'rgba(255,0,0,0.2)';
|
|
// bmd.context.fillRect(0, 0, 300, 100);
|
|
|
|
// image = game.add.image(0, 0, bmd);
|
|
|
|
}
|
|
|
|
function update() {
|
|
|
|
// bmd.context.fillRect(game.input.x, game.input.y, 8, 8);
|
|
|
|
}
|
|
|
|
function render() {
|
|
|
|
// game.debug.renderText(game.input.x, 32, 32);
|
|
|
|
}
|