mirror of
https://github.com/wassname/phaser.git
synced 2026-10-29 13:21:16 +08:00
0.9.4 release
This commit is contained in:
1 parent
b6f8a3fba6
commit
9f23c378a1
4 files changed
+35
-32
No files matched your search
@@ -96,14 +96,6 @@
|
||||
<TypeScriptCompile Include="sprites\dynamic texture 1.ts" />
|
||||
</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="scrollzones\simple scrollzone.ts" />
|
||||
<TypeScriptCompile Include="scrollzones\ballscroller.ts" />
|
||||
|
||||
+17
-12
@@ -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.
|
||||
**/
|
||||
function () {
|
||||
if(this._diameter < 1) {
|
||||
if(this._diameter <= 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -7619,7 +7619,7 @@ var Phaser;
|
||||
/**
|
||||
* Phaser
|
||||
*
|
||||
* v0.9.4 - April 24th 2013
|
||||
* v0.9.4 - April 28th 2013
|
||||
*
|
||||
* A small and feature-packed 2D canvas game framework born from the firey pits of Flixel and Kiwi.
|
||||
*
|
||||
@@ -8486,7 +8486,6 @@ var Phaser;
|
||||
this.onStart.dispatch(this._object);
|
||||
this._startTime = this._game.time.now + this._delayTime;
|
||||
for(var property in this._valuesEnd) {
|
||||
console.log(typeof property);
|
||||
// This prevents the interpolation of null values or of non-existing properties
|
||||
if(this._object[property] === null || !(property in this._object)) {
|
||||
throw Error('Phaser.Tween interpolation of null value of non-existing property');
|
||||
@@ -8665,8 +8664,8 @@ var Phaser;
|
||||
var World = (function () {
|
||||
function World(game, width, height) {
|
||||
this._game = game;
|
||||
this._cameras = new Phaser.CameraManager(this._game, 0, 0, width, height);
|
||||
this._game.camera = this._cameras.current;
|
||||
this.cameras = new Phaser.CameraManager(this._game, 0, 0, width, height);
|
||||
this._game.camera = this.cameras.current;
|
||||
this.group = new Phaser.Group(this._game, 0);
|
||||
this.bounds = new Phaser.Rectangle(0, 0, width, height);
|
||||
this.worldDivisions = 6;
|
||||
@@ -8675,15 +8674,15 @@ var Phaser;
|
||||
this.group.preUpdate();
|
||||
this.group.update();
|
||||
this.group.postUpdate();
|
||||
this._cameras.update();
|
||||
this.cameras.update();
|
||||
};
|
||||
World.prototype.render = function () {
|
||||
// Unlike in flixel our render process is camera driven, not group driven
|
||||
this._cameras.render();
|
||||
this.cameras.render();
|
||||
};
|
||||
World.prototype.destroy = function () {
|
||||
this.group.destroy();
|
||||
this._cameras.destroy();
|
||||
this.cameras.destroy();
|
||||
};
|
||||
World.prototype.setSize = // World methods
|
||||
function (width, height, updateCameraBounds) {
|
||||
@@ -8744,13 +8743,13 @@ var Phaser;
|
||||
});
|
||||
World.prototype.createCamera = // Cameras
|
||||
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) {
|
||||
return this._cameras.removeCamera(id);
|
||||
return this.cameras.removeCamera(id);
|
||||
};
|
||||
World.prototype.getAllCameras = function () {
|
||||
return this._cameras.getAll();
|
||||
return this.cameras.getAll();
|
||||
};
|
||||
World.prototype.createSprite = // Game Objects
|
||||
function (x, y, key) {
|
||||
@@ -11859,7 +11858,6 @@ var Phaser;
|
||||
this.onUpdateCallback = null;
|
||||
this.onRenderCallback = null;
|
||||
this.onPausedCallback = null;
|
||||
this.camera = null;
|
||||
this.cache = null;
|
||||
this.input = null;
|
||||
this.loader = null;
|
||||
@@ -11947,6 +11945,13 @@ var Phaser;
|
||||
if (typeof notifyCallback === "undefined") { notifyCallback = null; }
|
||||
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;
|
||||
})();
|
||||
Phaser.Game = Game;
|
||||
|
||||
@@ -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.
|
||||
**/
|
||||
function () {
|
||||
if(this._diameter < 1) {
|
||||
if(this._diameter <= 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -7619,7 +7619,7 @@ var Phaser;
|
||||
/**
|
||||
* Phaser
|
||||
*
|
||||
* v0.9.4 - April 24th 2013
|
||||
* v0.9.4 - April 28th 2013
|
||||
*
|
||||
* A small and feature-packed 2D canvas game framework born from the firey pits of Flixel and Kiwi.
|
||||
*
|
||||
@@ -8486,7 +8486,6 @@ var Phaser;
|
||||
this.onStart.dispatch(this._object);
|
||||
this._startTime = this._game.time.now + this._delayTime;
|
||||
for(var property in this._valuesEnd) {
|
||||
console.log(typeof property);
|
||||
// This prevents the interpolation of null values or of non-existing properties
|
||||
if(this._object[property] === null || !(property in this._object)) {
|
||||
throw Error('Phaser.Tween interpolation of null value of non-existing property');
|
||||
@@ -8665,8 +8664,8 @@ var Phaser;
|
||||
var World = (function () {
|
||||
function World(game, width, height) {
|
||||
this._game = game;
|
||||
this._cameras = new Phaser.CameraManager(this._game, 0, 0, width, height);
|
||||
this._game.camera = this._cameras.current;
|
||||
this.cameras = new Phaser.CameraManager(this._game, 0, 0, width, height);
|
||||
this._game.camera = this.cameras.current;
|
||||
this.group = new Phaser.Group(this._game, 0);
|
||||
this.bounds = new Phaser.Rectangle(0, 0, width, height);
|
||||
this.worldDivisions = 6;
|
||||
@@ -8675,15 +8674,15 @@ var Phaser;
|
||||
this.group.preUpdate();
|
||||
this.group.update();
|
||||
this.group.postUpdate();
|
||||
this._cameras.update();
|
||||
this.cameras.update();
|
||||
};
|
||||
World.prototype.render = function () {
|
||||
// Unlike in flixel our render process is camera driven, not group driven
|
||||
this._cameras.render();
|
||||
this.cameras.render();
|
||||
};
|
||||
World.prototype.destroy = function () {
|
||||
this.group.destroy();
|
||||
this._cameras.destroy();
|
||||
this.cameras.destroy();
|
||||
};
|
||||
World.prototype.setSize = // World methods
|
||||
function (width, height, updateCameraBounds) {
|
||||
@@ -8744,13 +8743,13 @@ var Phaser;
|
||||
});
|
||||
World.prototype.createCamera = // Cameras
|
||||
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) {
|
||||
return this._cameras.removeCamera(id);
|
||||
return this.cameras.removeCamera(id);
|
||||
};
|
||||
World.prototype.getAllCameras = function () {
|
||||
return this._cameras.getAll();
|
||||
return this.cameras.getAll();
|
||||
};
|
||||
World.prototype.createSprite = // Game Objects
|
||||
function (x, y, key) {
|
||||
@@ -11859,7 +11858,6 @@ var Phaser;
|
||||
this.onUpdateCallback = null;
|
||||
this.onRenderCallback = null;
|
||||
this.onPausedCallback = null;
|
||||
this.camera = null;
|
||||
this.cache = null;
|
||||
this.input = null;
|
||||
this.loader = null;
|
||||
@@ -11947,6 +11945,13 @@ var Phaser;
|
||||
if (typeof notifyCallback === "undefined") { notifyCallback = null; }
|
||||
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;
|
||||
})();
|
||||
Phaser.Game = Game;
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
var Phaser;(function(Phaser){var Basic=(function(){function Basic(game){this.name="";this._game=game;this.ID=-1;this.exists=true;this.active=true;this.visible=true;this.alive=true;this.isGroup=false;this.ignoreDrawDebug=false}Basic.prototype.destroy=function(){};Basic.prototype.preUpdate=function(){};Basic.prototype.update=function(){};Basic.prototype.postUpdate=function(){};Basic.prototype.render=function(camera,cameraOffsetX,cameraOffsetY){};Basic.prototype.kill=function(){this.alive=false;this.exists=false};Basic.prototype.revive=function(){this.alive=true;this.exists=true};Basic.prototype.toString=function(){return""};return Basic})();Phaser.Basic=Basic})(Phaser||(Phaser={}));var Phaser;(function(Phaser){var SignalBinding=(function(){function SignalBinding(signal,listener,isOnce,listenerContext,priority){if(typeof priority==="undefined"){priority=0}this.active=true;this.params=null;this._listener=listener;this._isOnce=isOnce;this.context=listenerContext;this._signal=signal;this.priority=priority||0}SignalBinding.prototype.execute=function(paramsArr){var handlerReturn;var params;if(this.active&&!!this._listener){params=this.params?this.params.concat(paramsArr):paramsArr;handlerReturn=this._listener.apply(this.context,params);if(this._isOnce){this.detach()}}return handlerReturn};SignalBinding.prototype.detach=function(){return this.isBound()?this._signal.remove(this._listener,this.context):null};SignalBinding.prototype.isBound=function(){return(!!this._signal&&!!this._listener)};SignalBinding.prototype.isOnce=function(){return this._isOnce};SignalBinding.prototype.getListener=function(){return this._listener};SignalBinding.prototype.getSignal=function(){return this._signal};SignalBinding.prototype._destroy=function(){delete this._signal;delete this._listener;delete this.context};SignalBinding.prototype.toString=function(){return"[SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"};return SignalBinding})();Phaser.SignalBinding=SignalBinding})(Phaser||(Phaser={}));var Phaser;(function(Phaser){var Signal=(function(){function Signal(){this._bindings=[];this._prevParams=null;this.memorize=false;this._shouldPropagate=true;this.active=true}Signal.VERSION="1.0.0";Signal.prototype.validateListener=function(listener,fnName){if(typeof listener!=="function"){throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",fnName))}};Signal.prototype._registerListener=function(listener,isOnce,listenerContext,priority){var prevIndex=this._indexOfListener(listener,listenerContext);var binding;if(prevIndex!==-1){binding=this._bindings[prevIndex];if(binding.isOnce()!==isOnce){throw new Error("You cannot add"+(isOnce?"":"Once")+"() then add"+(!isOnce?"":"Once")+"() the same listener without removing the relationship first.")}}else{binding=new Phaser.SignalBinding(this,listener,isOnce,listenerContext,priority);this._addBinding(binding)}if(this.memorize&&this._prevParams){binding.execute(this._prevParams)}return binding};Signal.prototype._addBinding=function(binding){var n=this._bindings.length;do{--n}while(this._bindings[n]&&binding.priority<=this._bindings[n].priority);this._bindings.splice(n+1,0,binding)};Signal.prototype._indexOfListener=function(listener,context){var n=this._bindings.length;var cur;while(n--){cur=this._bindings[n];if(cur.getListener()===listener&&cur.context===context){return n}}return -1};Signal.prototype.has=function(listener,context){if(typeof context==="undefined"){context=null}return this._indexOfListener(listener,context)!==-1};Signal.prototype.add=function(listener,listenerContext,priority){if(typeof listenerContext==="undefined"){listenerContext=null}if(typeof priority==="undefined"){priority=0}this.validateListener(listener,"add");return this._registerListener(listener,false,listenerContext,priority)};Signal.prototype.addOnce=function(listener,listenerContext,priority){if(typeof listenerContext==="undefined"){listenerContext=null}if(typeof priority==="undefined"){priority=0}this.validateListener(listener,"addOnce");return this._registerListener(listener,true,listenerContext,priority)};Signal.prototype.remove=function(listener,context){if(typeof context==="undefined"){context=null}this.validateListener(listener,"remove");var i=this._indexOfListener(listener,context);if(i!==-1){this._bindings[i]._destroy();this._bindings.splice(i,1)}return listener};Signal.prototype.removeAll=function(){var n=this._bindings.length;while(n--){this._bindings[n]._destroy()}this._bindings.length=0};Signal.prototype.getNumListeners=function(){return this._bindings.length};Signal.prototype.halt=function(){this._shouldPropagate=false};Signal.prototype.dispatch=function(){var paramsArr=[];for(var _i=0;_i<(arguments.length-0);_i++){paramsArr[_i]=arguments[_i+0]}if(!this.active){return}var n=this._bindings.length;var bindings;if(this.memorize){this._prevParams=paramsArr}if(!n){return}bindings=this._bindings.slice(0);this._shouldPropagate=true;do{n--Line truncated
|
||||
Reference in new issue
Block a user