- Home /
making my classes usable?
i remember when coding in C, you need to declare one variable of your struct and then use it.
i don't know how this works in JavaScript though. posting my code until the line where unity starts bragging
class DisplayDevices // Anzeigegerte fr Rennwerte { var ANA_time : GameObject; // Chronometer var ANA_speed : GameObject; //Tacho var ANA_rpm : GameObject;//RPM var ANA_engine_temp : GameObject; //lstand var LCD_pcm = GameObject; //Display var OBJ_steering_wheel = GameObject; // Lenkrad };
class RacingData //Speicher fr Rennwerte { var vehicle_speed; //Geschwindigkeit var lap_time; //Rundenzeit var engine_rotation; //Umdrehungen pro Minute var engine_temp; //Motortemperatur var display; //Navi auf Amaturenbrett var steering_angle; //Einschlagwinkel des Lenkrads };
var TXT_data : TextAsset; //Unsere Datei
RacingData einlesewerte; // trying to declare an instance for use, unity stops here
Glad to see you solved your problem. You should Google "javascript is not java", though. They are not the same thing, which links there can help to understand.
Answer by h4wkeye · May 13, 2011 at 08:43 AM
Nevermind. Looked a bit throught the Board. Solved it.
var einlesewerte : RacingData;