-2
我建设类的说明符或限定符子类CCSprite的:对象需要在对象C类
的问题是我不断收到“类型名称需要说明符或限定词”。
我有代码评论我在哪里得到的错误。林不知道我做错了什么。
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
我强烈建议您在熟悉基本知识之前不要写另一行Objective-C代码。 – trudyscousin