Exemplo n.º 1
0
    public void unload()
    {
        UnloadContents();

        NotificationCenter.removeObserver(this);
        puGameObject.unload();
    }
Exemplo n.º 2
0
 public void OnDestroy()
 {
     if (rootObject != null)
     {
         rootObject.unload();
     }
 }
Exemplo n.º 3
0
 public virtual void unloadAllChildren()
 {
     for (int i = children.Count - 1; i >= 0; i--)
     {
         PUGameObject p = children [i] as PUGameObject;
         p.unload();
     }
     children.Clear();
 }
Exemplo n.º 4
0
    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();
        }
    }