Exemplo n.º 1
0
        public void DoBestUse(SimObject someObject)
        {
            if (someObject == null)
            {
                return;
            }
            SimTypeUsage use = someObject.Affordances.GetBestUse(CurrentNeeds);

            if (use == null)
            {
                double closeness = Actor.Approach(someObject, someObject.GetSizeDistance() + 1);
                //AgentManager ClientSelf = Client.Self;
                Actor.Touch(someObject);
                if (closeness < 3)
                {
                    Actor.SitOn(someObject);
                }
                return;
            }
            Actor.Do(use, someObject);
            return;
        }
Exemplo n.º 2
0
 public void DoBestUse(SimObject someObject)
 {
     if (someObject == null) return;
     SimTypeUsage use = someObject.Affordances.GetBestUse(CurrentNeeds);
     if (use == null)
     {
         double closeness = Actor.Approach(someObject, someObject.GetSizeDistance() + 1);
         //AgentManager ClientSelf = client.Self;
         Actor.Touch(someObject);
         if (closeness < 3)
         {
             Actor.SitOn(someObject);
         }
         return;
     }
     Actor.Do(use, someObject);
     return;
 }