// Update is called once per frame void Update() { if (userGUI.status == 1) { if (time > 4f) { RoundOver(); } else { time += Time.deltaTime; if (this.Playing == false) { DiskFlyOneTime = Random.Range(min, max); //Debug.Log(DiskFlyOneTime); GameObject temp; for (int i = 0; i < DiskFlyOneTime; i++) { //Debug.Log(Factory+"here"); temp = Factory.GetDisk(this.Round); //temp.transform.position = position[i]; //temp.transform.GetComponent<Rigidbody>().velocity = temp.GetComponent<Disk>().direction * temp.GetComponent<Disk>().speed; IAM.PlayDisk(temp, position[i]); Disks.Enqueue(temp); } this.Playing = true; } } } }
void Update() { if (start == true) { count++; if (count >= 80) { count = 0; if (DF == null) { Debug.LogWarning("DF is NUll!"); return; } tral++; Disk d = DF.GetDisk(round); if (Manager == null) { Debug.LogWarning("Manager is NULL!"); } Manager.PlayDisk(d); if (tral == 10) { round++; tral = 0; } } } }
public void Update() { if (times < 30 && flag == 0) { if (interval <= 0) { interval = Random.Range(3, 5); times++; df.GenDisk(); } interval -= Time.deltaTime; } actionManager.PlayDisk(); }
public void GameStart() { if (Round < 11 && status.Equals(Status.end)) { for (int i = 0; i < Round; i++) { Debug.Log("s" + i.ToString()); GameObject ufo = factory.UseUFO(); float speed = Random.Range(1, 3 * Round); float g = Random.Range(0.1f, Round / 7); actionManager.PlayDisk(ufo, speed, g); } Round++; status = Status.start; } else if (Round == 11) { status = Status.result; } }