instance method Game#getScript
Game#getScript(relativeUrl[, callback = null]) → Script
-
relativeUrl
(String
) – A URL relative to theGame#root
of a JavaScript source file to load. -
callback
(Function
) – Optional. AFunction
to invoke when the script loading and executing process has completed, successfully or not. If an error occured (ex: file not found), anError
object will be passed as the first argument tocallback
.
A convienience function that returns a new
Script
, but forcing the
URL to be relative to Game#root
, instead of the default.