Game Development Community

Using addFields

by Tiago Correia · in Torque Game Engine · 06/12/2007 (7:16 am) · 0 replies

Hi,

im testing a situation where i want to access member data from a class that includes a few objects..


class A
{
int vara;
int get();
void set( var );
}

class B
{
int varb;
int get();
void set( var );
}

class C
{
int varc;
int get();
void set( var );
}


// Main class
class Main
{
A a;
B b;
C c;
int somevalue;
}



how can i integrate class Main into torque and be able to go thru it's internal object members using scripting?

do i need to add every class as a scriptable object or can i just do it to the main class and be able to call its members data from itself?