Exemple #1
0
 public void RemoveLevel(LevelBase level)
 {
     if (level != null && FindLevel(level) != null)
     {
         DetachChild(level);
     }
 }
Exemple #2
0
 public void AddLevel(LevelBase level)
 {
     if (level != null && FindLevel(level) == null)
     {
         AttachChild(level);
     }
 }
Exemple #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();
                }
            }
        }
Exemple #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);
 }
Exemple #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);
 }