예제 #1
0
        private void SetFallbackGatherSpot(Vector3 location, bool useMesh)
        {
            switch (DefaultGatherSpotType)
            {
            // TODO: Smart stealth implementation (where any enemy within x distance and i'm not behind them, use stealth approach and set stealth location as current)
            // If flying, land in area closest to node not in sight of an enemy and stealth.
            case GatherSpotType.StealthGatherSpot:
                GatherSpot = new StealthGatherSpot {
                    NodeLocation = location, UseMesh = useMesh
                };
                break;

            // ReSharper disable once RedundantCaseLabel
            case GatherSpotType.GatherSpot:
            default:
                GatherSpot = new GatherSpot {
                    NodeLocation = location, UseMesh = useMesh
                };
                break;
            }
        }
예제 #2
0
        private async Task <bool> MoveToGatherSpot()
        {
            var distance = Poi.Current.Location.Distance3D(ExProfileBehavior.Me.Location);

            if (FreeRange)
            {
                while (distance > Distance && distance <= Radius && Behaviors.ShouldContinue)
                {
                    await Coroutine.Yield();

                    distance = Poi.Current.Location.Distance3D(ExProfileBehavior.Me.Location);
                }
            }

            if (distance <= Distance)
            {
                return(true);
            }
            await GatherSpot.MoveToSpot(this);

            return(false);
        }
예제 #3
0
 private async Task <bool> MoveFromGatherSpot()
 {
     return(GatherSpot == null || await GatherSpot.MoveFromSpot(this));
 }