Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个CCSprite对象。我开始两个动作。CCRotateBy, 和CCScaleTo. 我需要为这些动作设置不同的锚点。mySprite.anchorPoint = ccp(0.5f,0);如果更改两个动画的锚点,我该怎么做?
CCSprite
CCRotateBy
CCScaleTo
mySprite.anchorPoint = ccp(0.5f,0);
将您的 CCSprite 添加为 CCNode 的子节点。CCNode 将充当附加的锚点。
假设您想以圆周运动围绕中心点旋转精灵,您将:
根据您的具体需要,设置会略有不同,我猜并非所有的变化都是可能的。