Exemplo n.º 1
0
 public void RemoveLevel(LevelBase level)
 {
     if (level != null && FindLevel(level) != null)
     {
         DetachChild(level);
     }
 }
Exemplo n.º 2
0
 public void AddLevel(LevelBase level)
 {
     if (level != null && FindLevel(level) == null)
     {
         AttachChild(level);
     }
 }
Exemplo n.º 3
0
        public override void OnStartLevel()
        {
            int childCount = GetNumChildren();

            for (int i = 0; i < childCount; ++i)
            {
                LevelBase level = GetChild(i) as LevelBase;
                if (level != null)
                {
                    level.OnStartLevel();
                }
            }
        }
Exemplo n.º 4
0
 public LevelBase FindLevel(eNodeStorageType eNodeStorage)
 {
     for (int i = 0; i < children.Count; i++)
     {
         if (children[i] is LevelBase)
         {
             LevelBase childrenLevel = children[i] as LevelBase;
             if (childrenLevel.StorageType == eNodeStorage)
             {
                 return(childrenLevel);
             }
         }
     }
     return(null);
 }
Exemplo n.º 5
0
 private LevelBase FindLevel(LevelBase level)
 {
     for (int i = 0; i < children.Count; i++)
     {
         if (children[i] is LevelBase)
         {
             LevelBase childrenLevel = children[i] as LevelBase;
             if (childrenLevel == level)
             {
                 return(childrenLevel);
             }
         }
     }
     return(null);
 }