我的游戏中有一个倒数计时器,我试图弄清楚如何制作它,以便它在我的表中显示两位小数和两位小数的记录。现在它作为一个整数倒计时并记录为一个整数。有任何想法吗?
-(void)updateTimerLabel{
if(appDelegate.gameStateRunning == YES){
if(gameVarLevel==1){
timeSeconds = 100;
AllowResetTimer = NO;
}
timeSeconds--;
timerLabel.text=[NSString stringWithFormat:@"Time: %d", timeSeconds];
}
countdownTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(updateTimerLabel) userInfo:nil repeats:YES];