// 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>(); }
public GridMap() { demoGraph = GameObject.FindGameObjectWithTag("Player").GetComponent <RRTDrawer>(); map = new int[450, 350]; for (int i = 5; i <= 45; i++) { for (int j = 5; j <= 45; j++) { map[i, j] = CHECKED; demoGraph.drawCheckedArea(i + 25, j + 50); } } }
// 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; }
void Start() { map = new GridMap(); demoGraph = this.gameObject.GetComponent <RRTDrawer>(); }
// connect matrix, show if two nodes connect with each other // =0, two nodes are not connected // =1, two nodes are connected // =2, two nodes are strong-connected (directly link to each other) // Start is called before the first frame update void Start() { demoGraph = GameObject.FindGameObjectWithTag("Player").GetComponent <RRTDrawer>(); children = GetComponentsInChildren <Transform>(); resetMaze(); }