我正在构建类是 CCSprite 的子类:
问题是我不断收到“类型名称需要说明符或限定符”。
我在我得到错误的地方注释了代码。我不确定我做错了什么。
int tileSize = 80;
Boolean moveable = true;
id moveUp,moveRight,moveDown,moveLeft;
@interface Player : CCSprite {
//On these lines.
moveUp = [CCMoveTo actionWithDuration:2 position:ccp(0, 0 - tileSize)];
moveDown = [CCMoveTo actionWithDuration:2 position:ccp(0,0+tileSize)];
moveRight = [CCMoveTo actionWithDuration:2 position:ccp(0+tileSize,0)];
moveLeft = [CCMoveTo actionWithDuration:2 position:ccp(0-tileSize,0)];
}
-(void)move;
@end
@implementation Player{
@end