Created
April 30, 2015 06:44
-
-
Save jonathanhirz/dfc4349944317469d110 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override function config(config:luxe.AppConfig) { | |
config.preload.textures.push({ id:'assets/star.png' }); | |
config.preload.textures.push({ id:'assets/ship.png' }); | |
config.preload.textures.push({ id:'assets/beam.png' }); | |
return config; | |
} //config | |
override function ready() { | |
connect_input(); | |
bounds = new Rectangle(0,0,Luxe.screen.w, Luxe.screen.h); | |
star_sprite = Luxe.resources.texture('assets/star.png'); | |
ship_sprite = Luxe.resources.texture('assets/ship.png'); | |
create_starfield(); | |
ship = new Sprite({ | |
texture : ship_sprite, | |
name : 'ship', | |
pos : new Vector(Luxe.screen.w/2, Luxe.screen.h - ship_sprite.height/2), | |
depth : 1 | |
}); //ship | |
ship.add(new ShipControls({ name : 'ship_controls' })); | |
ship.add(new ShipWeapons({ name : 'ship_weapons' })); | |
} //ready |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment