- Изменено
Corona, how to use mix function ?
The first question.
I understood that when use for example
Walk:apply(skeleton,time,false)
this will stop walk if time > walk duration time. (i make time increament 0.1/step, so if duration is 1.06 then it will stop after time = 1.1)
if use mix
Walk:mix(skeleton,time,false,0.5)
I know it effect is smooth animation at some frame before the end frame(not sure !). i make time increament 0.1/step, so if duration is 1.06 then it will stop after time = 1.7.
The problem is How to know when it stop to do other thing for example jump loop ?
The second question.
when i do this
local walkAnimation = skeletonData:findAnimation("walk")
local jumpAnimation = skeletonData:findAnimation("jump")
then add 2 bottons to do jump and walk animation step by step,and I can change character animation's type at any time.
The problem is in jumAnimation, it have character rotation, i mean that all character partes had rotation in some Frame.
If i do change frame to Walk in this case, character will walk but not in the vertically.! so Is there a way to fix that ?
1) You can know an animation is finish when the time >= animation.duration. Somewhat related, spine-lua does not have an AnimationState implementation, which is a helper class that does mixing (crossfading) of animations for you. I will try to add this today.
2) An animation applies its keys to change the skeleton pose. Values that are not keyed are not changed. You can either key the rotation in your walk animation so that value is not left as the jump animation changes it, or you can call setBonesToSetupPose when you change animations so that the values jump changed don't affect walk.
thanks.
1) hope it soon possible
2) I will check again with your advice
Not sure but . if you read in SkeletonJson.lua. some of "map" var should have local. is it right ??
Yep, thanks!
1: In json file,
{ "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }
all properties here is initiales value of Poses in Spine soft , is it right?
2: what about a properties in skin. what does it mean?
"dagger": { "x": 7.88, "y": -23.45, "rotation": 10.47, "width": 26, "height": 108 },
p/s:
And I was cant swap character skines by use
skeleton:setSkin("name1")
---
do update
skeleton:setSkin("name2")
because miss ipairs in for loop on setSkin function.
I have found the document. sorry.
But still not clear about Bones and Slot. in Spine I dont see Slot ?
http://esotericsoftware.com/spine-json-format
There are slots in the editor, not sure what you mean.
ok thanks. I was misunderstood. And hope you complete Corona library soon.