Update: CustomCode - Bacon - Entity Loaded (osynga17uj.js) 319 bytes modified
parent
1b6c22e998
commit
65cb5c7eb7
|
@ -1106,6 +1106,15 @@ if (GameLib.Utils.UndefinedOrNull(this.subscriptions)) {
|
||||||
|
|
||||||
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(
|
this.subscriptions.push(
|
||||||
new GameLib.Event.Subscribe(
|
new GameLib.Event.Subscribe(
|
||||||
GameLib.Event.CUSTOM_GAME_START,
|
GameLib.Event.CUSTOM_GAME_START,
|
||||||
|
|
Loading…
Reference in New Issue