Hi,
I’m currently trying to make a trampoline class in a separate module for use in a game. I have made the center of the trampoline (the actual part that is used for jumping) into an animation that plays whenever my character falls on the trampoline. The problem I’m having is that when I place the animation in my code it works fine in the simulator but it doesn’t work on my device. The animation is off of a sprite sheet.
What’s weird is that I made a plunger class which adds an animation the same way and it works fine. I was wondering if it could be a path error or if somehow a consistent error in the build could be affecting it. I’m pretty new at Corona so I don’t have a great idea as to what could be the issue.
Another interesting effect of this is that if I add the animation it will completely disable any touch response from the screen and also disable other animations on screen. Again, this is only on the device. Everything works in the simulator.
Here is the code that I add.
local sheet = graphics.newImageSheet( “images/general/LevelAssets/trampoline/centerSheet.png”, { width=973, height= 95, numFrames=75 } )
local trampoline = display.newSprite( sheet, {name = “centerBounce”, start = 1, count = 25, time = 200, loopCount = 1})
trampoline.x = 150
trampoline.y = h/2 - 100
trampoline.xScale = 1/6
trampoline.yScale = 1/6
What is more interesting is if I change the sprite sheet to another sprite sheet that I use for this project everything works on the device. I have deleted and re-made the sprite sheet twice to no avail.
If anyone could help on this I would be extremely grateful.
Rob
