AppCore Requiring at Runtime
This is the 2017 version of IGE and is based on the "appCore" branch in git and is a relatively large re-write of many areas of the engine to allow for automatic dependency injection in your code, much simpler navigation of your game scenes etc.
It is modelled after AngularJS in the way dependency injection works and modelled after ui-router for how routing works, although it doesn't include either of those libraries.
by rob » Tue Sep 12, 2017 1:27 pm
If you need to require something at runtime, instead of using appCore.module(...) you can use:
- Code: Select all
appCore.run(function ($ige, $game, $time, etc etc etc) {
// In here I now have access to the required modules ($ige, $game, $time, etc etc etc).
});
-

rob
- Site Admin
-
- Posts: 316
- Joined: Tue Oct 22, 2013 5:08 pm
Return to Version 2.x