开发者

The method setPosition(CGPoint) in the type CCSprite is not applicable for the arguments (float, int)

开发者 https://www.devze.com 2023-04-12 12:02 出处:网络
I am developing a basic game.And when i was developing a scence, igot this error message(The method setPosition(CGPoint) in the type CCSprite is not applicable for the arguments (float, int)).how 开发

I am developing a basic game.And when i was developing a scence, i got this error message(The method setPosition(CGPoint) in the type CCSprite is not applicable for the arguments (float, int)).how 开发者_运维知识库can i fix this problem?


it is from the cocos2d, isn't it? then you should modify this:

target.setPosition(CGPoint.ccp(winSize.width + (target.getContentSize().width / 2.0f) , actualY/ 1.0f));


i am using the setPosition(CGPoint) like this way you should try it..

deleteMenu.setPosition(CGPoint.ccp((hintSprite.getContentSize().width - 10), hintSprite.getContentSize().height + 10));
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号