2016-04-05 01:10:40 +02:00
|
|
|
OS.S.defaultStep = 1 / 120;
|
2016-04-15 01:09:57 +02:00
|
|
|
OS.S.numberOfScriptsToLoad = 14; // Excludes the titleScreen.js room, which is not loaded yet.
|
2016-04-05 07:37:01 +02:00
|
|
|
OS.S.pixelScale = 4;
|
2016-04-06 22:36:51 +02:00
|
|
|
OS.SetCamera({
|
2016-04-13 02:14:09 +02:00
|
|
|
width: pixel(64),
|
|
|
|
height: pixel(64),
|
|
|
|
hBorder: pixel(24),
|
|
|
|
vBorder: pixel(24)});
|
2016-04-05 01:10:40 +02:00
|
|
|
|
|
|
|
function start()
|
|
|
|
{
|
|
|
|
OS.AddScript("loadControls.js");
|
2016-04-06 16:00:58 +02:00
|
|
|
OS.AddScript("loadGameManager.js");
|
2016-04-05 01:10:40 +02:00
|
|
|
OS.AddScript("loadPrefabs.js");
|
2016-04-12 00:22:56 +02:00
|
|
|
OS.AddScript("loadGUIs.js");
|
2016-04-05 01:10:40 +02:00
|
|
|
OS.AddScript("loadRooms.js");
|
|
|
|
}
|
2016-04-06 01:33:38 +02:00
|
|
|
|
2016-04-13 02:14:09 +02:00
|
|
|
function pixel(number) {
|
|
|
|
return ((typeof number !== 'undefined') ? number : 1) * OS.S.pixelScale;
|
|
|
|
}
|
|
|
|
|
2016-04-06 01:33:38 +02:00
|
|
|
function randomSmidge() {
|
|
|
|
// Return a random amount between -10 and 10 on the pixel scale.
|
2016-04-13 02:14:09 +02:00
|
|
|
return (pixel(Math.round(Math.randomRange(-10, 10))));
|
2016-04-06 01:33:38 +02:00
|
|
|
}
|