Skip to content

Instantly share code, notes, and snippets.

Created March 27, 2014 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/13526510d1232ae73fa4 to your computer and use it in GitHub Desktop.
Save anonymous/13526510d1232ae73fa4 to your computer and use it in GitHub Desktop.
Kablooie notifications
handle("OnScoreChanged")
{
// Note: this string usage generates no heap garbage in the
// long term, thanks to StringBuilder/aggressive pooling behind
// the scenes.
string scoreStr = "";
scoreStr.AppendIntToStr(someScoreIntValue);
img.ScoreLabel.SetTextWithKnownChars(scoreStr);
}
// Send notification to any and all who are listening.
scn.this.SendMotification("OnScoreChanged");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment