Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     ifIdle        = true;
     physics       = this.GetComponent <Rigidbody>();
     flyPose       = this.GetComponent <TiltSimulator>();
     rotation      = this.GetComponent <RotationSimulator>();
     propellerAcce = 5.0f; // 测试用,forceMag can be modified by users
     demoGraph     = this.GetComponent <RRTDrawer>();
 }
    // Start is called before the first frame update
    void Start()
    {
        distanceCounter = this.gameObject.GetComponent <DistanceCounter>();
        rotation        = this.gameObject.GetComponent <RotationSimulator>();
        demoGraph       = this.gameObject.GetComponent <RRTDrawer>();
        map             = this.gameObject.GetComponent <MapBuilder>();
        drone           = this.gameObject.GetComponent <PowerfulEngine>();
        root            = new RRTNode(50, 75);
        theRRT          = new List <RRTNode>();
        theRRT.Add(root);
        demoGraph.addRootNode(root);

        minDisNode  = root;
        requestList = new LinkedList <(RRTNode, Vector3)>();
        b           = true;
    }