/// <summary> /// Score changed event handler. /// </summary> /// <param name="e"></param> protected virtual void OnScoreChanged(ScoreChangedEventArgs e) { ScoreChangedEventHandler handler = ScoreChanged; if (handler != null) { handler(this, e); } }
public void UpdateScore(int add) { Score += add; ScoreChangedEventHandler?.Invoke(); }