Preparing for new release

This commit is contained in:
Richard Davey
2013-04-18 14:16:18 +01:00
parent 72a4809dd8
commit 6bb4c5e3fc
165 changed files with 37278 additions and 29038 deletions
+19
View File
@@ -0,0 +1,19 @@
/// <reference path="../../Phaser/Phaser.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var circle;
var floor;
function create() {
circle = myGame.createGeomSprite(200, 0);
circle.createCircle(64);
circle.acceleration.y = 100;
circle.elasticity = 0.8;
// A simple floor
floor = myGame.createGeomSprite(0, 550);
floor.createRectangle(800, 50);
floor.immovable = true;
}
function update() {
myGame.collide(circle, floor);
}
})();
+30
View File
@@ -0,0 +1,30 @@
/// <reference path="../../Phaser/Phaser.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var circle: Phaser.GeomSprite;
var floor: Phaser.GeomSprite;
function create() {
circle = myGame.createGeomSprite(200, 0);
circle.createCircle(64);
circle.acceleration.y = 100;
circle.elasticity = 0.8;
// A simple floor
floor = myGame.createGeomSprite(0, 550);
floor.createRectangle(800, 50);
floor.immovable = true;
}
function update() {
myGame.collide(circle, floor);
}
})();
+27
View File
@@ -0,0 +1,27 @@
/// <reference path="../../Phaser/Phaser.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var line;
function create() {
line = myGame.createGeomSprite(200, 200);
line.createLine(400, 400);
}
function update() {
//box.velocity.x = 0;
//box.velocity.y = 0;
//box.angularVelocity = 0;
//box.angularAcceleration = 0;
//if (myGame.input.keyboard.isDown(Phaser.Keyboard.LEFT))
//{
// box.angularVelocity = -200;
//}
//else if (myGame.input.keyboard.isDown(Phaser.Keyboard.RIGHT))
//{
// box.angularVelocity = 200;
//}
//if (myGame.input.keyboard.isDown(Phaser.Keyboard.UP))
//{
// box.velocity.copyFrom(myGame.motion.velocityFromAngle(box.angle, 200));
//}
}
})();
+40
View File
@@ -0,0 +1,40 @@
/// <reference path="../../Phaser/Phaser.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var line: Phaser.GeomSprite;
function create() {
line = myGame.createGeomSprite(200, 200);
line.createLine(400, 400);
}
function update() {
//box.velocity.x = 0;
//box.velocity.y = 0;
//box.angularVelocity = 0;
//box.angularAcceleration = 0;
//if (myGame.input.keyboard.isDown(Phaser.Keyboard.LEFT))
//{
// box.angularVelocity = -200;
//}
//else if (myGame.input.keyboard.isDown(Phaser.Keyboard.RIGHT))
//{
// box.angularVelocity = 200;
//}
//if (myGame.input.keyboard.isDown(Phaser.Keyboard.UP))
//{
// box.velocity.copyFrom(myGame.motion.velocityFromAngle(box.angle, 200));
//}
}
})();
+21
View File
@@ -0,0 +1,21 @@
/// <reference path="../../Phaser/Phaser.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var floor;
function create() {
for(var i = 0; i < 100; i++) {
var p = myGame.createGeomSprite(myGame.stage.randomX, Math.random() * 100);
p.createPoint();
p.fillColor = 'rgb(255,255,255)';
p.acceleration.y = 100 + Math.random() * 100;
p.elasticity = 0.8;
}
// A simple floor
floor = myGame.createGeomSprite(0, 550);
floor.createRectangle(800, 50);
floor.immovable = true;
}
function update() {
myGame.collide(myGame.world.group, floor);
}
})();
+33
View File
@@ -0,0 +1,33 @@
/// <reference path="../../Phaser/Phaser.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var floor: Phaser.GeomSprite;
function create() {
for (var i = 0; i < 100; i++)
{
var p:Phaser.GeomSprite = myGame.createGeomSprite(myGame.stage.randomX, Math.random() * 100);
p.createPoint();
p.fillColor = 'rgb(255,255,255)';
p.acceleration.y = 100 + Math.random() * 100;
p.elasticity = 0.8;
}
// A simple floor
floor = myGame.createGeomSprite(0, 550);
floor.createRectangle(800, 50);
floor.immovable = true;
}
function update() {
myGame.collide(myGame.world.group, floor);
}
})();
+18
View File
@@ -0,0 +1,18 @@
/// <reference path="../../Phaser/Phaser.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var box1;
var box2;
function create() {
box2 = myGame.createGeomSprite(300, 300).createRectangle(128, 128);
box1 = myGame.createGeomSprite(320, 100).createRectangle(64, 64);
box1.velocity.y = 50;
}
function update() {
if(box1.collide(box2) == true) {
box1.fillColor = 'rgb(255,0,0)';
} else {
box1.fillColor = 'rgb(0,255,0)';
}
}
})();
+32
View File
@@ -0,0 +1,32 @@
/// <reference path="../../Phaser/Phaser.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var box1: Phaser.GeomSprite;
var box2: Phaser.GeomSprite;
function create() {
box2 = myGame.createGeomSprite(300, 300).createRectangle(128, 128);
box1 = myGame.createGeomSprite(320, 100).createRectangle(64, 64);
box1.velocity.y = 50;
}
function update() {
if (box1.collide(box2) == true)
{
box1.fillColor = 'rgb(255,0,0)';
}
else
{
box1.fillColor = 'rgb(0,255,0)';
}
}
})();
+23
View File
@@ -0,0 +1,23 @@
/// <reference path="../../Phaser/Game.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var box;
function create() {
box = myGame.createGeomSprite(200, 200);
box.createRectangle(64, 64);
}
function update() {
box.velocity.x = 0;
box.velocity.y = 0;
box.angularVelocity = 0;
box.angularAcceleration = 0;
if(myGame.input.keyboard.isDown(Phaser.Keyboard.LEFT)) {
box.angularVelocity = -200;
} else if(myGame.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) {
box.angularVelocity = 200;
}
if(myGame.input.keyboard.isDown(Phaser.Keyboard.UP)) {
box.velocity.copyFrom(myGame.motion.velocityFromAngle(box.angle, 200));
}
}
})();
+40
View File
@@ -0,0 +1,40 @@
/// <reference path="../../Phaser/Game.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create, update);
var box: Phaser.GeomSprite;
function create() {
box = myGame.createGeomSprite(200, 200);
box.createRectangle(64, 64);
}
function update() {
box.velocity.x = 0;
box.velocity.y = 0;
box.angularVelocity = 0;
box.angularAcceleration = 0;
if (myGame.input.keyboard.isDown(Phaser.Keyboard.LEFT))
{
box.angularVelocity = -200;
}
else if (myGame.input.keyboard.isDown(Phaser.Keyboard.RIGHT))
{
box.angularVelocity = 200;
}
if (myGame.input.keyboard.isDown(Phaser.Keyboard.UP))
{
box.velocity.copyFrom(myGame.motion.velocityFromAngle(box.angle, 200));
}
}
})();