EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.41k stars 2.91k forks source link

Add FlipX & FlipY to Cocos2d-x runtime #139

Closed shrimpz closed 8 years ago

shrimpz commented 11 years ago

Add follow code to CCSkeletonAnimation.h

void setFlipX(bool t)
{
    skeleton->flipX = t;
}

void setFlipY(bool t)
{
    skeleton->flipY = t;
}
NathanSweet commented 11 years ago

Why not just access the skeleton directly? I'd rather not add methods to get/set the flip x/y, bones, slots, etc.

shrimpz commented 11 years ago

i'm sorry, i'm weak in English.

Because I use Spine in Cocos2d-x's Lua Version, if access Skeleton directly, I must wrap Skeleton to Lua, in Lua, i must write code like follow:

sa:skeleton.flipX = 1

but write follow, I needn't wrap Skeleton to Lua, and Lua Call quickly...

sa:setFlipX(true)