I’m trying to extend the Car class found in the car tutorial. I get the error
line 23: expecting }, found ‘wheels’.
line 618: expecting EOF, found ‘}’
When I take away the surrounding “class Car extends Controllable{ }”, it works fine.
When I try extending MonoBehaviour/Behaviour/rigidbody I get the same error.
==== Controllable.js =====
#pragma strict
public var isPlayer:boolean=false;
protected var mouse_sensitivity:float=1000;
=============================
class Car extends Controllable{
private var wheelRadius : float = 0.4;
var suspensionRange : float = 0.1;
var suspensionDamper : float = 50;
var suspensionSpringFront : float = 18500;
var suspensionSpringRear : float = 9000;
public var brakeLights : Material;
var dragMultiplier : Vector3 = new Vector3(2, 5, 1);
var throttle : float = 0;
private var steer : float = 0;
private var handbrake : boolean = false;
var centerOfMass : Transform;
var frontWheels : Transform[];
var rearWheels : Transform[];
private var wheels : Wheel[];
wheels = new Wheel[frontWheels.Length + rearWheels.Length];