Exemple #1
0
 void OnDisable()
 {
     if (Application.isPlaying)
     {
         if (mRevealer != null)
         {
             mRevealer.isActive = false;
         }
         if (arrow != null)
         {
             UIMiniMapBase.inst.DeleteArrow(arrow);
         }
         arrow = null;
     }
     list.Remove(this);
 }
Exemple #2
0
    /// <summary>
    /// Remove this unit from the list.
    /// </summary>

    void OnDestroy()
    {
        if (Application.isPlaying)
        {
            if (NJGMapBase.instance != null)
            {
                if (NJGMapBase.instance.fow.enabled)
                {
                    NJGFOW.DeleteRevealer(mRevealer);
                }
            }
            mRevealer = null;
            if (arrow != null)
            {
                UIMiniMapBase.inst.DeleteArrow(arrow);
            }
            arrow = null;
        }
        list.Remove(this);
    }