创建动画时出现问题
我正在使用 cocos2d 0.99.5。我需要创建动画。我的资源和项目中有 01.png 。没关系。我不明白为什么我无法创建框架。我收到错误 SIGABRT。
CCSprite *frame = [CCSprite spriteWithSpriteFrameName:@"01.png"];
我尝试使用这个
CCSpriteFrame *frame = [[CCSpriteFrameCache sharedSpriteFrameCache]
spriteFrameByName:@"01.png"];
但我遇到了同样的错误。
I'm working with cocos2d 0.99.5. I need to create animations. I have 01.png in my resources and in my project. It's ok. I don't understand why I can't create a frame. I've got error SIGABRT.
CCSprite *frame = [CCSprite spriteWithSpriteFrameName:@"01.png"];
I've tried to use this
CCSpriteFrame *frame = [[CCSpriteFrameCache sharedSpriteFrameCache]
spriteFrameByName:@"01.png"];
But I've got the same error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那是因为你的精灵必须在 spriteSheet 中。以下是有关创建动画的教程: http://www.cocos2d-iphone .org/wiki/doku.php/prog_guide:动画
That's because you must have your sprite in the spriteSheet. Here is the tutorial about creating animations: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:animation