Closed gyf-lancelot closed 8 years ago
func changeScore(s:Int) { score += s if(bestscore < score) { bestscore = score } scoredelegate.changeScore(value: score) bestscoredelegate.changeScore(value: score) } 分数变更。
func setupScoreLabels() { score = ScoreView() score.frame.origin.x = 50 score.frame.origin.y = 80 score.changeScore(value: 0) self.view.addSubview(score)
bestscore = BestScoreView()
bestscore.frame.origin.x = 170
bestscore.frame.origin.y = 80
bestscore.changeScore(value: 0)
self.view.addSubview(bestscore)
}
设置分数label和最高分label