private void Update()
 {
     this.m_currentVisibleZone = null;
     if (this.m_currentMapMission > 0)
     {
         this.m_secondsMissionHasBeenSelected += Time.deltaTime;
     }
     this.UpdateCompletedMissionsDisplay();
 }
        public void CenterAndZoom(Vector2 tapPos, ZoneButton zoneButton, bool zoomIn)
        {
            Vector2 vector2  = new Vector2();
            Vector2 vector21 = new Vector2();

            iTween.Stop(this.m_mapViewContentsRT.gameObject);
            iTween.Stop(base.gameObject);
            this.m_lastTappedZoneButton = zoneButton;
            Vector3[] vector3Array = new Vector3[4];
            this.m_mapViewRT.GetWorldCorners(vector3Array);
            float single  = vector3Array[2].x - vector3Array[0].x;
            float single1 = vector3Array[2].y - vector3Array[0].y;

            vector2.x = vector3Array[0].x + single * 0.5f;
            vector2.y = vector3Array[0].y + single1 * 0.5f;
            Vector3[] vector3Array1 = new Vector3[4];
            this.m_mapViewContentsRT.GetWorldCorners(vector3Array1);
            float single2 = vector3Array1[2].x - vector3Array1[0].x;
            float single3 = vector3Array1[2].y - vector3Array1[0].y;

            vector21.x = vector3Array1[0].x + single2 * 0.5f;
            vector21.y = vector3Array1[0].y + single3 * 0.5f;
            MapInfo componentInChildren = base.GetComponentInChildren <MapInfo>();

            if (componentInChildren == null)
            {
                return;
            }
            if (!zoomIn)
            {
                if (this.OnZoomOutMap != null)
                {
                    Main.instance.m_UISound.Play_MapZoomOut();
                    this.OnZoomOutMap();
                }
                iTween.ValueTo(base.gameObject, iTween.Hash(new object[] { "name", "Zoom View Out", "from", this.m_pinchZoomContentManager.m_zoomFactor, "to", componentInChildren.m_minZoomFactor, "easeType", "easeOutCubic", "time", 0.8f, "onupdate", "ZoomOutTweenCallback" }));
                iTween.MoveTo(this.m_mapViewContentsRT.gameObject, iTween.Hash(new object[] { "name", "Pan View To Point (out)", "x", vector2.x, "y", vector2.y, "easeType", "easeOutQuad", "time", 0.8f }));
            }
            else
            {
                if (this.m_pinchZoomContentManager.m_zoomFactor < 1.001f)
                {
                    Main.instance.m_UISound.Play_MapZoomIn();
                }
                Vector2 mMaxZoomFactor = tapPos - vector21;
                mMaxZoomFactor = mMaxZoomFactor * (componentInChildren.m_maxZoomFactor / this.m_pinchZoomContentManager.m_zoomFactor);
                Vector2 vector22 = vector21 + mMaxZoomFactor;
                iTween.ValueTo(base.gameObject, iTween.Hash(new object[] { "name", "Zoom View In", "from", this.m_pinchZoomContentManager.m_zoomFactor, "to", componentInChildren.m_maxZoomFactor, "easeType", "easeOutCubic", "time", 0.8f, "onupdate", "ZoomInTweenCallback" }));
                iTween.MoveBy(this.m_mapViewContentsRT.gameObject, iTween.Hash(new object[] { "name", "Pan View To Point (in)", "x", vector2.x - vector22.x, "y", vector2.y - vector22.y, "easeType", "easeOutQuad", "time", 0.8f }));
            }
        }
        public void CenterAndZoom(Vector2 tapPos, ZoneButton zoneButton, bool zoomIn)
        {
            iTween.Stop(this.m_mapViewContentsRT.gameObject);
            iTween.Stop(base.gameObject);
            this.m_lastTappedZoneButton = zoneButton;
            Vector3[] array = new Vector3[4];
            this.m_mapViewRT.GetWorldCorners(array);
            float   num  = array[2].x - array[0].x;
            float   num2 = array[2].y - array[0].y;
            Vector2 vector;

            vector.x = array[0].x + num * 0.5f;
            vector.y = array[0].y + num2 * 0.5f;
            Vector3[] array2 = new Vector3[4];
            this.m_mapViewContentsRT.GetWorldCorners(array2);
            float   num3 = array2[2].x - array2[0].x;
            float   num4 = array2[2].y - array2[0].y;
            Vector2 vector2;

            vector2.x = array2[0].x + num3 * 0.5f;
            vector2.y = array2[0].y + num4 * 0.5f;
            MapInfo componentInChildren = base.GetComponentInChildren <MapInfo>();

            if (componentInChildren == null)
            {
                return;
            }
            if (zoomIn)
            {
                if (this.m_pinchZoomContentManager.m_zoomFactor < 1.001f)
                {
                    Main.instance.m_UISound.Play_MapZoomIn();
                    if (this.OnZoomInMap != null)
                    {
                        this.OnZoomInMap();
                    }
                }
                Vector2 vector3 = tapPos - vector2;
                vector3 *= componentInChildren.m_maxZoomFactor / this.m_pinchZoomContentManager.m_zoomFactor;
                Vector2 vector4 = vector2 + vector3;
                iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
                {
                    "name",
                    "Zoom View In",
                    "from",
                    this.m_pinchZoomContentManager.m_zoomFactor,
                    "to",
                    componentInChildren.m_maxZoomFactor,
                    "easeType",
                    "easeOutCubic",
                    "time",
                    0.8f,
                    "onupdate",
                    "ZoomInTweenCallback"
                }));
                iTween.MoveBy(this.m_mapViewContentsRT.gameObject, iTween.Hash(new object[]
                {
                    "name",
                    "Pan View To Point (in)",
                    "x",
                    vector.x - vector4.x,
                    "y",
                    vector.y - vector4.y,
                    "easeType",
                    "easeOutQuad",
                    "time",
                    0.8f
                }));
            }
            else
            {
                if (this.OnZoomOutMap != null)
                {
                    Main.instance.m_UISound.Play_MapZoomOut();
                    this.OnZoomOutMap();
                }
                iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
                {
                    "name",
                    "Zoom View Out",
                    "from",
                    this.m_pinchZoomContentManager.m_zoomFactor,
                    "to",
                    componentInChildren.m_minZoomFactor,
                    "easeType",
                    "easeOutCubic",
                    "time",
                    0.8f,
                    "onupdate",
                    "ZoomOutTweenCallback"
                }));
                iTween.MoveTo(this.m_mapViewContentsRT.gameObject, iTween.Hash(new object[]
                {
                    "name",
                    "Pan View To Point (out)",
                    "x",
                    vector.x,
                    "y",
                    vector.y,
                    "easeType",
                    "easeOutQuad",
                    "time",
                    0.8f
                }));
            }
        }