Beispiel #1
0
 void Taker <NounCommonSenseUnit> .Take(NounCommonSenseUnit item)
 {
     if (unityBehaverInternal.avatar == null)
     {
         if (item.isPhysical)
         {
             myCustomizable.seekingAgentPrefab = Utilities.ConsistentInstantiate(parent.generalAgentPrefab, myCustomizable.transform);
             myCustomizable.seekingAgentPrefab.SetAttribute(setupParam.unit);
             myCustomizable.seekingAgentPrefab.gameObject.SetActive(false);
             unityBehaverInternal = myCustomizable;
         }
         else if (item.givenBy != null)
         {
             //non physical, still given by something else
             foreach (var givenBy in item.givenBy)
             {
                 var hostBehaver = parent.EnsureUnityBehaver(new StdGrammarUnit(givenBy));
                 unityBehaverInternal = new DependentUnityBehaver {
                     hostBehaver = hostBehaver
                 };
                 break;
             }
         }
     }
 }
Beispiel #2
0
 void Taker <NounCommonSenseUnit> .Take(NounCommonSenseUnit item)
 {
     foreach (var giver in item.givenBy)
     {
         actualBehaver = parent.PickBestElement(new StdGrammarUnit(giver)).behaver;
         break;
     }
     foreach (var bTrigger in depBTriggers)
     {
         bTrigger.OnGetActualBehaver();
     }
 }