The following code with comments concerning OOP:
And again (and again)(: SetSpriteDirection now in degrees, however SetSpriteAngle is in radians
- Code:
#class Tobj1
public proc Test1
ShowMessage("tested Tobj1");
end;
#endclass
#class Tobj2
public(
objList1$
);
list(objList1$); //List of Tobj1
public proc Test2
foreach (objList1$)
NewObject(obj$, "Tobj1", objList1$);
//it doesnt work...
//I have to use Tobj2(objList$) to make this work
obj.test1;
end;
end;
#endClass
proc TestGlobal
//Again i have to write Tobj2(GLOB$) to make this work even if this variable - global;
GLOB.Test2;
end;
proc main
#object Tobj2 o2$
for (i$, 0, 9)
#object Tobj1 o1$
Add(o2.objList1$, &o1;$);
end;
#object Tobj2 GLOB$//Global object
global(GLOB$); //We make object global variable
end;
And again (and again)(: SetSpriteDirection now in degrees, however SetSpriteAngle is in radians