IEnumerator Missile() { yield return(new WaitForSeconds(2f)); MissileManager.shotSpeed = 50; MissileManager.Shot(gameObject); yield return(new WaitForSeconds(2f)); transform.rotation = Quaternion.Euler(90, 0, 0); transform.position = new Vector3(transform.position.x, transform.position.y, 1f); MissileManager.shotSpeed = 20; MissileManager.Shot(gameObject); yield return(new WaitForSeconds(3f)); MissileManager.ShotStop(gameObject); yield return(new WaitForSeconds(2f)); MissileManager.Shot(gameObject); yield return(new WaitForSeconds(20f)); Destroy(gameObject); }
IEnumerator Missiles() { MissileManager.Shot(gameObject); yield return(new WaitForSeconds(6f)); MissileManager.ShotStop(gameObject); shotState = 2; yield return(new WaitForSeconds(1.5f)); shotState = 3; MissileManager.shotSpeed = 70; pos = transform.position; MissileManager.Shot(gameObject); yield return(new WaitForSeconds(0.2f)); shotState = 4; yield return(new WaitForSeconds(2f)); shotState = 5; MissileManager.shotSpeed = 50; MissileManager.Shot(gameObject); }
IEnumerator Missile() { yield return(new WaitForSeconds(2f)); MissileManager.shotSpeed = 50; MissileManager.Shot(gameObject); yield return(new WaitForSeconds(2f)); if (i < 2) { transform.position = new Vector3(40, 5 + (i * 10), -1.5f); transform.rotation = Quaternion.Euler(0, 90, 0); } else if (i >= 2 && i < 6) { transform.position = new Vector3(transform.position.x, 40, -1.5f); transform.rotation = Quaternion.Euler(90, 0, 0); } else { transform.position = new Vector3(126, 5 + ((i - 6) * 10), -1.5f); transform.rotation = Quaternion.Euler(0, -90, 0); } MissileManager.shotSpeed = 20; MissileManager.Shot(gameObject); yield return(new WaitForSeconds(1f)); MissileManager.ShotStop(gameObject); ShotState = 2; yield return(new WaitForSeconds(2f)); MissileManager.Shot(gameObject); yield return(new WaitForSeconds(20f)); Destroy(gameObject); }
IEnumerator Missiles1to3() { shotState++; MissileManager.Shot(gameObject); yield return(new WaitForSeconds(1.5f)); MissileManager.ShotStop(gameObject); shotState++; yield return(new WaitForSeconds(1f)); shotState++; MissileManager.Shot(gameObject); yield return(new WaitForSeconds(10f)); Destroy(gameObject); }
IEnumerator Missile() { yield return(new WaitForSeconds(2f)); MissileManager.shotSpeed = 50; MissileManager.Shot(gameObject); yield return(new WaitForSeconds(1.5f)); if (i < 1) { transform.position = new Vector3(40, -1.5f, -0.5f); transform.rotation = Quaternion.Euler(0, 90, 0); } else if (i >= 1 && i < 4) { transform.position = new Vector3(transform.position.x, 40, 3.5f); transform.rotation = Quaternion.Euler(90, 0, 0); } else if (i >= 4 && i < 7) { transform.position = new Vector3(transform.position.x, 40, -3.5f); transform.rotation = Quaternion.Euler(90, 0, 0); } else { transform.position = new Vector3(126, -1.5f, 0.5f); transform.rotation = Quaternion.Euler(0, -90, 0); } MissileManager.shotSpeed = 20; MissileManager.Shot(gameObject); yield return(new WaitForSeconds(1f)); MissileManager.ShotStop(gameObject); yield return(new WaitForSeconds(2f)); if (i < 1) { MissileManager.Shot(gameObject); } yield return(new WaitForSeconds(1f)); if (i >= 1 && i < 4) { MissileManager.Shot(gameObject); } yield return(new WaitForSeconds(1f)); if (i >= 4 && i < 7) { MissileManager.Shot(gameObject); } yield return(new WaitForSeconds(1f)); if (i >= 7) { MissileManager.Shot(gameObject); } yield return(new WaitForSeconds(20f)); Destroy(gameObject); }