【发布时间】:2011-11-06 06:01:27
【问题描述】:
我想确定精灵是否在屏幕中或不在 cocos2d 中。
我正在使用类似这样的代码。
CGSize winSize = [CCDirector sharedDirector].winSize;
if (_SmallBlueAlien1.position.x> 0 || _SmallBlueAlien1.position.x > winSize.width || _SmallBlueAlien1.position.y> 0 || _SmallBlueAlien1.position.y > winSize.height)
{
//Sprite is not in the screen)
}
但无法正常工作。我错了。 纠正我
【问题讨论】:
标签: iphone objective-c xcode4 cocos2d-iphone