void Start() { tank = new Vector3(-2, (float)1.15, 0); normal = new Vector3((float)-5.5, (float)1.0, 0); Tire_Left = this.gameObject.transform.GetChild(0).gameObject; Tire_Right = this.gameObject.transform.GetChild(1).gameObject; Chassis = this.gameObject.transform.GetChild(2).gameObject; Car_Data = this.GetComponent <Car_Data> (); }
void Start() { Car_Data = this.GetComponent <Car_Data> (); Storage = new Vector3(0, -10, 0); Pos1 = new Vector3(-6, -3, 0); Pos2 = new Vector3((float)-2.5, -3, 0); Pos3 = new Vector3(1, -3, 0); Back = new Vector3((float)-8.1, (float)-1.75, 0); Left = new Vector3((float)-8.2, -3, 0); Right = new Vector3((float)3.2, -3, 0); BarPos1 = new Vector3((float)6.5, (float)-2.2, 0); BarPos2 = new Vector3((float)6.5, (float)-3.3, 0); BarPos3 = new Vector3((float)6.5, (float)-4.4, 0); TextPos1 = new Vector3((float)4.2, (float)-1.3, 0); TextPos2 = new Vector3((float)4.2, (float)-2.4, 0); TextPos3 = new Vector3((float)4.2, (float)-3.5, 0); ChassisPos = new Vector3((float)-2.5, (float)-2.5, 0); ArrowLeft = GameObject.Find("ArrowLeft"); ArrowRight = GameObject.Find("ArrowRight"); ArrowBack = GameObject.Find("ArrowBack"); Tire_Menu = GameObject.Find("Tire_Menu"); Chassis_Menu = GameObject.Find("Chassis_Menu"); Engine_Menu = GameObject.Find("Engine_Menu"); Tire0 = GameObject.Find("Tire0"); Tire1 = GameObject.Find("Tire1"); Tire2 = GameObject.Find("Tire2"); Tire3 = GameObject.Find("Tire3"); Tire4 = GameObject.Find("Tire4"); Tire5 = GameObject.Find("Tire5"); Engine0 = GameObject.Find("Engine0"); Engine1 = GameObject.Find("Engine1"); Engine2 = GameObject.Find("Engine2"); Chassis0 = GameObject.Find("Chassis0"); Chassis1 = GameObject.Find("Chassis1"); Chassis2 = GameObject.Find("Chassis2"); DataBar1 = GameObject.Find("DataBar1"); DataBar2 = GameObject.Find("DataBar2"); DataBar3 = GameObject.Find("DataBar3"); Text1 = GameObject.Find("Text1"); Text2 = GameObject.Find("Text2"); Text3 = GameObject.Find("Text3"); }