mirror of
https://github.com/wassname/phaser.git
synced 2026-06-27 16:10:15 +08:00
Remove references to GameMath, it's just Math now
Throw exceptions if wrong format given to tilemap or textureatlas. Previously, old onload remained active and error happened in the wrong (and hard to diagnose) place.
This commit is contained in:
+1
-1
@@ -138,7 +138,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
||||
this.load = null;
|
||||
|
||||
/**
|
||||
* @property {Phaser.GameMath} math - Reference to the math helper.
|
||||
* @property {Phaser.Math} math - Reference to the math helper.
|
||||
* @default
|
||||
*/
|
||||
this.math = null;
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ Phaser.State = function () {
|
||||
this.load = null;
|
||||
|
||||
/**
|
||||
* @property {Phaser.GameMath} math - Reference to the math helper.
|
||||
* @property {Phaser.Math} math - Reference to the math helper.
|
||||
* @default
|
||||
*/
|
||||
this.math = null;
|
||||
|
||||
@@ -744,6 +744,10 @@ Phaser.Loader.prototype = {
|
||||
return _this.csvLoadComplete(file.key);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Error("Phaser.Loader. Invalid Tilemap format: " + file.format);
|
||||
}
|
||||
|
||||
this._xhr.onerror = function () {
|
||||
return _this.dataLoadError(file.key);
|
||||
@@ -873,6 +877,10 @@ Phaser.Loader.prototype = {
|
||||
return _this.xmlLoadComplete(file.key);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Error("Phaser.Loader. Invalid Texture Atlas format: " + file.format);
|
||||
}
|
||||
|
||||
this._xhr.onerror = function () {
|
||||
return _this.dataLoadError(file.key);
|
||||
@@ -1105,4 +1113,4 @@ Phaser.Loader.prototype = {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
+1
-1
@@ -350,7 +350,7 @@ Phaser.Math = {
|
||||
|
||||
if (typeof radians === "undefined") { radians = true; }
|
||||
|
||||
var rd = (radians) ? GameMath.PI : 180;
|
||||
var rd = (radians) ? Math.PI : 180;
|
||||
return this.wrap(angle, rd, -rd);
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user