Cocos2d iphone cocos2D iphone v3.3 setBlendFunc已弃用
在v3.0中,我使用了setBlendFunc。现在在3.3中,此方法被警告为已弃用。应该用什么来代替?Cocos2d iphone cocos2D iphone v3.3 setBlendFunc已弃用,cocos2d-iphone,deprecated,Cocos2d Iphone,Deprecated,在v3.0中,我使用了setBlendFunc。现在在3.3中,此方法被警告为已弃用。应该用什么来代替? 谢谢。这里有一个例子,当我重构代码时: // [_firstSprite setBlendFunc:(ccBlendFunc) {GL_SRC_ALPHA, GL_ONE}]; // deprecated _firstSprite.blendMode = [CCBlendMode blendModeWithOptions:@{ CCBlendFuncS
谢谢。这里有一个例子,当我重构代码时:
// [_firstSprite setBlendFunc:(ccBlendFunc) {GL_SRC_ALPHA, GL_ONE}]; // deprecated
_firstSprite.blendMode = [CCBlendMode blendModeWithOptions:@{
CCBlendFuncSrcColor : @(GL_SRC_ALPHA),
CCBlendFuncDstColor : @(GL_ONE),}
];
您必须研究您的具体情况,但这是研究的总体方向。这是我的答案。非常感谢。