Пример #1
0
 private void OnDisable()
 {
     for (int i = 0; i < this.transform.childCount; ++i)
     {
         IGirlSkill skill = this.transform.GetChild(i).GetComponent <IGirlSkill>();
         if (skill != null)
         {
             skill.RemoveSelf();
         }
     }
 }
Пример #2
0
        private void OnEnable()
        {
            foreach (var obj in m_SceneObjs)
            {
                if (obj != null)
                {
                    ISceneObj iso = obj.GetComponent <ISceneObj>();
                    if (iso != null)
                    {
                        iso.SceneInit();
                    }
                }
            }

            for (int i = 0; i < this.transform.childCount; ++i)
            {
                IGirlSkill skill = this.transform.GetChild(i).GetComponent <IGirlSkill>();
                if (skill != null)
                {
                    skill.RemoveSelf();
                }
            }
        }