--- "a/cocos\\editor-support\\cocostudio\\ActionTimeline\\CCFrame.cpp"
+++ "b/cocos\\editor-support\\cocostudio\\ActionTimeline\\CCFrame.cpp"
@@ -508,6 +508,10 @@ void AnchorPointFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
}
_node->setAnchorPoint(_anchorPoint);
+
+ if (_tween) {
+ _betweenPoint = static_cast(nextFrame)->_anchorPoint - _anchorPoint;
+ }
}
@@ -521,7 +525,12 @@ Frame* AnchorPointFrame::clone()
return frame;
}
-
+void AnchorPointFrame::onApply(float percent)
+{
+ if (nullptr != _node) {
+ _node->setAnchorPoint(_anchorPoint + _betweenPoint * percent);
+ }
+}
// InnerActionFrame
const std::string InnerActionFrame::AnimationAllName = "-- ALL --";
```
--- "a/cocos\\editor-support\\cocostudio\\ActionTimeline\\CCFrame.h"
+++ "b/cocos\\editor-support\\cocostudio\\ActionTimeline\\CCFrame.h"
@@ -260,9 +260,11 @@ public:
inline void setAnchorPoint(const cocos2d::Point& point) { _anchorPoint = point; }
inline cocos2d::Point getAnchorPoint() const { return _anchorPoint; }
+ virtual void onApply(float percent) override;
protected:
- cocos2d::Point _anchorPoint;
+ cocos2d::Point _anchorPoint;
+ cocos2d::Point _betweenPoint;
};
```
话说在哪里提交补丁比较好?我也是为了将来升级cocos2d版本的话不用再改一遍