Пример #1
0
 public void Add(GameObject gameObject, VisionReceiver receiver)
 {
     hiddenAgent.Add(gameObject);
     hiddenRend.Add(receiver);
     hiddenAgentT.Add(gameObject.GetComponent <Transform>());
     hideNextSetting       = new int[hideAmount + 1];
     hideCurrentSetting    = new int[hideAmount + 1];
     hideSettingCalculated = false;
     hideAmount++;
 }
Пример #2
0
 public void AddRenderer(GameObject obj, VisionReceiver receiver)
 {
     for (var factionIndex = 0; factionIndex < GameManager.Instance.Factions.Length; factionIndex++)
     {
         if (factionIndex == FindFactionIndex(obj))
         {
             // Player that owns the unit will not be included in its hiding
             continue;
         }
         _hiddenAgentsFactions[factionIndex].Add(obj, receiver);
     }
 }