//gets the players position, or future position private Vector3 getPlayerPosition() { if (predictive) { return(playerMovement.getFuturePosition()); } else { return(player.transform.position); } }
//controls the attack void Update() { if (!bossController.IsDead() && Time.time < attackEndTime) { transform.LookAt(player.getFuturePosition()); if (Time.time > nextFire) { CastProjectile(Random.Range(0, castPoints.Length)); nextFire += fireRate; } } }
//controls the attack void Update() { if (!bossController.IsDead() && Time.time < attackEndTime) { transform.LookAt(player.getFuturePosition()); if (Time.time > nextFire) { StartCoroutine(Cast()); nextFire += fireRate; } } }
//Casts the attack public void OnCast() { attackEndTime = Time.time + castDuration; nextFire = Time.time; transform.LookAt(player.getFuturePosition()); }