hi all,
Im using spine runtimes of 27,April,2013 and cocos2dx 2.0.4.
my first problem is opacity, I found out that when I try to fade out a skeleton, it fails(still visible at opacity 0).
so i corrected that in "CCSkeleton" and "spine-cocos2dx" file
void CCSkeleton::draw (){
ccColor3B color = getColor();
skeleton->r = color.r * getOpacity()/255.0f;
skeleton->g = color.g * getOpacity()/255.0f;
skeleton->b = color.b * getOpacity()/255.0f;
skeleton->a = getOpacity();
...
void RegionAttachment_updateQuad (RegionAttachment* self, Slot* slot, ccV3F_C4B_T2F_Quad* quad) {
RegionAttachment_updateVertices(self, slot);
GLubyte r = slot->skeleton->r * slot->r ;
GLubyte g = slot->skeleton->g * slot->g ;
GLubyte b = slot->skeleton->b * slot->b ;
GLubyte a = slot->skeleton->a * slot->a ;
...
(correct me if it goes wrong 🙂 )
suggestions:
I extended CCSkeleton Class, and provide my Custom AttachmentLoader,
in the process, I have to change bool ownsSkeletonData to protected member, so that I can set it to true
after the CCSkeleton constructor called initialize()
protected:
bool ownsSkeletonData;
I would like to flip a specific attachment, I think I can do this by swapping left/right vertices in code level.
Can we add the support in Spine editor too? It is easier for designers to set flip of the attachment at specific frame
also,Can I get the current frame of the animation? I've got AnimationState::time now, can I translate it
to frame index?
currently only libgdx atlas format is supported(i didnt buy texturepacker), I wonder if there is a converter to convert plist of cocos2d to libgdx format?
a lot of thanks!
Philip