public YakFollowHerd(AIYak yak) { this.yak = yak; }
public YakChaseHerd(AIYak yak) { this.yak = yak; }
/// <summary> /// Gets a point relative to the index of the yak /// </summary> public Vector3 getFollowPoint(AIYak yak) { float yakSpacing = this.herdWidth / yaks.Length; int yakIndex = System.Array.IndexOf(yaks, yak); float zOffset = -(this.herdWidth / 2f) + (yakIndex * yakSpacing); return new Vector3(transform.position.x, transform.position.y + zOffset, transform.position.z); }