예제 #1
0
 void RemoveFromContainer()
 {
     if (m_currentContainer)
     {
         m_currentContainer.onFlexUpdate     -= OnFlexUpdate;
         m_currentContainer.onBeforeRecreate -= OnBeforeRecreate;
         m_currentContainer.onAfterRecreate  -= OnAfterRecreate;
         m_currentContainer.onBeforeDestroy  -= OnBeforeDestroy;
         m_currentContainer.RemoveActor(this);
         m_currentContainer = null;
     }
 }
예제 #2
0
 void AddToContainer()
 {
     if (m_container)
     {
         m_currentContainer = m_container;
         m_currentContainer.onFlexUpdate     += OnFlexUpdate;
         m_currentContainer.onBeforeRecreate += OnBeforeRecreate;
         m_currentContainer.onAfterRecreate  += OnAfterRecreate;
         m_currentContainer.onBeforeDestroy  += OnBeforeDestroy;
         m_currentContainer.AddActor(this);
     }
 }