react-simple-game-engine 0.2.14 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"entity-sult.d.ts","sourceRoot":"","sources":["../../../src/classes/entities/entity-sult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,8BAAsB,UAAU,CAAC,CAAC,GAAG,GAAG,CAAE,YAAW,UAAU,CAAC,CAAC,CAAC;IACzD,MAAM,EAAE,MAAM,CAAC;IACtB,SAAgB,EAAE,EAAE,MAAM,CAA8C;IAExE,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,KAAK,CAAW;IACxB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,gBAAgB,CAAkB;IAC1C,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,OAAO,CAAC,CAAa;IAE7B,QAAQ,CAAC,MAAM,IAAI,IAAI;IACvB,QAAQ,CAAC,IAAI,IAAI,IAAI;IAErB,IAAI,QAAQ,sBAEX;IAED,IAAI,UAAU,IAQc,MAAM,CANjC;IAED,IAAI,IAAI,IAWQ,MAAM,CATrB;IAED,IAAI,UAAU,CAAC,WAAW,EAAE,MAAM,EAKjC;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAUrB;IAED,IAAI,MAAM,oBAET;IAED,IAAI,KAAK,eAER;IAED,IAAI,eAAe,oBAElB;IAED,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;IAWxD,WAAW,CAAC,MAAM,E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IAED,IAAI,eAAe,oBAElB;IAED,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;IAYxD,WAAW,CAAC,MAAM,EAAE,UAAU;IAK9B,OAAO,CAAC,MAAM,EAAE,UAAU;IAO1B,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;IAI/B,UAAU,CAAC,eAAe,EAAE,eAAe;IAM3C,MAAM,CAAC,eAAe,EAAE,eAAe;IAUvC,QAAQ;IACR,OAAO,CAAC,MAAM,EAAE,CAAC;CAClB"}
@@ -71,6 +71,7 @@ var EntitySult = /** @class */ (function () {
71
71
  ? target
72
72
  : target.output({ worldManagement: this.worldManagement });
73
73
  entity._parent = this;
74
+ entity._layerIndex = this._layerIndex;
74
75
  this.children.push(entity);
75
76
  this.worldManagement.addEntity(entity);
76
77
  };
@@ -83,7 +83,7 @@ var Particle = /** @class */ (function (_super) {
83
83
  Renderer.push();
84
84
  Renderer.noStroke();
85
85
  var deltaOfScale = Renderer.scaler.deltaOfScale;
86
- Renderer.translate(this.x - this.camera.x + deltaOfScale.x, this.y - this.camera.y + deltaOfScale.y);
86
+ Renderer.translate(Renderer.gameWidth / 2 + this.x - this.camera.x + deltaOfScale.x, Renderer.gameHeight / 2 + this.y - this.camera.y + deltaOfScale.y);
87
87
  Renderer.rotate(this.angle);
88
88
  var color = __spreadArray([], this.color, true);
89
89
  var alpha = Renderer.map(this.lifetimeRemain, 0, this.lifetime, 0, 255);
@@ -73,8 +73,8 @@ var Scaler = /** @class */ (function () {
73
73
  });
74
74
  Scaler.prototype.updateDeltaOfScale = function () {
75
75
  var _scaleSize = this.scaledSize;
76
- var deltaW = Math.abs(this._canvasSize.width - _scaleSize.width);
77
- var deltaH = Math.abs(this._canvasSize.height - _scaleSize.height);
76
+ var deltaW = this._canvasSize.width - _scaleSize.width;
77
+ var deltaH = this._canvasSize.height - _scaleSize.height;
78
78
  this._deltaOfScale = {
79
79
  x: deltaW / this._value / 2,
80
80
  y: deltaH / this._value / 2,
@@ -82,8 +82,8 @@ var Scaler = /** @class */ (function () {
82
82
  };
83
83
  Scaler.prototype.updateDeltaOfScaleForUI = function () {
84
84
  var _scaleSize = this.scaledSize;
85
- var deltaW = Math.abs(this._canvasSize.width - _scaleSize.width);
86
- var deltaH = Math.abs(this._canvasSize.height - _scaleSize.height);
85
+ var deltaW = this._canvasSize.width - _scaleSize.width;
86
+ var deltaH = this._canvasSize.height - _scaleSize.height;
87
87
  this._deltaOfScaleForUI = {
88
88
  x: deltaW / 2,
89
89
  y: deltaH / 2,
@@ -45,7 +45,7 @@ var Sprite = /** @class */ (function () {
45
45
  Renderer.push();
46
46
  Renderer.noStroke();
47
47
  var deltaOfScale = Renderer.scaler.deltaOfScale;
48
- Renderer.translate(position.x - camera.x + deltaOfScale.x, position.y - camera.y + deltaOfScale.y);
48
+ Renderer.translate(Renderer.gameWidth / 2 + position.x - camera.x + deltaOfScale.x, Renderer.gameHeight / 2 + position.y - camera.y + deltaOfScale.y);
49
49
  Renderer.rotate(body.angle);
50
50
  this.onDraw();
51
51
  Renderer.pop();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-simple-game-engine",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib",