public void OnScoreChanged(IScoreComponent source) { if (textRenderable != null) { textRenderable.Text = string.Format(BaseText, source.Score); } }
public void OnScoreChanged(IScoreComponent source) { ITextRenderable textRenderable = null; if (NumRenderables > 0) textRenderable = this.renderables["text"] as ITextRenderable; if (textRenderable != null) textRenderable.Text = string.Format(BaseText, source.Score); }
protected void OnScoreChanged(IScoreComponent source, float newPoints) { //Notify anyone subscribed to this object's score! if (scoreChangedSubscribers.ContainsKey(source.Parent.GUID)) { for (var i = 0; i < scoreChangedSubscribers[source.Parent.GUID].Count; i++) { scoreChangedSubscribers[source.Parent.GUID][i](source); } } }