public void NotifyScoreChanged(ScoreEventArgs sea) { if (ScoreChanged != null) { ScoreChanged(this, sea); } }
/** * Fügt die erzielten Punkte des Schrittes zum Gesamtscore dazu */ public void addScore(int score) { this.score += score; ScoreEventArgs sea = new ScoreEventArgs(); sea.score = this.score; sea.level = getLevel(); NotifyScoreChanged(sea); }
/** * Score Event Handler */ public void OnScoreChanged(object sender, ScoreEventArgs bea) { Dispatcher.BeginInvoke(delegate { if (iv.rootContainer.Child == this) { scoreText.Text = bea.score + ""; levelText.Text = bea.level + ""; if (previousLevel != bea.level) { fallWorker.setLevel(bea.level); previousLevel = bea.level; levelFontSizeSB.Begin(); } } }); }