Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Sync animations
« previous
next »
Print
Pages: [
1
]
Author
Topic: Sync animations (Read 3785 times)
FrameZet
Newbie
Posts: 2
Sync animations
«
on:
December 26, 2012, 11:28:07 am »
Hi,
Thank you for this awesome tool. Creating sprites is easy with it!
However, I've little syncing problem. When my "First animation" is playing and then I start "Second animation" it should get timing from the first one. I've very little programming experience, so could you please write code example (Unity script) how to do that.
Thank you for your help!
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Sync animations
«
Reply #1 on:
December 26, 2012, 11:55:14 am »
If you have 2 animated sprites,
anim1
and
anim2
Lets say anim1 is already playing, and you want to sync anim2 to it, do this:
anim2.Play(anim1.CurrentClip, anim1.ClipTimeSeconds);
That'll play anim2 in sync with anim1.
Logged
FrameZet
Newbie
Posts: 2
Re: Sync animations
«
Reply #2 on:
December 26, 2012, 05:35:22 pm »
That works! Thanks!
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Sync animations