コード例 #1
0
    }//end func

    public PlaneManager SpawnPlane()
    {
        //create this plane in the world at this position, with no rotation
        GameObject plane = Instantiate(BRS_PlaneSpawn, planeStartPoint, Quaternion.identity); //do not set plane to be child of this object!

        plane.transform.LookAt(planeEndPoint);                                                //point plane towards endpoint
        //get plane manager
        PlaneManager planeManager = plane.GetComponent <PlaneManager>();

        planeManager.InitPlane(targetDropZone, planeCargo, planeFlightSpeed);
        return(planeManager);
    }