-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnimationSequence onAnimationComplete terminates the loop without reason. #37
Comments
Hello, your updateAnimation function is called by the update & attack method. It's probably not what you want... ? |
Actually, to call or not call the updateAnimation() inside attack() has no importance, I pulled out the call and the effect remains the same. She should infinite loop every time the animation ends, and it does not. |
(view the AnimationSequence). onAnimationComplete.addOnce (attackFinishedAnim); You've used addOnce, so attackFinishedAnim function will perform only one time! |
The function attack () is executed when "_isAttacking = false" as shown inside updade (). But anyway, I changed the line to The result is different in your test? |
I don't have material to test. Could you show us the updateAnimation function? Also I've heard that it may have a bug in Starling 1.3 concerning animation complete: http://forum.starling-framework.org/topic/animation-eventcomplete-fires-early not sure if it was baked into Starling 1.3 Also it seems more related to Starling itself than Citrus Engine. Could you try a simple test running only on Starling and then on the Citrus Engine ? (You may want to duplicate the AnimationSequence class). Thanks! |
Do you still have the issue? |
I no longer have the problem. Decided to go for another logic. |
Ok, I hope everything is going well. |
Hey, I think what you're looking for is the StarlingArt.setLoopAnimations(tabAnimations) function ;) Le 14 mars 2013 à 19:34, dkfast notifications@github.com a écrit :
|
Yes! that was it, thank you very much Aymeric. I actually figured that out soon after i messaged you, i tried removing my original post as to not bother you with it. But again, thank you for your time, i very much appreciate it! |
See an example of a hero:
package game.characters
{
import citrus.objects.platformer.nape.Hero;
import citrus.view.starlingview.AnimationSequence;
}
My Output in Console:
[SWF] Main.swf - 3,944,196 bytes after decompression
[Starling] Initialization complete.
[Starling] Display Driver: OpenGL
[SWF] Main.swf/[[DYNAMIC]]/1 - 243,392 bytes after decompression
[SWF] Monstro.swf - 21,891 bytes after decompression
attack() -> attackBoom() -> attackFinishedAnim()
attackBoom() completed.
attackFinishedAnim() completed.
attack() -> attackBoom() -> attackFinishedAnim()
attackBoom() completed.
attackFinishedAnim() completed.
attack() -> attackBoom() -> attackFinishedAnim()
[Unload SWF] Main.swf
In 10 minutes running should run millions of times, but performs only 2 or 3 times and stops.
Please excuse me if it is any error in my code.
The text was updated successfully, but these errors were encountered: