Skip to content
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

Corona runtime doesn't declare self.boneIndex in any of the timelines. #8

Closed
terrysimons opened this issue Mar 2, 2013 · 4 comments

Comments

@terrysimons
Copy link

I noticed that the Corona runtime doesn't declare self.boneIndex in any of the timelines.

Apparently Lua is forgiving of this? It seems like setting that property on the class is perfectly fine with it not defined?

I think the code would be a little bit easier for someone to follow if this were defined in the classes, even if it's not strictly necessary... thoughts?

Brighid:spine-corona terry$ grep -r boneIndex *
spine/Animation.lua: local bone = skeleton.bones[self.boneIndex]
spine/Animation.lua: local bone = skeleton.bones[self.boneIndex]
spine/Animation.lua: local bone = skeleton.bones[self.boneIndex]
spine/SkeletonJson.lua: local boneIndex = skeletonData:findBoneIndex(boneName)
spine/SkeletonJson.lua: if boneIndex == -1 then error("Bone not found: " .. boneName) end
spine/SkeletonJson.lua: timeline.boneIndex = boneIndex
spine/SkeletonJson.lua: timeline.boneIndex = boneIndex

@terrysimons
Copy link
Author

Also true of the slotIndex variable in the ColorTimeline class.

@terrysimons
Copy link
Author

Also true of the slotIndex variable in the AttachmentTimeline class.

@terrysimons
Copy link
Author

Oops - slotName is used int he AttachemntTimeline class in Corona, but it still isn't defined.

C++ uses slotIndex.

@NathanSweet
Copy link
Member

Seems reasonable. Done, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants