mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
Makes singleton variable name of OptionsHelper lowercase
When we require a singleton, its instance name should be named by lowercase, since it is not a class. Relates to #128
This commit is contained in:
parent
05c4e4de81
commit
5b3bfd4370
6 changed files with 13 additions and 13 deletions
|
|
@ -7,7 +7,7 @@
|
|||
"Game/Config/Settings"
|
||||
],
|
||||
|
||||
function (GameController, nc, User, ProtocolHelper, OptionsHelper, Settings) {
|
||||
function (GameController, nc, User, ProtocolHelper, optionsHelper, Settings) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
this.levelListIndex = -1;
|
||||
this.gameController = null;
|
||||
|
||||
this.options = options = OptionsHelper.merge(options, {
|
||||
this.options = options = optionsHelper.merge(options, {
|
||||
levelUids: Settings.CHANNEL_DEFAULT_LEVELS
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ define([
|
|||
"Lib/Utilities/Assert"
|
||||
],
|
||||
|
||||
function (Parent, Box2D, OptionsHelper, Settings, Exception, nc, Assert) {
|
||||
function (Parent, Box2D, optionsHelper, Settings, Exception, nc, Assert) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ function (Parent, Box2D, OptionsHelper, Settings, Exception, nc, Assert) {
|
|||
y: parseFloat(options.y)
|
||||
};
|
||||
|
||||
this.options = OptionsHelper.merge(floatOptions, options);
|
||||
this.options = optionsHelper.merge(floatOptions, options);
|
||||
|
||||
if(!this.options.category) {
|
||||
// FIXME add more validation
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ define([
|
|||
"Game/Config/ItemSettings",
|
||||
],
|
||||
|
||||
function (Parent, Box2D, Settings, nc, Assert, OptionsHelper, ItemSettings) {
|
||||
function (Parent, Box2D, Settings, nc, Assert, optionsHelper, ItemSettings) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
|
@ -96,8 +96,8 @@ function (Parent, Box2D, Settings, nc, Assert, OptionsHelper, ItemSettings) {
|
|||
|
||||
|
||||
// FIXME
|
||||
var ragdollOptions = OptionsHelper.merge(ItemSettings.RagDoll, ItemSettings.Default);
|
||||
options = OptionsHelper.merge(options, ragdollOptions);
|
||||
var ragdollOptions = optionsHelper.merge(ItemSettings.RagDoll, ItemSettings.Default);
|
||||
options = optionsHelper.merge(options, ragdollOptions);
|
||||
Parent.call(this, physicsEngine, uid, options);
|
||||
//this.createSensor();
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ define([
|
|||
"Game/" + GLOBALS.context + "/GameObjects/Item",
|
||||
"Game/" + GLOBALS.context + "/GameObjects/Items/Skateboard",
|
||||
|
||||
], function (Parent, Settings, ItemSettings, Box2D, OptionsHelper, Exception, nc, Assert, AbstractLayer, CollisionDetector, Tile, Item, Skateboard) {
|
||||
], function (Parent, Settings, ItemSettings, Box2D, optionsHelper, Exception, nc, Assert, AbstractLayer, CollisionDetector, Tile, Item, Skateboard) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ define([
|
|||
throw new Exception("Item name (" + name + ") cannot be found in item list");
|
||||
}
|
||||
|
||||
return OptionsHelper.merge(ItemSettings[name], ItemSettings.Default);
|
||||
return optionsHelper.merge(ItemSettings[name], ItemSettings.Default);
|
||||
};
|
||||
|
||||
TiledLevel.prototype.getTileImagePath = function(gid) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ function (Exception) {
|
|||
|
||||
}
|
||||
|
||||
OptionsHelper.prototype.merge = function(options, preset) {
|
||||
optionsHelper.prototype.merge = function(options, preset) {
|
||||
|
||||
if(!preset && !options) {
|
||||
throw new Exception("OptionsHelper requires objects");
|
||||
|
|
@ -43,7 +43,7 @@ function (Exception) {
|
|||
if(options[key].constructor !== Object) {
|
||||
preset[key] = options[key];
|
||||
} else {
|
||||
preset[key] = OptionsHelper.prototype.merge.call(this, options[key], preset[key]);
|
||||
preset[key] = optionsHelper.prototype.merge.call(this, options[key], preset[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ define([
|
|||
"fs"
|
||||
],
|
||||
|
||||
function (nc, ProtocolHelper, validate, OptionsHelper, Settings, FileSystem) {
|
||||
function (nc, ProtocolHelper, validate, optionsHelper, Settings, FileSystem) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ function (nc, ProtocolHelper, validate, OptionsHelper, Settings, FileSystem) {
|
|||
scoreLimit: Settings.CHANNEL_DEFAULT_SCORE_LIMIT
|
||||
};
|
||||
|
||||
options = OptionsHelper.merge(options, defaultOptions);
|
||||
options = optionsHelper.merge(options, defaultOptions);
|
||||
|
||||
var result = this.coordinator.createChannel(options);
|
||||
if(result !== false) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue