public void unload() { UnloadContents(); NotificationCenter.removeObserver(this); puGameObject.unload(); }
public void OnDestroy() { if (rootObject != null) { rootObject.unload(); } }
public virtual void unloadAllChildren() { for (int i = children.Count - 1; i >= 0; i--) { PUGameObject p = children [i] as PUGameObject; p.unload(); } children.Clear(); }
public void UpdateKetchupIndicators() { // If we don't have enough indicators while (KetchupIndicators.children.Count < NumberOfKetchupUses) { PURawImage i = new PURawImage(); i.SetFrame(KetchupIndicators.children.Count * 26 + 4, 2, 28, 58, 0, 0, "bottom,left"); i.resourcePath = "Game/ketchup_indicator"; i.LoadIntoPUGameObject(KetchupIndicators); } // If we have too many indicators while (KetchupIndicators.children.Count > NumberOfKetchupUses) { PUGameObject lastObject = KetchupIndicators.children [KetchupIndicators.children.Count - 1] as PUGameObject; lastObject.unload(); } }