From 509cb7b2cdd12c484118cb7b239b29eb0e6ca35a Mon Sep 17 00:00:00 2001 From: Kevin Dungs Date: Tue, 9 Dec 2014 11:42:38 +0100 Subject: [PATCH] Reduce visibility threshold. Also clang format. --- js/gameobjects.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js/gameobjects.js b/js/gameobjects.js index 8df5af2..7f3768b 100644 --- a/js/gameobjects.js +++ b/js/gameobjects.js @@ -1,6 +1,6 @@ var GameObjects = (function() { 'use strict'; - var GLOBAL_VISIBILITY_THRESHOLD = 0.7; + var GLOBAL_VISIBILITY_THRESHOLD = 0.5; /** @class GameObject * Base class for all objects in the game. This works together with the @@ -163,11 +163,11 @@ var GameObjects = (function() { this.state.cost = Math.round(cost * this.cost_increase); return cost; } - return -1; // not enough money + return -1; // not enough money }; Worker.prototype.getTotal = - function() { return this.state.hired * this.state.rate; } + function() { return this.state.hired * this.state.rate; }; /** @class Upgrade */ @@ -223,7 +223,7 @@ var GameObjects = (function() { allObjects[t.key].state[t.property] *= this.factor || 1; allObjects[t.key].state[t.property] += this.constant || 0; } - this.state.used = true; // How about actually REMOVING used upgrades? + this.state.used = true; // How about actually REMOVING used upgrades? this.state.visible = false; return this.cost; } @@ -265,10 +265,10 @@ var GameObjects = (function() { // Expose classes in module. return { - Lab : Lab, - Research : Research, - Worker : Worker, - Upgrade : Upgrade, - Achievement : Achievement + Lab: Lab, + Research: Research, + Worker: Worker, + Upgrade: Upgrade, + Achievement: Achievement }; }());