i am learning how to use methods and classes.
this is my first attempt ![]()
here is my class
class objectData extends Object{
//name of the system
var name : String;
//tag of the system
var tag : String;
//is system loaded
var isLoaded : boolean;
//is system isolated
var isVisible : boolean;
//is system visible
var isIsolated : boolean;
//is system transparent
var isTransparent : boolean;
}
so i am declaring class like this:
var objects : objectData[];
also i entered length of the array using inspector. also names and tags are initiliazed in the same way.
the problem is when i want to change some of the values. i need to use objects[1] or objects[2]… can i do it simplier, with the name or something?
also how to put methods in the class? is there any simple example?
thanks!