From c206725be52ad73cc4dc33db20d2dd529b3c67a0 Mon Sep 17 00:00:00 2001 From: geron-cn Date: Thu, 9 Apr 2015 19:13:14 +0800 Subject: [PATCH] fix color --- cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp index 1a3cb112ca..426db51fc6 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp @@ -690,16 +690,13 @@ void ColorFrame::onEnter(Frame *nextFrame, int currentFrameIndex) void ColorFrame::onApply(float percent) { - if (_betweenAlpha !=0 || _betweenRed != 0 || _betweenGreen != 0 || _betweenBlue != 0) + if (_betweenRed != 0 || _betweenGreen != 0 || _betweenBlue != 0) { - GLubyte alpha = _alpha + _betweenAlpha * percent; - Color3B color; color.r = _color.r+ _betweenRed * percent; color.g = _color.g+ _betweenGreen * percent; color.b = _color.b+ _betweenBlue * percent; - _node->setOpacity(alpha); _node->setColor(color); } }