Esempio n. 1
0
        public async Task <bool> GetCoroutine()
        {
            CoroutineCoodinator.Current = this;

            CoroutineCoodinator.Current = this;

            if (_scene != null && _scene.IsInScene(AdvDia.MyPosition))
            {
                Core.Logger.Debug($"Currently in Target Scene: {_scene.Name}. IsSubScene={_scene.SubScene}");
                State = States.Completed;
            }

            if (PluginSettings.Current.BountyZerg && BountyData != null)
            {
                SafeZerg.Instance.EnableZerg();
            }
            else
            {
                SafeZerg.Instance.DisableZerg();
            }

            switch (State)
            {
            case States.NotStarted:
                return(await NotStarted());

            case States.Searching:
                return(await Searching());

            case States.Moving:
                return(await Moving());

            case States.Completed:
                return(await Completed());

            case States.Failed:
                return(await Failed());
            }
            return(false);
        }