void Update() { if (proj != null) { StandardFireFunctions.FireAtPlayerWithSetSpeed(proj, shotSpeed); } }
// Update is called once per frame void Update() { // Make spider face player at all times facePlayer(); // Move towards player if (!jump) { StandardFireFunctions.FireAtPlayerWithSetSpeed(hatcher, speed); } }
IEnumerator FireThreeDRoundBurstLeft() { tempProj = Instantiate(proj, leftCannonPos, transform.rotation); StandardFireFunctions.FireAtPlayerWithSetSpeed(tempProj, 100); yield return(new WaitForSeconds(0.25f)); tempProj = Instantiate(proj, leftCannonPos, transform.rotation); StandardFireFunctions.FireAtPlayerWithSetSpeed(tempProj, 100); yield return(new WaitForSeconds(0.25f)); tempProj = Instantiate(proj, leftCannonPos, transform.rotation); StandardFireFunctions.FireAtPlayerWithSetSpeed(tempProj, 100); }
IEnumerator FireThreeWaveBurstCenter() { for (int i = 0; i < 3; i++) { tempProj = Instantiate(proj, blasterPos, transform.rotation); StandardFireFunctions.FireDegreeOffsetFromPlayerSpeed(tempProj, 20, 100); tempProj = Instantiate(proj, blasterPos, transform.rotation); StandardFireFunctions.FireDegreeOffsetFromPlayerSpeed(tempProj, -20, 100); tempProj = Instantiate(proj, blasterPos, transform.rotation); StandardFireFunctions.FireAtPlayerWithSetSpeed(tempProj, 100); yield return(new WaitForSeconds(0.75f)); } }
// Update is called once per frame void Update() { // Make spider face player at all times facePlayer(); // Move towards player if (!jump) { StandardFireFunctions.FireAtPlayerWithSetSpeed(hatcher, speed); } if (rotating) { transform.RotateAround(player.transform.position, rotationVector, 100 * Time.deltaTime); } }