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

        //enabled = revealFOW;
    }
예제 #4
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;
        }