Пример #1
0
    private void SendDisk(int type)
    {
        //从工厂中拿一个飞碟
        GameObject disk = disk_factory.GetDisk(type);

        //飞碟位置
        float ran_y = 0;
        float ran_x = Random.Range(-1f, 1f) < 0 ? -1 : 1;

        //飞碟初始所受的力和角度
        float power = 0;
        float angle = 0;

        if (type == 1)
        {
            ran_y = Random.Range(1f, 5f);
            power = Random.Range(5f, 7f);
            angle = Random.Range(25f, 30f);
        }
        else if (type == 2)
        {
            ran_y = Random.Range(2f, 3f);
            power = Random.Range(10f, 12f);
            angle = Random.Range(15f, 17f);
        }
        else
        {
            ran_y = Random.Range(5f, 6f);
            power = Random.Range(15f, 20f);
            angle = Random.Range(10f, 12f);
        }
        disk.transform.position = new Vector3(ran_x * 16f, ran_y, 0);
        action_manager.DiskFly(disk, angle, power);
    }
Пример #2
0
    private void SendDisk(int type)
    {
        GameObject disk = disk_factory.GetDisk(type);

        float disk_y = Random.Range(0f, 3f);
        float disk_x = Random.Range(-1f, 1f) < 0 ? -1 : 1;

        float speed = 0;
        float angle = Random.Range(15f, 25f);

        if (type == 1)
        {
            speed = Random.Range(1f, 1.5f);
        }
        else if (type == 2)
        {
            speed = Random.Range(1.5f, 2f);
        }

        disk.transform.position = new Vector3(disk_x * 14f, disk_y, 0);
        action_manager.DiskFly(disk, angle, speed);
    }
Пример #3
0
    private void SendDisk(int type)
    {
        GameObject disk = diskFactory.GetDisk(type);

        float speed = 0;
        float angle = 0;

        if (type == 1)
        {
            speed = Random.Range(5f, 10f);
            angle = Random.Range(10f, 14f);
        }
        else if (type == 2)
        {
            speed = Random.Range(8f, 13f);
            angle = Random.Range(12f, 16f);
        }
        else
        {
            speed = Random.Range(13f, 18f);
            angle = Random.Range(16f, 20f);
        }
        actionManager.DiskFly(disk, angle, speed);
    }