示例#1
0
        public void Start()
        {
            connectedSimbol    = Resources.Load <Texture2D>("Maps-Gps-Receiving-icon");
            connectingSimbol   = Resources.Load <Texture2D>("Maps-Gps-Searching-icon");
            disconnectedSimbol = Resources.Load <Texture2D>("Maps-Gps-Disconnected-icon");

            if (!IsStarted())
            {
                StartCoroutine(StartLocation());
            }

            if (Application.isPlaying && !checkTargetRegistered)
            {
                Game.TargetChangedDelegate checkTarget = (newTarget) =>
                {
                    inMapScene    = newTarget is MapScene;
                    inZoneControl = GameObject.FindObjectOfType <ZoneControl>();
                };

                Game.Instance.OnTargetChanged += checkTarget;
                checkTarget(Game.Instance.GameState.GetChapterTarget(Game.Instance.GameState.CurrentTarget));
                checkTargetRegistered = true;
            }

            pointer = Resources.Load <Texture2D>("pointer");
        }
示例#2
0
        public void Start()
        {
            if (!IsStarted())
            {
                StartCoroutine(StartLocation());
            }

            if (Application.isPlaying)
            {
                Game.TargetChangedDelegate checkTarget = (newTarget) =>
                {
                    inMapScene    = newTarget is MapScene;
                    inZoneControl = GameObject.FindObjectOfType <ZoneControl>();
                };

                Game.Instance.OnTargetChanged += checkTarget;
                checkTarget(Game.Instance.GameState.GetChapterTarget(Game.Instance.GameState.CurrentTarget));
            }

            pointer = Resources.Load <Texture2D>("pointer");
        }