public void setQueen(GameObject newQueen) { queenBee = newQueen; hiveController qb = queenBee.GetComponent <hiveController>(); minSpeed = qb.minVelocity; maxSpeed = qb.maxVelocity; chaos = qb.chaos; target = qb.target; started = true; }
private Vector3 whereIsTheFlower() { Vector3 randomise = new Vector3(Random.value, Random.value, Random.value); randomise.Normalize(); hiveController queen = queenBee.GetComponent <hiveController>(); Vector3 hiveCenter = queen.hiveCenter; Vector3 hiveSpeed = queen.hiveSpeed; Vector3 follow = target.transform.position; hiveCenter = hiveCenter - transform.localPosition; hiveSpeed = hiveSpeed - rb.velocity; follow = follow - transform.position; return(hiveCenter + hiveSpeed + follow * 2 + randomise * chaos); }