protected void Start()
        {
            bkCameraTransform = Camera.main.transform.Backup();

            // Start the gps just in case is not
            if (GeoExtension.Instance.IsStarted())
            {
                GeoExtension.Instance.Start();
            }

            // If the location is valid
            if (GeoExtension.Instance.IsLocationValid())
            {
                geoCharacter.InstantMoveTo(GeoExtension.Instance.Location);
            }
            else
            {
                // if not, just put the character in the center of the map
                geoCharacter.InstantMoveTo(new Vector2d(tileManager.Latitude, tileManager.Longitude));
            }

            if (OriginalOrthoSize == 0)
            {
                LastOrthoSize = OriginalOrthoSize = Camera.main.orthographicSize;
            }

            Camera.main.orthographicSize   = LastOrthoSize;
            InventoryManager.Instance.Show = true;
        }
예제 #2
0
        protected void Start()
        {
            bkCameraTransform = Camera.main.transform.Backup();

            // Start the gps just in case is not
            if (GeoExtension.Instance.IsStarted())
            {
                GeoExtension.Instance.Start();
            }

            // If the location is valid
            if (GeoExtension.Instance.IsLocationValid())
            {
                geoCharacter.InstantMoveTo(GeoExtension.Instance.Location);
            }
            else
            {
                // if not, just put the character in the center of the map
                geoCharacter.InstantMoveTo(new Vector2d(tileManager.Latitude, tileManager.Longitude));
            }
        }
예제 #3
0
        protected void Start()
        {
            bkCameraTransform = Camera.main.transform.Backup();

#if PLATFORM_ANDROID
            if (!Permission.HasUserAuthorizedPermission(Permission.FineLocation))
            {
                if (!Permission.HasUserAuthorizedPermission(Permission.CoarseLocation))
                {
                    Permission.RequestUserPermission(Permission.CoarseLocation);
                }
                Permission.RequestUserPermission(Permission.FineLocation);
            }
#endif

            // Start the gps just in case is not
            if (!GeoExtension.Instance.IsStarted())
            {
                GeoExtension.Instance.Start();
            }

            // If the location is valid
            if (GeoExtension.Instance.IsLocationValid())
            {
                geoCharacter.InstantMoveTo(GeoExtension.Instance.Location);
            }
            else
            {
                // if not, just put the character in the center of the map
                geoCharacter.InstantMoveTo(new Vector2d(tileManager.Latitude, tileManager.Longitude));
            }

            if (OriginalOrthoSize == 0)
            {
                LastOrthoSize = OriginalOrthoSize = Camera.main.orthographicSize;
            }

            Camera.main.orthographicSize   = LastOrthoSize;
            InventoryManager.Instance.Show = true;
        }