1 decade ago by hyliandanny
Hello!
I want to place entities onto the canvas without using Weltmeister. In the pong video, Weltmeister is used to place all entities -- such as the paddle for each player and the ball.
Do I need to emulate what Weltmeister is doing in order to achieve this? That is, do I need to...
- create a main.js file in lib/game/levels;
- copy/paste the main.js file's code, like below, and then modify it to fit my entities?
------- code -------
ig.module( 'game.levels.main' )
.requires('impact.image')
.defines(function(){
LevelMyLevel=/JSON[/{"entities":[{"type":"MyEntity","x":123,"y":123}, // etc. etc.
}
------- end code -------
Let me know if there's some other way to get my entities into my game. Thanks!
I want to place entities onto the canvas without using Weltmeister. In the pong video, Weltmeister is used to place all entities -- such as the paddle for each player and the ball.
Do I need to emulate what Weltmeister is doing in order to achieve this? That is, do I need to...
- create a main.js file in lib/game/levels;
- copy/paste the main.js file's code, like below, and then modify it to fit my entities?
------- code -------
ig.module( 'game.levels.main' )
.requires('impact.image')
.defines(function(){
LevelMyLevel=/JSON[/{"entities":[{"type":"MyEntity","x":123,"y":123}, // etc. etc.
}
------- end code -------
Let me know if there's some other way to get my entities into my game. Thanks!