Exemplo n.º 1
0
        public override void Dispose()
        {
            Messenger.RemoveListener <int>(MessageName.MN_CHARACTOR_BORN, AddCharactor);

            for (int i = 0; i < m_revealers.Count; i++)
            {
                IFOWRevealer revealer = m_revealers[i];
                if (revealer != null)
                {
                    revealer.Release();
                }
            }
            m_revealers.Clear();

            for (int i = 0; i < m_renders.Count; i++)
            {
                FOWRender render = m_renders[i];
                if (render != null)
                {
                    render.enabled = false;
                    UnityEngine.Object.Destroy(render.gameObject);
                }
            }
            m_renders.Clear();

            m_mapFOWRender = null;
            FOWSystem.instance.DestroySelf();
        }
Exemplo n.º 2
0
        public override void Dispose()
        {
            for (int i = 0; i < m_revealers.Count; i++)
            {
                IFOWRevealer revealer = m_revealers[i];
                if (revealer != null)
                {
                    revealer.Release();
                }
            }
            m_revealers.Clear();

            for (int i = 0; i < m_renders.Count; i++)
            {
                FOWRender render = m_renders[i];
                if (render != null)
                {
                    render.enabled = false;
                    UnityEngine.Object.Destroy(render.gameObject);
                }
            }
            m_renders.Clear();

            m_mapFOWRender = null;
            FOWSystem.instance.DestroySelf();
        }
Exemplo n.º 3
0
 protected void UpdateRevealers(int deltaMS)
 {
     for (int i = m_revealers.Count - 1; i >= 0; i--)
     {
         IFOWRevealer revealer = m_revealers[i];
         revealer.Update(deltaMS);
         if (!revealer.IsValid())
         {
             m_revealers.RemoveAt(i);
             FOWSystem.RemoveRevealer(revealer);
             revealer.Release();
         }
     }
 }
Exemplo n.º 4
0
 private void ReleaseRevealer(IFOWRevealer revealer)
 {
     FOWSystem.RemoveRevealer(revealer);
     revealer.Release();
 }