We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
_unflippedOffsetPositionFromCenter 变量未初始化
_unflippedOffsetPositionFromCenter 变量未初始化
Bug #3308 [Closed]
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8271
Status: | Closed | |
---|---|---|
Start date: | 2013-11-28 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | all | |
Target version: | - |
cocos2dx3.0版本
Sprite在用initWithTexture函数初始化的时候_unflippedOffsetPositionFromCenter 没有初始化,这样将导致, 如果一个Sprite先用做SpriteFrame(initWithSpriteFrame),SpriteFrame有offset,_unflippedOffsetPositionFromCenter 被赋值。然后,这个Sprite又用作一个纹理(initWithTexture),这时_unflippedOffsetPositionFromCenter 没有初始化,setTextureRect对_offsetPosition赋值的时候,将会用之前的_unflippedOffsetPositionFromCenter ,出现bug。