Exemple #1
0
 public override void Activate(GameObject parent)
 {
     for (int i = 0; i < parent.transform.childCount; i++)
     {
         HumanAIGroup component = parent.transform.GetChild(i).gameObject.GetComponent <HumanAIGroup>();
         if (component)
         {
             component.m_ChallengeGroup = true;
             for (int j = 0; j < component.m_Members.Count; j++)
             {
                 if (component.m_Members[j].m_AddHarvestingItem != ItemID.None)
                 {
                     this.m_Tribe  = component.m_Members[j].gameObject;
                     this.m_ItemID = component.m_Members[j].m_AddHarvestingItem;
                     break;
                 }
             }
         }
         if (this.m_ItemID != ItemID.None)
         {
             break;
         }
     }
     DebugUtils.Assert(this.m_ItemID != ItemID.None, "Missing Item in Tribes!", true, DebugUtils.AssertType.Info);
     base.Activate(parent);
 }
Exemple #2
0
 public override void Activate(GameObject parent)
 {
     this.m_Radio = null;
     for (int i = 0; i < parent.transform.childCount; i++)
     {
         GameObject gameObject = parent.transform.GetChild(i).gameObject;
         if (gameObject.name == "Radio")
         {
             this.m_Radio = gameObject.GetComponent <Trigger>();
         }
         else
         {
             HumanAIGroup component = gameObject.GetComponent <HumanAIGroup>();
             if (component)
             {
                 this.m_Group = component;
                 this.m_Group.Initialize();
             }
         }
     }
     DebugUtils.Assert(this.m_Group != null && this.m_Radio != null, "Missing Radio in challenge objects!", true, DebugUtils.AssertType.Info);
     base.Activate(parent);
 }