public void PlayDisk(GameObject disk, float power, bool usePhy) { if (usePhy == false) { cc_Manager.CCFly(disk, power); } else { psy_Manager.PsyFly(disk, power); } }
void ThrowDisk() { float position_x = 10; if (diskQueue.Count != 0) { GameObject disk = diskQueue.Dequeue(); freeDisk.Add(disk); disk.SetActive(true); float ran_y = Random.Range(1f, 3.5f); float ran_x = Random.Range(-1f, 1f) < 0 ? -1 : 1; disk.GetComponent <DiskData>().direction = new Vector3(ran_x, ran_y, 0); Vector3 position = new Vector3(-disk.GetComponent <DiskData>().direction.x *position_x, ran_y, 0); disk.transform.position = position; action_manager.CCFly(disk, disk.GetComponent <DiskData>().speed); } }