Called when the active object has changed
Add an array of objects to the switcher. If objects are in a container, card holder, or another switcher, they will not be added.
Objects to add
The index at which the new objects will be added. By default, they will be inserted at start (index 0)
If false, don't show insert animation. Default: false
Check whether an object is in this container
Remove this switcher, leaving the active object as a regular object
Return currently active object
Return the index of the currently active object
Return the number of objects in the switcher
Return the object at a given index
Return whether the switcher object is valid. A switcher becomes invalid after it has been destroyed explicitly, or if the current object is deleted.
Remove an object from the switcher and delete it. Only deletes the object if it was in the switcher, and returns whether it was deleted.
Remove an object from the switcher and delete it. Returns whether something was removed.
The index of the object to remove
Set the index of the active object
Represents a switcher object that allows players to switch between different objects. Created using GameObject.createSwitcher and accessed using GameObject.getSwitcher