From 65cb5c7eb789e18a0ca03dbbe972342c3c4b69ab Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sun, 14 Jan 2018 14:51:51 +0100 Subject: [PATCH] Update: CustomCode - Bacon - Entity Loaded (osynga17uj.js) 319 bytes modified --- osynga17uj.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osynga17uj.js b/osynga17uj.js index f38bc79..d0b2240 100644 --- a/osynga17uj.js +++ b/osynga17uj.js @@ -1106,6 +1106,15 @@ if (GameLib.Utils.UndefinedOrNull(this.subscriptions)) { this.subscriptions = []; + GameLib.Event.Subscribe( + GameLib.Event.WINDOW_RESIZE, + function (data) { + var aspect = data.width / data.height; + this.camera.offsetX = -((this.camera.maxX - this.camera.minX) / 2) + (GameLib.CustomCode.TETRIS_GRID_WIDTH / 2) - 0.5 - (0.5 * aspect); + this.camera.updateInstance('offsetX'); + }.bind(this) + ) + this.subscriptions.push( new GameLib.Event.Subscribe( GameLib.Event.CUSTOM_GAME_START,