public Target(int identity, int id, Transform transformToAdd, ParagonAI.TargetScript script) { uniqueIdentifier = identity; teamID = id; transform = transformToAdd; targetScript = script; }
//Add a TargetScript to the game //Without this, agents wouldn't be able to find a target public int AddTarget(int id, Transform transformToAdd, ParagonAI.TargetScript script) { currentID++; ParagonAI.Target agentToAdd = new ParagonAI.Target(currentID, id, transformToAdd, script); currentTargets.Add(agentToAdd); UpdateAllEnemiesEnemyLists(); return(currentID); }
void Awake() { targetScript = gameObject.GetComponent <ParagonAI.TargetScript>(); //If no teams are provided, then look for agents that are on the same team as the target we are modifying. if (teamNumbersToLookFor.Length == 0) { teamNumbersToLookFor = new int[1]; teamNumbersToLookFor[0] = targetScript.myTeamID; } //Square the radius so that we don't have to use costly SqrRoot SetRadiusToIncrease(radiusToIncreasePriority); }
void Awake() { targetScript = gameObject.GetComponent<ParagonAI.TargetScript>(); //If no teams are provided, then look for agents that are on the same team as the target we are modifying. if(teamNumbersToLookFor.Length == 0) { teamNumbersToLookFor = new int[1]; teamNumbersToLookFor[0] = targetScript.myTeamID; } //Square the radius so that we don't have to use costly SqrRoot SetRadiusToIncrease(radiusToIncreasePriority); }
//Setters public void SetTargetObj(ParagonAI.TargetScript x) { myTargetScript = x; }