Exemple #1
0
        public void FollowLoop()
        {
            while (KeepFollowing)
            {
                Thread.Sleep(100);
                Vector3 lastKnown;
                if (!Target.TryGetSimPosition(out lastKnown))
                {
                    DLRConsole.DebugWriteLine("" + this + " Not regions attached " + Target);
                    Thread.Sleep(2000);
                    continue;
                }

                double dist = TheBot.Distance(Target);

                if (dist < maxDistance || CloseEnough())
                {
                    continue;
                }

                if (!TheCBot.SalientGoto(Target))
                {
                    SwitchSalientProc();
                    continue;
                }
                if (!TheCBot.WaitUntilPosSimple(Target.GlobalPosition, Target.GetSizeDistance(), 3, true))
                {
                    SwitchSalientProc();
                }
                else
                {
                    SucceedSalientProc();
                }
            }
        }
 public override void InvokeReal()
 {
     TheCBot.SalientGoto(Target);
 }