Exemplo n.º 1
0
        public SimObject GetNextInterestingObject()
        {
            SimObject mostInteresting = null;

            if (InterestingObjects.Count < 2)
            {
                InterestingObjects = ObservedActor.GetKnownObjects();
                lock (InterestingObjects) InterestingObjects.Remove(ObservedActor);
            }
            int count = InterestingObjects.Count - 2;

            foreach (BotMentalAspect cAspect in InterestingObjects)
            {
                if (cAspect is SimObject)
                {
                    if (mostInteresting == null)
                    {
                        mostInteresting = (SimObject)cAspect;
                        ///  break;
                    }
                    else
                    {
                        mostInteresting = (SimObject)CompareTwo(mostInteresting, cAspect);
                    }
                    count--;
                    if (count < 0)
                    {
                        break;
                    }
                }
            }
            lock (InterestingObjects)
            {
                InterestingObjects.Remove(mostInteresting);
                InterestingObjects.Add(mostInteresting);
            }
            return(mostInteresting);
        }
Exemplo n.º 2
0
 private void Debug(string p)
 {
     ObservedActor.Debug(p);
 }