public void UFOFly(DiskModel disk) { ruler.setRound(round); disk.disk.transform.position = ruler.getStart();//设置飞碟的出现位置 int index = 0; for (; diskID[index] != -1; index++) { ; //找到空闲的 Action } Vector3 angle = Vector3.left; int flag = Random.Range(0, 2); if (flag == 1) { angle *= -1; } actions[index] = PhyUFOFlyAction.GetSSAction(angle, ruler.getSpeed());//从ruler中获取初速度和飞行角度,加速度为10 diskID[index] = disk.getDiskID(); this.RunAction(disk.disk, actions[index], this); }
//飞碟飞行 public void UFOFly(GameObject disk, float angle, float power) { fly = PhyUFOFlyAction.GetSSAction(disk.GetComponent <DiskData>().direction, angle, power); this.RunAction(disk, fly, this); }