-
-
Save anonymous/7787817c6b4b1e28a58f to your computer and use it in GitHub Desktop.
Kablooie object instance namespace example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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