【发布时间】:2011-11-01 11:47:19
【问题描述】:
标题不言自明。我通过从 github 下载文件、删除项目中的 cocos2d 项目并重新添加来安装 cocos2d 1.1。
我的头文件中有一个“@class CCParticleBatchNode”,前缀和相关的实现文件中有一个#import“cocos2d.h”。当我浏览到 CCParticleBatchNode 应该在的位置时,它就在那里。
那么,有人知道问题可能是什么吗? :)
编辑:这是一些代码。
#import "PrecipicationLayer.h"
#import "cocos2d.h"
@implementation PrecipicationLayer
@synthesize cloudLayer;
- (id)init
{
self = [super init];
if (self)
{
rain = [CCParticleRain node];
rainBatch = [CCParticleBatchNode particleBatchNodeWithFile:@"Raindrop48px.png" capacity:400 useQuad:YES additiveBlending:NO];
[self addChild:rainBatch];
[self schedule:@selector(tick:)];
}
return self;
}
和头文件:
#import <Foundation/Foundation.h>
#import "cocos2d.h"
@class CCParticleBatchNode;
@interface PrecipicationLayer : CCLayer {
CCParticleBatchNode *rainBatch;
}
@end
所有不相关的部分都已删除。
【问题讨论】:
-
能贴出相关代码吗?
-
完成。虽然从中删除了不相关的部分,我很确定这应该有效(它有效并且一直适用于其他 cocos2d 类)......
标签: iphone objective-c ios xcode cocos2d-iphone