4 Commits
5 changed files with 67 additions and 70 deletions
+34 -34
View File
@@ -14,40 +14,40 @@ module.exports = function (grunt) {
} }
} }
}, },
copy: { copy: {
main: { main: {
files: [{ files: [{
src: 'build/phaser.js', src: 'build/phaser.js',
dest: 'Tests/phaser.js' dest: 'Tests/phaser.js'
}] }]
}, },
amd: { amd: {
files: [{ files: [{
src: 'build/phaser.js', src: 'build/phaser.js',
dest: 'build/phaser.amd.js' dest: 'build/phaser.amd.js'
}], }],
options: { options: {
processContent: function(content) { processContent: function(content) {
var replacement = [ var replacement = [
'(function (root, factory) {', '(function (root, factory) {',
' if (typeof exports === \'object\') {', ' if (typeof exports === \'object\') {',
' module.exports = factory();', ' module.exports = factory();',
' } else if (typeof define === \'function\' && define.amd) {', ' } else if (typeof define === \'function\' && define.amd) {',
' define(factory);', ' define(factory);',
' } else {', ' } else {',
' root.Phaser = factory();', ' root.Phaser = factory();',
' }', ' }',
'}(this, function () {', '}(this, function () {',
content, content,
'return Phaser;', 'return Phaser;',
'}));' '}));'
]; ];
return replacement.join('\n'); return replacement.join('\n');
} }
} }
} }
}, },
watch: { watch: {
files: '**/*.ts', files: '**/*.ts',
tasks: ['typescript', 'copy'] tasks: ['typescript', 'copy']
} }
+8
View File
@@ -96,6 +96,14 @@
<TypeScriptCompile Include="sprites\dynamic texture 1.ts" /> <TypeScriptCompile Include="sprites\dynamic texture 1.ts" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="tweens\properties.js">
<DependentUpon>properties.ts</DependentUpon>
</Content>
<TypeScriptCompile Include="tweens\properties.ts" />
<TypeScriptCompile Include="misc\screen grab.ts" />
<Content Include="misc\screen grab.js">
<DependentUpon>screen grab.ts</DependentUpon>
</Content>
<TypeScriptCompile Include="sprites\align.ts" /> <TypeScriptCompile Include="sprites\align.ts" />
<TypeScriptCompile Include="scrollzones\simple scrollzone.ts" /> <TypeScriptCompile Include="scrollzones\simple scrollzone.ts" />
<TypeScriptCompile Include="scrollzones\ballscroller.ts" /> <TypeScriptCompile Include="scrollzones\ballscroller.ts" />
+12 -17
View File
@@ -3621,7 +3621,7 @@ var Phaser;
* @return {Boolean} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false. * @return {Boolean} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false.
**/ **/
function () { function () {
if(this._diameter <= 0) { if(this._diameter < 1) {
return true; return true;
} }
return false; return false;
@@ -7619,7 +7619,7 @@ var Phaser;
/** /**
* Phaser * Phaser
* *
* v0.9.4 - April 28th 2013 * v0.9.4 - April 24th 2013
* *
* A small and feature-packed 2D canvas game framework born from the firey pits of Flixel and Kiwi. * A small and feature-packed 2D canvas game framework born from the firey pits of Flixel and Kiwi.
* *
@@ -8486,6 +8486,7 @@ var Phaser;
this.onStart.dispatch(this._object); this.onStart.dispatch(this._object);
this._startTime = this._game.time.now + this._delayTime; this._startTime = this._game.time.now + this._delayTime;
for(var property in this._valuesEnd) { for(var property in this._valuesEnd) {
console.log(typeof property);
// This prevents the interpolation of null values or of non-existing properties // This prevents the interpolation of null values or of non-existing properties
if(this._object[property] === null || !(property in this._object)) { if(this._object[property] === null || !(property in this._object)) {
throw Error('Phaser.Tween interpolation of null value of non-existing property'); throw Error('Phaser.Tween interpolation of null value of non-existing property');
@@ -8664,8 +8665,8 @@ var Phaser;
var World = (function () { var World = (function () {
function World(game, width, height) { function World(game, width, height) {
this._game = game; this._game = game;
this.cameras = new Phaser.CameraManager(this._game, 0, 0, width, height); this._cameras = new Phaser.CameraManager(this._game, 0, 0, width, height);
this._game.camera = this.cameras.current; this._game.camera = this._cameras.current;
this.group = new Phaser.Group(this._game, 0); this.group = new Phaser.Group(this._game, 0);
this.bounds = new Phaser.Rectangle(0, 0, width, height); this.bounds = new Phaser.Rectangle(0, 0, width, height);
this.worldDivisions = 6; this.worldDivisions = 6;
@@ -8674,15 +8675,15 @@ var Phaser;
this.group.preUpdate(); this.group.preUpdate();
this.group.update(); this.group.update();
this.group.postUpdate(); this.group.postUpdate();
this.cameras.update(); this._cameras.update();
}; };
World.prototype.render = function () { World.prototype.render = function () {
// Unlike in flixel our render process is camera driven, not group driven // Unlike in flixel our render process is camera driven, not group driven
this.cameras.render(); this._cameras.render();
}; };
World.prototype.destroy = function () { World.prototype.destroy = function () {
this.group.destroy(); this.group.destroy();
this.cameras.destroy(); this._cameras.destroy();
}; };
World.prototype.setSize = // World methods World.prototype.setSize = // World methods
function (width, height, updateCameraBounds) { function (width, height, updateCameraBounds) {
@@ -8743,13 +8744,13 @@ var Phaser;
}); });
World.prototype.createCamera = // Cameras World.prototype.createCamera = // Cameras
function (x, y, width, height) { function (x, y, width, height) {
return this.cameras.addCamera(x, y, width, height); return this._cameras.addCamera(x, y, width, height);
}; };
World.prototype.removeCamera = function (id) { World.prototype.removeCamera = function (id) {
return this.cameras.removeCamera(id); return this._cameras.removeCamera(id);
}; };
World.prototype.getAllCameras = function () { World.prototype.getAllCameras = function () {
return this.cameras.getAll(); return this._cameras.getAll();
}; };
World.prototype.createSprite = // Game Objects World.prototype.createSprite = // Game Objects
function (x, y, key) { function (x, y, key) {
@@ -11858,6 +11859,7 @@ var Phaser;
this.onUpdateCallback = null; this.onUpdateCallback = null;
this.onRenderCallback = null; this.onRenderCallback = null;
this.onPausedCallback = null; this.onPausedCallback = null;
this.camera = null;
this.cache = null; this.cache = null;
this.input = null; this.input = null;
this.loader = null; this.loader = null;
@@ -11945,13 +11947,6 @@ var Phaser;
if (typeof notifyCallback === "undefined") { notifyCallback = null; } if (typeof notifyCallback === "undefined") { notifyCallback = null; }
return this.collision.overlap(objectOrGroup1, objectOrGroup2, notifyCallback, Phaser.Collision.separate); return this.collision.overlap(objectOrGroup1, objectOrGroup2, notifyCallback, Phaser.Collision.separate);
}; };
Object.defineProperty(Game.prototype, "camera", {
get: function () {
return this.world.cameras.current;
},
enumerable: true,
configurable: true
});
return Game; return Game;
})(); })();
Phaser.Game = Game; Phaser.Game = Game;
-1
View File
File diff suppressed because one or more lines are too long
+12 -17
View File
@@ -3621,7 +3621,7 @@ var Phaser;
* @return {Boolean} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false. * @return {Boolean} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false.
**/ **/
function () { function () {
if(this._diameter <= 0) { if(this._diameter < 1) {
return true; return true;
} }
return false; return false;
@@ -7619,7 +7619,7 @@ var Phaser;
/** /**
* Phaser * Phaser
* *
* v0.9.4 - April 28th 2013 * v0.9.4 - April 24th 2013
* *
* A small and feature-packed 2D canvas game framework born from the firey pits of Flixel and Kiwi. * A small and feature-packed 2D canvas game framework born from the firey pits of Flixel and Kiwi.
* *
@@ -8486,6 +8486,7 @@ var Phaser;
this.onStart.dispatch(this._object); this.onStart.dispatch(this._object);
this._startTime = this._game.time.now + this._delayTime; this._startTime = this._game.time.now + this._delayTime;
for(var property in this._valuesEnd) { for(var property in this._valuesEnd) {
console.log(typeof property);
// This prevents the interpolation of null values or of non-existing properties // This prevents the interpolation of null values or of non-existing properties
if(this._object[property] === null || !(property in this._object)) { if(this._object[property] === null || !(property in this._object)) {
throw Error('Phaser.Tween interpolation of null value of non-existing property'); throw Error('Phaser.Tween interpolation of null value of non-existing property');
@@ -8664,8 +8665,8 @@ var Phaser;
var World = (function () { var World = (function () {
function World(game, width, height) { function World(game, width, height) {
this._game = game; this._game = game;
this.cameras = new Phaser.CameraManager(this._game, 0, 0, width, height); this._cameras = new Phaser.CameraManager(this._game, 0, 0, width, height);
this._game.camera = this.cameras.current; this._game.camera = this._cameras.current;
this.group = new Phaser.Group(this._game, 0); this.group = new Phaser.Group(this._game, 0);
this.bounds = new Phaser.Rectangle(0, 0, width, height); this.bounds = new Phaser.Rectangle(0, 0, width, height);
this.worldDivisions = 6; this.worldDivisions = 6;
@@ -8674,15 +8675,15 @@ var Phaser;
this.group.preUpdate(); this.group.preUpdate();
this.group.update(); this.group.update();
this.group.postUpdate(); this.group.postUpdate();
this.cameras.update(); this._cameras.update();
}; };
World.prototype.render = function () { World.prototype.render = function () {
// Unlike in flixel our render process is camera driven, not group driven // Unlike in flixel our render process is camera driven, not group driven
this.cameras.render(); this._cameras.render();
}; };
World.prototype.destroy = function () { World.prototype.destroy = function () {
this.group.destroy(); this.group.destroy();
this.cameras.destroy(); this._cameras.destroy();
}; };
World.prototype.setSize = // World methods World.prototype.setSize = // World methods
function (width, height, updateCameraBounds) { function (width, height, updateCameraBounds) {
@@ -8743,13 +8744,13 @@ var Phaser;
}); });
World.prototype.createCamera = // Cameras World.prototype.createCamera = // Cameras
function (x, y, width, height) { function (x, y, width, height) {
return this.cameras.addCamera(x, y, width, height); return this._cameras.addCamera(x, y, width, height);
}; };
World.prototype.removeCamera = function (id) { World.prototype.removeCamera = function (id) {
return this.cameras.removeCamera(id); return this._cameras.removeCamera(id);
}; };
World.prototype.getAllCameras = function () { World.prototype.getAllCameras = function () {
return this.cameras.getAll(); return this._cameras.getAll();
}; };
World.prototype.createSprite = // Game Objects World.prototype.createSprite = // Game Objects
function (x, y, key) { function (x, y, key) {
@@ -11858,6 +11859,7 @@ var Phaser;
this.onUpdateCallback = null; this.onUpdateCallback = null;
this.onRenderCallback = null; this.onRenderCallback = null;
this.onPausedCallback = null; this.onPausedCallback = null;
this.camera = null;
this.cache = null; this.cache = null;
this.input = null; this.input = null;
this.loader = null; this.loader = null;
@@ -11945,13 +11947,6 @@ var Phaser;
if (typeof notifyCallback === "undefined") { notifyCallback = null; } if (typeof notifyCallback === "undefined") { notifyCallback = null; }
return this.collision.overlap(objectOrGroup1, objectOrGroup2, notifyCallback, Phaser.Collision.separate); return this.collision.overlap(objectOrGroup1, objectOrGroup2, notifyCallback, Phaser.Collision.separate);
}; };
Object.defineProperty(Game.prototype, "camera", {
get: function () {
return this.world.cameras.current;
},
enumerable: true,
configurable: true
});
return Game; return Game;
})(); })();
Phaser.Game = Game; Phaser.Game = Game;