示例#1
0
 private void Start()
 {
     control           = this.GetComponent <CarControllerV3>();
     input             = this.GetComponent <InputController>();
     steeringTransform = control.steeringTransform;
     rb = control.rb;
 }
        private void Start()
        {
            control = this.GetComponent <CarControllerV3>();
            rb      = control.rb;
            radius  = control.wheelRadius;

            Debug.Assert(control != null, "Must have a controller");
        }
        private void Start()
        {
            control = this.GetComponent <CarControllerV3>();
            input   = this.GetComponent <InputController>();

            Debug.Assert(control != null, "Must have a controller");
            Debug.Assert(input != null, "Must have an input controller");
        }
示例#4
0
        private void Start()
        {
            control           = this.GetComponent <CarControllerV3>();
            input             = this.GetComponent <InputController>();
            steeringTransform = control.steeringTransform;
            rb = control.rb;

            Debug.Assert(control != null, "Must have a controller");
            Debug.Assert(input != null, "Must have an input controller");
        }
示例#5
0
        private void Start()
        {
            control = this.GetComponent <CarControllerV3>();
            input   = this.GetComponent <InputController>();
            rb      = control.rb;

            InitializeSprings(control.wheels[0], control.wheels[1], control.wheels[2], control.wheels[3]);

            Debug.Assert(control != null, "Must have a controller");
            Debug.Assert(input != null, "Must have an input controller");
        }
示例#6
0
        private void Start()
        {
            control = this.GetComponentInParent <CarControllerV3>();
            rb      = control.rb;
            radius  = control.wheelRadius;

            if (control.suspension != null)
            {
                maxSuspensionLength = control.suspension.maxSuspension;
            }

            skid = GetComponentInChildren <TrailRenderer>();
            mesh = transform.Find("Mesh").gameObject;

            Debug.Assert(control != null, "Must have a controller");
            Debug.Assert(mesh != null, "Must have a mesh");
            Debug.Assert(skid != null, "Must have a trail");
        }
 private void Start()
 {
     control = this.GetComponent <CarControllerV3>();
     rb      = control.rb;
 }