每次我插入这两行代码时,都会收到此错误消息,我根本不明白为什么。
NSTimer *BirdMovement;
NSTimer *TunnelMovement;
这是整个脚本
#import <UIKit/UIKit.h>
int BirdFlight;
int RandomTopTunnelPosition;
int RandomBottomTunnelPosition;
int ScoreNumber;
NSInteger HighScoreNumber;
@interface Game : UIViewController
{
IBOutlet UIImageView *Bird;
IBOutlet UIButton *StartGame;
IBOutlet UIImageView *TunnelUp;
IBOutlet UIImageView *TunnelDown;
IBOutlet UIImageView *Top;
IBOutlet UIImageView *Bottom;
IBOutlet UIButton *Exit;
IBOutlet UILabel *ScoreLabel;
NSTimer *BirdMovement;
NSTimer *TunnelMovement;
}
-(IBAction)StartGame:(id)sender;
-(void)BirdMoving;
-(void)TunnelMoving;
-(void)PlaceTunnels;
-(void)Score;
-(void)GameOver;
@end
我不认为其他脚本是问题,如果有人有想法感谢。