Create a new build system (name is not important), replace the generated contents with the contents of tower-defense.sublime-build, replace PATH_TO_USER_FOLDER with the path to your user folder (e.g. C:\Users\username), save, go to tools->build system-> select your build system. ctrl+b
to build.
- Add it to the end of the script list in
index.html
- add it to the end of the
include
array inapp.build.js
Append it to the end of the animate()
function.
e.g. (loading sprites, etc):
Place before the animate function is called in the event listener in init.js
Global variables are located in var.js
Require.js is being used for the build system. Prerequisites: npm install requirejs
To keep things small, string interpretations
e.g. (someVariable === "someString")
which minifies like (a === "someString")
,
should defined as a global constant (const CONSTANT_NAME)
e.g. (someVariable === SOME_STRING)
which minifies like: (a === b)