runeater Posted May 2, 2016 Share Posted May 2, 2016 I am working on a small game and ran into a little snag. I create a menu of sprites and add callbacks to their onclick. When the start button is pressed I attempt to set a flag for my animation loop to change its behavior. Right now im still testing so my start function is supposed to spawn the entities (50 balls) and then move them throughout the screen, however they are failing to update their positions. I've linked the relavent code below as its ~100 lines. http://pastebin.com/vB4xgBTN Just to make things simple, startPress is the start of the game while start() is called when the website is loaded. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 2, 2016 Share Posted May 2, 2016 //wrong var ballEnt = new PIXI.Sprite.fromImage("assets/mettalic_ball.png"); //correct var ballEnt = PIXI.Sprite.fromImage("assets/mettalic_ball.png"); Quote Link to comment Share on other sites More sharing options...
runeater Posted May 2, 2016 Author Share Posted May 2, 2016 Although I appreciate the information it doesn't seem to fix anything, chrome allows me to do it either way. Like I said I already can get the entities to the screen I just cant get them to actually move. Quote Link to comment Share on other sites More sharing options...
bubamara Posted May 2, 2016 Share Posted May 2, 2016 }else if(animationStage == animationStage.play){ you have typo in here : animationStages ye, it happens Quote Link to comment Share on other sites More sharing options...
runeater Posted May 2, 2016 Author Share Posted May 2, 2016 Thanks haha! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.