public IEnumerator KaniWave() { GetAim ga = new GetAim(); while (true) { // Debug.Log(stageJudge); yield return(new WaitForSeconds(1f)); Instantiate(kani, gameObject.transform.position, ga.getAimQua(gameObject.transform.position, GameObject.Find("player").transform.position)); } }
IEnumerator Start() { GetAim ga = new GetAim(); Destroy(gameObject, lifeTime); while (true) { yield return(new WaitForSeconds(interval)); if (GameObject.Find("player") != null) { Instantiate(bullets, gameObject.transform.position, ga.getAimQua(gameObject.transform.position, GameObject.Find("player").transform.position)); } } }
public IEnumerator Wave3() { GetAim ga = new GetAim(); int time = 0; //Debug.Log("εΌγ°γγ2"); while (true) { time = 0; Vector3 tmp = GameObject.Find("player").transform.position; Vector3 tmp2 = GameObject.Find("boss").transform.position; yield return(new WaitForSeconds(1f)); transform.position = Vector3.MoveTowards(transform.position, new Vector3(tmp.x, tmp2.y, tmp2.z), 3.0f); while (time <= 40) { Instantiate(mizu, gameObject.transform.position, ga.getAimQua(gameObject.transform.position, GameObject.Find("player").transform.position)); time += 1; yield return(new WaitForSeconds(0.1f)); } } }
IEnumerator Start() { yield return(new WaitForSeconds(0.5f)); hpbc = GameObject.Find("HPController").GetComponent <HPBarController>(); int count = count_max; GetAim ga = new GetAim(); while (true) { yield return(new WaitForSeconds(0.5f)); baseDir = Random.Range(0, 2); //Ai1 Instantiate(ballets1_3, gameObject.transform.position, Quaternion.identity); yield return(new WaitForSeconds(0.4f)); Instantiate(ballets1_4, gameObject.transform.position, Quaternion.identity); yield return(new WaitForSeconds(0.4f)); if (GameObject.Find("player") != null) { Instantiate(ballets1_5, gameObject.transform.position, ga.getAimQua(gameObject.transform.position, GameObject.Find("player").transform.position)); } if (reset == 1) { count = 0; } if (count <= 0) { if (i == 0) { yield return(new WaitForSeconds(0.8f)); i = 1; Instantiate(enemy1, new Vector3(-2.0f, 5.0f, 0.0f), Quaternion.identity); if (reset == 1) { Instantiate(ballets2_1, gameObject.transform.position, Quaternion.identity); reset = 0; } } else { yield return(new WaitForSeconds(0.8f)); i = 0; Instantiate(enemy1, new Vector3(2.0f, 5.0f, 0.0f), Quaternion.identity); if (reset == 1) { Instantiate(ballets2_2, gameObject.transform.position, Quaternion.identity); reset = 0; } } count = count_max; } yield return(new WaitForSeconds(1.0f)); count--; } }