예제 #1
0
        void Update()
        {
            if (revealFOW)
            {
                if (NJGMap.instance == null || miniMap == null)
                {
                    return;
                }

                if (mRevealer == null)
                {
                    mRevealer = NJGFOW.CreateRevealer();
                }

                if (isActive)
                {
                    mRevealer.pos            = miniMap.WorldToMap(transform.position, false);
                    mRevealer.revealDistance = revealDistance > 0 ? revealDistance : NJGMap.instance.fow.revealDistance;
                    mRevealer.isActive       = true;
                }
                else
                {
                    mRevealer.isActive = false;
                }
            }

            /*if (transform.hasChanged)
             * {
             *  if (worldMap != null) worldMap.UpdateItem(this);
             *  if (miniMap != null) miniMap.UpdateItem(this);
             *  transform.hasChanged = false;
             * }*/
        }
예제 #2
0
    void Update()
    {
        if (revealFOW)
        {
            if (NJGMapBase.instance == null || NJG.UIMiniMapBase.inst == null)
            {
                return;
            }

            if (mRevealer == null)
            {
                mRevealer = NJGFOW.CreateRevealer();
            }

            if (isActive)
            {
                mRevealer.pos            = NJG.UIMiniMapBase.inst.WorldToMap(cachedTransform.position, false);
                mRevealer.revealDistance = revealDistance > 0 ? revealDistance : NJGMapBase.instance.fow.revealDistance;
                mRevealer.isActive       = true;
            }
            else
            {
                mRevealer.isActive = false;
            }
        }
    }
예제 #3
0
 public static NJGFOW.Revealer CreateRevealer()
 {
     NJGFOW.Revealer revealer = new NJGFOW.Revealer();
     revealer.isActive = false;
     FastList<NJGFOW.Revealer> obj = NJGFOW.mAdded;
     lock (obj)
     {
         NJGFOW.mAdded.Add(revealer);
     }
     return revealer;
 }
예제 #4
0
    void Start()
    {
        if (NJGMapBase.instance != null)
        {
            if (revealFOW && NJGMapBase.instance.fow.enabled)
            {
                mRevealer = NJGFOW.CreateRevealer();
            }
        }

        //enabled = revealFOW;
    }
예제 #5
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);
    }
예제 #6
0
        void Start()
        {
            if (NJGMap.instance != null)
            {
                if (revealFOW && NJGMap.instance.fow.enabled)
                {
                    mRevealer = NJGFOW.CreateRevealer();
                }
            }

            if (miniMap != null)
            {
                icon  = miniMap.GetEntry(this);
                arrow = miniMap.GetArrow(this);
            }
            if (worldMap != null)
            {
                icon  = worldMap.GetEntry(this);
                arrow = worldMap.GetArrow(this);
            }

            mColorSet = false;
            //enabled = revealFOW;
        }
예제 #7
0
 private void Update()
 {
     if (this.revealFOW)
     {
         if (NJGMapBase.instance == null || UIMiniMapBase.inst == null)
         {
             return;
         }
         if (this.mRevealer == null)
         {
             this.mRevealer = NJGFOW.CreateRevealer();
         }
         if (this.isActive)
         {
             this.mRevealer.pos = UIMiniMapBase.inst.WorldToMap(this.cachedTransform.position, false);
             this.mRevealer.revealDistance = ((this.revealDistance <= 0) ? NJGMapBase.instance.fow.revealDistance : this.revealDistance);
             this.mRevealer.isActive = true;
         }
         else
         {
             this.mRevealer.isActive = false;
         }
     }
 }
예제 #8
0
 private void Start()
 {
     if (NJGMapBase.instance != null && this.revealFOW && NJGMapBase.instance.fow.enabled)
     {
         this.mRevealer = NJGFOW.CreateRevealer();
     }
 }
예제 #9
0
 private void OnDestroy()
 {
     if (Application.isPlaying)
     {
         if (NJGMapBase.instance != null && NJGMapBase.instance.fow.enabled)
         {
             NJGFOW.DeleteRevealer(this.mRevealer);
         }
         this.mRevealer = null;
         if (this.arrow != null)
         {
             UIMiniMapBase.inst.DeleteArrow(this.arrow);
         }
         this.arrow = null;
     }
     NJGMapItem.list.Remove(this);
 }