2013-05-30 04:34:35 +00:00
|
|
|
/// <reference path="../../Phaser/Game.ts" />
|
|
|
|
/// <reference path="../../Phaser/gameobjects/ScrollZone.ts" />
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
|
|
|
var game = new Phaser.Game(this, 'game', 800, 600, init, create);
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
|
2013-06-05 01:58:16 +00:00
|
|
|
game.load.image('balls', 'assets/sprites/balls.png');
|
|
|
|
game.load.start();
|
2013-05-30 04:34:35 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var leftFace: Phaser.ScrollZone;
|
|
|
|
var rightFace: Phaser.ScrollZone;
|
|
|
|
var topFace: Phaser.ScrollZone;
|
|
|
|
|
|
|
|
function create() {
|
|
|
|
|
|
|
|
topFace = game.add.scrollZone('balls', 200, 0, 204, 204).setSpeed(0, 2.2);
|
2013-06-06 01:47:08 +00:00
|
|
|
topFace.transform.skew.setTo(0, Math.tan(game.math.radiansToDegrees(-30)));
|
|
|
|
topFace.transform.scale.setTo(1, 1.3);
|
2013-05-30 04:34:35 +00:00
|
|
|
|
|
|
|
leftFace = game.add.scrollZone('balls', 110, 264, 204, 204).setSpeed(0, 2.1);
|
2013-06-06 01:47:08 +00:00
|
|
|
leftFace.transform.skew.setTo(0, Math.tan(game.math.radiansToDegrees(30)));
|
2013-05-30 04:34:35 +00:00
|
|
|
|
|
|
|
rightFace = game.add.scrollZone('balls', 200, 466, 204, 204).setSpeed(0, 2);
|
2013-06-06 01:47:08 +00:00
|
|
|
rightFace.transform.skew.setTo(0, Math.tan(game.math.radiansToDegrees(-30)));
|
|
|
|
rightFace.transform.scale.setTo(1, 0.8);
|
2013-05-30 04:34:35 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})();
|