var screenWidth = 1024;
var screenHeight = 768;

var lzs = new Phaser.Game(screenWidth, screenHeight, Phaser.AUTO, 'lzs', { preload: preload, create: create, update: update, render: render });

function preload() {
	// Load sounds and sprites

	lzs.load.image('ray', 'assets/sprites/player.png');

}

// Game vars

var ray;

function create() {

	lzs.physics.startSystem(Phaser.Physics.ARCADE);

	ray = lzs.add.sprite(screenWidth * 0.5, screenHeight * 0.8, 'ray');
}

function update() {

}

function render() {

}
@@ -187,16 +187,76 @@
 er %7D);%0A%0A
+var cursors;%0Avar fireButton;%0Avar ray;%0Avar raySpeed = 1000;%0A%0A
 function
@@ -522,31 +522,773 @@
 ');%0A
-%7D%0A%0Afunction update() %7B%0A
+%0A%09lzs.physics.enable(ray, Phaser.Physics.ARCADE);%0A%0A%09//controls%0A%09cursors = lzs.input.keyboard.createCursorKeys();%0A%09fireButton = lzs.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR);%0A%7D%0A%0Afunction update() %7B%0A%0A%09if (ray.alive) %7B%0A%09%09ray.body.velocity.setTo(0, 0);%0A%0A%09%09if (cursors.left.isDown) %7B%0A%09%09%09if (ray.position.x %3E 0) %7B%0A%09%09%09%09ray.body.velocity.x = -raySpeed;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09else if (cursors.right.isDown) %7B%0A%09%09%09if (ray.position.x %3C (lzs.world.width - ray.width)) %7B%0A%09%09%09%09ray.body.velocity.x = raySpeed;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09else if (cursors.up.isDown) %7B%0A%09%09%09if (ray.position.y %3E (lzs.world.height / 2)) %7B%0A%09%09%09%09ray.body.velocity.y = -raySpeed;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09else if (cursors.down.isDown) %7B%0A%09%09%09if (ray.position.y %3C (lzs.world.height - ray.height)) %7B%0A%09%09%09%09ray.body.velocity.y = raySpeed;%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D
 %0A%7D%0A%0A

add controls to ray