Esempio n. 1
0
 void RemoveObject(FlagScript visionObject)
 {
     if (objectsFlagsInRange.Contains(visionObject))
     {
         objectsFlagsInRange.Remove(visionObject);
         objectsInRange.Remove(visionObject.gameObject);
         objectsInRangeHealthScripts.Remove(visionObject.GetComponent <HealthScript>());
         unitScript.unitGroupScript.removeUnitFromRange(visionObject.gameObject);
     }
 }
Esempio n. 2
0
 void AddObject(FlagScript visionObject)
 {
     if(visionObject != null) {
         if(!objectsFlagsInRange.Contains(visionObject)) {
             objectsFlagsInRange.Add(visionObject);
             objectsInRange.Add(visionObject.gameObject);
             objectsInRangeHealthScripts.Add (visionObject.GetComponent<HealthScript>());
             unitScript.unitGroupScript.addUnitToRange(visionObject.gameObject);
         }
     }
 }
Esempio n. 3
0
 void AddObject(FlagScript visionObject)
 {
     if (visionObject != null)
     {
         if (!objectsFlagsInRange.Contains(visionObject))
         {
             objectsFlagsInRange.Add(visionObject);
             objectsInRange.Add(visionObject.gameObject);
             objectsInRangeHealthScripts.Add(visionObject.GetComponent <HealthScript>());
             unitScript.unitGroupScript.addUnitToRange(visionObject.gameObject);
         }
     }
 }
Esempio n. 4
0
 void RemoveObject(FlagScript visionObject)
 {
     if(objectsFlagsInRange.Contains(visionObject)) {
         objectsFlagsInRange.Remove(visionObject);
         objectsInRange.Remove(visionObject.gameObject);
         objectsInRangeHealthScripts.Remove (visionObject.GetComponent<HealthScript>());
         unitScript.unitGroupScript.removeUnitFromRange(visionObject.gameObject);
     }
 }