Skip to content

Instantly share code, notes, and snippets.

Created March 27, 2014 22:43
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/7787817c6b4b1e28a58f to your computer and use it in GitHub Desktop.
Save anonymous/7787817c6b4b1e28a58f to your computer and use it in GitHub Desktop.
Kablooie object instance namespace example
// You can find an object by name, searching closest-first by current context...
img someImage = img.NameAssignedToAnImageInstance;
chr someCharacter = chr.NameAssignedToACharacter;
ani someAnimation = ani.NameAssignedToAnAnimation;
// ...or you can access by fully qualified hierarchy path.
img anotherImage = chr.SomeCharacter.SomeAnimation.AnotherImage;
// Array syntax is supported for multiple copies.
img.Button.SetCopyCount(5);
for (int i = 0; i < 5; i = i + 1)
{
img.Button[i].SetIsFlagSet(PhysicsShapeRectangle, true);
}
// Special syntax for using a string variable's runtime value as a name.
string objectName = "Button";
img myButton = img.~objectName~;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment