1 decade ago by tarrent
Hi, I haven't bought Impact yet but I'm planning to have it soon.
I'd like to ask if I can use third party javascript libraries along with Impact?
I was also thinking if I can use my own custom codes inside Impact. I was particularly thinking on adding jquery $.ajax calls to a server. It would look like this:
Thanks
I'd like to ask if I can use third party javascript libraries along with Impact?
I was also thinking if I can use my own custom codes inside Impact. I was particularly thinking on adding jquery $.ajax calls to a server. It would look like this:
...({
gravity: 100,
font: new ig.Font('media/04b03.font.png'),
clearColor: '#lb2026',
init: function() {},
update: function() {
// check for something in server
$.ajax({
url: 'game/server.php',
data: {id:gameID, isAlive:true, isGameOver:false},
success: {}
});
// my own codes, variables that isn't defined in the Impact library
if(gameOver) {
alert('Game over, player '+PLAYER_NAME+'!');
}
// rest of game update here
}
}),...
Thanks
