can someone please explain to me how to write classes in javascript. I want to be able to write some but cannot find tutorials on how to do in in javascript. Could someone please explain how and try to break it down for me or send me a helpful link, it would be very appreciated. Thanks
pretty simple:
class myClass
{
var whatever : int;
var other : GameObject;
//etc
};
//then to create an instance
var class1 : myClass = new myClass();
Once the script is attached to an object, you can view all of the data members in the inspector, you can set their values there, or initialize with the start function;