void FixedUpdate() { if(formation.target==null) { formation.target = Helper.findRandomTarget(formation).GetComponent<Spaceship>(); // return; } theTarget = formation.target.transform; dot = Helper.getDot(transform, formation.target.transform); formation.update(); actual = formation.actual; }
/// <summary> /// Sets the formation of the chaser /// </summary> /// <param name="formation">The formation to set</param> public void setFormation(Formation formation) { this.formation = formation; actual = formation.actual; }