#include "REDKeyframe.h" using namespace cocos2d; namespace redream { REDKeyframe::REDKeyframe() : _object(nullptr) , _time(0.0f) , _easingType(EasingType::INSTANT) { _easingOpt = (float*)malloc(4 * sizeof(float));; } REDKeyframe::~REDKeyframe() { CC_SAFE_RELEASE(_object); CC_SAFE_FREE(_easingOpt); } const Value& REDKeyframe::getValue() const { return _value; } void REDKeyframe::setValue(const Value& value) { _value = value; } Ref* REDKeyframe::getObject() const { return _object; } void REDKeyframe::setObject(Ref* obj) { CC_SAFE_RETAIN(obj); CC_SAFE_RELEASE(_object); _object = obj; } float REDKeyframe::getTime() { return _time; } void REDKeyframe::setTime(float fTime) { _time = fTime; } REDKeyframe::EasingType REDKeyframe::getEasingType() { return _easingType; } void REDKeyframe::setEasingType(REDKeyframe::EasingType easingType) { _easingType = easingType; } float* REDKeyframe::getEasingOpt() { return _easingOpt; } void REDKeyframe::setEasingOpt(float *fEasingOpt) { _easingOpt[0] = fEasingOpt[0]; _easingOpt[1] = fEasingOpt[1]; _easingOpt[2] = fEasingOpt[2]; _easingOpt[3] = fEasingOpt[3]; } std::vector REDKeyframe::getEqualPoints() { return _equalPoints; } void REDKeyframe::setEqualPoints(std::vector equalPoints) {\ _equalPoints = equalPoints; } }