类方法animatewithduration:position:not found

时间:2014-07-11 07:47:32

标签: ios animation

我正在努力向精灵迈进。但是我收到了警告:class method animatewithduration:position: not found。我做错了什么?

    CCSprite *train = [CCSprite spriteWithFile:@"train.png"];
    [train setScale:0.05];
    train.position = ccp(15, size.height/2);
    [self addChild:train];

    CCMoveTo *action = [CCMoveTo animationWithDuration: 2.3f    position:CGPointMake(200,400)];
    [train runAction:action];

0 个答案:

没有答案