yuidoc scripts added. Tidied up the Docs folder. Added back in the Emitter and fixed the Tests that weren't compiling.

This commit is contained in:
Richard Davey
2013-08-09 05:08:54 +01:00
parent 9bf7d070f5
commit 2d49a31ecd
182 changed files with 8444 additions and 991 deletions
+9 -3
View File
@@ -2,28 +2,34 @@
/// <reference path="../../Phaser/ui/Button.ts" />
(function () {
var game = new Phaser.Game(this, 'game', 800, 600, preload, create);
function preload() {
game.load.image('beast', 'assets/pics/shadow_of_the_beast2_other_world.png');
game.load.atlas('button', 'assets/buttons/button_texture_atlas.png', 'assets/buttons/button_texture_atlas.json');
}
image:
Phaser.Sprite
Phaser.Sprite;
button:
Phaser.UI.Button
Phaser.UI.Button;
function create() {
// This is just an image that we'll toggle the display of when you click the button
this.image = game.add.sprite(game.stage.centerX, 0, 'beast');
this.image.transform.origin.setTo(0.5, 0);
// This button is created from a texture atlas.
// Instead of frame IDs (like with a sprite sheet) we can tell it to use frame names instead.
// In this case our atlast frame names were called 'over', 'out' and 'down', but they could be anything you want.
// The function "clickedIt" will be called when the button is clicked or touched
this.button = game.add.button(game.stage.centerX, 400, 'button', clickedIt, this, 'over', 'out', 'down');
// Just makes the button origin set to the middle, we only do this to center the button on-screen, no other reason
this.button.transform.origin.setTo(0.5, 0.5);
}
function clickedIt() {
if(this.image.visible == true) {
if (this.image.visible == true) {
this.image.visible = false;
} else {
this.image.visible = true;