phaser-rails 2.1.0.0 → 2.1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cfbb58840f3c14fb16988c44ef347ae8be7883a
4
- data.tar.gz: da43a0f22cae7a6989bc40e5140840b8d1eb2eac
3
+ metadata.gz: b98fb796d2dcc04c75fe5e466562fe711f07ce35
4
+ data.tar.gz: 8513510ce7ffd8cc1d68fff5235d320be57f3010
5
5
  SHA512:
6
- metadata.gz: 7e2325f89367246cdf1e0863bc4303b13cf050ebd035fe73c1a10dade7a6fe6abb6b09dfa40212875881f347978b1aacaac5f6edca58f1cc88804dabf3b69625
7
- data.tar.gz: 19b8cb7fb42e7ae7290f24b5ea9bf5658443a0a95a74b911dda88212d9fd08b513afac7b420acd54753faf36f35b96bceb048e61178ef61d78b8dbf075df5339
6
+ metadata.gz: 3f9ef3da5fe890e73ffe486d18f0e87f5b2cd1301847b7ce718b10ee50fb1e95e0f9f048a1ea0d60c3fc6a4eeea5ed6560c9d7e81e4d4e45858724e1826231c0
7
+ data.tar.gz: 7cd2fbf19913ff4c050d9ff49ca62f14c583809eea5656d9a717d281d462029d5cce3a575c4eedd35d5f1147720ed1981b0be548772fe0599f35a40f62df2904
@@ -1,5 +1,5 @@
1
1
  module Phaser
2
2
  module Rails
3
- VERSION = "2.1.0.0"
3
+ VERSION = "2.1.1.0"
4
4
  end
5
5
  end
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Phaser - http://phaser.io
9
9
  *
10
- * v2.1.0 "Cairhien" - Built: Tue Sep 09 2014 15:35:45
10
+ * v2.1.1 "Eianrod" - Built: Thu Sep 11 2014 10:37:16
11
11
  *
12
12
  * By Richard Davey http://www.photonstorm.com @photonstorm
13
13
  *
@@ -11382,7 +11382,7 @@ PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
11382
11382
  *
11383
11383
  * Phaser - http://phaser.io
11384
11384
  *
11385
- * v2.1.0 "Cairhien" - Built: Tue Sep 09 2014 15:35:44
11385
+ * v2.1.1 "Eianrod" - Built: Thu Sep 11 2014 10:37:16
11386
11386
  *
11387
11387
  * By Richard Davey http://www.photonstorm.com @photonstorm
11388
11388
  *
@@ -11425,7 +11425,7 @@ PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
11425
11425
  */
11426
11426
  var Phaser = Phaser || {
11427
11427
 
11428
- VERSION: '2.1.0',
11428
+ VERSION: '2.1.1',
11429
11429
  GAMES: [],
11430
11430
 
11431
11431
  AUTO: 0,
@@ -16240,6 +16240,8 @@ Phaser.StateManager.prototype = {
16240
16240
 
16241
16241
  this.setCurrentState(this._pendingState);
16242
16242
 
16243
+ this._pendingState = null;
16244
+
16243
16245
  if (this.onPreloadCallback)
16244
16246
  {
16245
16247
  this.game.load.reset();
@@ -16261,8 +16263,6 @@ Phaser.StateManager.prototype = {
16261
16263
  // No init? Then there was nothing to load either
16262
16264
  this.loadComplete();
16263
16265
  }
16264
-
16265
- this._pendingState = null;
16266
16266
  }
16267
16267
 
16268
16268
  },
@@ -20772,15 +20772,20 @@ Phaser.FlexGrid.prototype = {
20772
20772
  * @param {array} [children] - An array of children that are used to populate the FlexLayer.
20773
20773
  * @return {Phaser.FlexLayer} The Layer object.
20774
20774
  */
20775
- createFluidLayer: function (children) {
20775
+ createFluidLayer: function (children, addToWorld) {
20776
+
20777
+ if (typeof addToWorld === 'undefined') { addToWorld = true; }
20776
20778
 
20777
20779
  var layer = new Phaser.FlexLayer(this, this.positionFluid, this.boundsFluid, this.scaleFluid);
20778
20780
 
20779
- this.game.world.add(layer);
20781
+ if (addToWorld)
20782
+ {
20783
+ this.game.world.add(layer);
20784
+ }
20780
20785
 
20781
20786
  this.layers.push(layer);
20782
20787
 
20783
- if (typeof children !== 'undefined')
20788
+ if (typeof children !== 'undefined' && typeof children !== null)
20784
20789
  {
20785
20790
  layer.addMultiple(children);
20786
20791
  }
@@ -20844,15 +20849,19 @@ Phaser.FlexGrid.prototype = {
20844
20849
  */
20845
20850
  reset: function () {
20846
20851
 
20847
- for (var i = 0; i < this.layers.length; i++)
20852
+ var i = this.layers.length;
20853
+
20854
+ while (i--)
20848
20855
  {
20849
- // Remove references to this class
20850
- this.layers[i].position = null;
20851
- this.layers[i].scale = null;
20856
+ if (!this.layers[i].persist)
20857
+ {
20858
+ // Remove references to this class
20859
+ this.layers[i].position = null;
20860
+ this.layers[i].scale = null;
20861
+ this.layers.slice(i, 1);
20862
+ }
20852
20863
  }
20853
20864
 
20854
- this.layers.length = 0;
20855
-
20856
20865
  },
20857
20866
 
20858
20867
  /**
@@ -20951,12 +20960,19 @@ Phaser.FlexLayer = function (manager, position, bounds, scale) {
20951
20960
  /**
20952
20961
  * @property {Phaser.ScaleManager} scale - A reference to the ScaleManager.
20953
20962
  */
20954
- this.manager = manager;
20963
+ this.manager = manager.manager;
20955
20964
 
20956
20965
  /**
20957
20966
  * @property {Phaser.FlexGrid} grid - A reference to the FlexGrid that owns this layer.
20958
20967
  */
20959
- this.grid = manager.grid;
20968
+ this.grid = manager;
20969
+
20970
+ /**
20971
+ * Should the FlexLayer remain through a State swap?
20972
+ *
20973
+ * @type {boolean}
20974
+ */
20975
+ this.persist = false;
20960
20976
 
20961
20977
  // Bound to the grid
20962
20978
  this.position = position;