Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by fugufish

so normally we load all the levels in the 'require' block of main.js:


ig.module( 
	'game.main' 
)
.requires(
        // game entitites

        // game levels
        game.levels.level1,
        game.levels.level2,
        game.levels.level3, 
)



is there any way to load a Level 4, without first defining it? I'm thinking an inject of some sort - nothing tangible yet unfortunately

1 decade ago by fugufish

just thought of a workaround:

we load the level anyway:


ig.module( 
    'game.main' 
)
.requires(
        // game entitites

        // game levels
        game.levels.level1,
        game.levels.level2,
        game.levels.level3,
        game.levels.level4, 
)



but we overwrite the level 4 JSON object, with our own custom-built one. then call loadLevel(Level4)
Page 1 of 1
« first « previous next › last »