我发现问题很接近,但没有任何帮助,谁能明白我为什么会收到这个错误?代码的“(移动)”第 6 行存在问题。谢谢
// move the spirit left/right/up/down
-(BOOL)moveSpiritWidthOrientation:(GameSpirit*)spirit moveEnum:(GameMoveEnum)move setTransform:(BOOL)trans{
CGPoint gridPoint = [self getGridPointWithPoint:spirit.endPoint];
CGAffineTransform transform = CGAffineTransformIdentity;
switch (move) {
case GameMoveTopEnum:
gridPoint.y -= 1;
transform = CGAffineTransformMakeRotation(-M_PI/2);
break;
case GameMoveBottomEnum:
gridPoint.y += 1;
transform = CGAffineTransformMakeRotation(M_PI/2);
break;
case GameMoveLeftEnum:
gridPoint.x -= 1;
transform = CGAffineTransformMakeScale(-1, 1);
break;
case GameMoveRightEnum:
gridPoint.x += 1;
break;
}