Thanks for your replies. I think I misunderstood how it worked but after a bit of experimentation I think I have it sussed.
I did originally do it a similar way to your 2nd suggestion lomat, but I was using an array of TMasterUnit but the code started getting ugly whenever I needed to look up values.
As I said, OO is still new to me so I'm still learning some of the concepts. So if I understand correctly with your second method, to create my player objects as per my example, I would do something like:
I did originally do it a similar way to your 2nd suggestion lomat, but I was using an array of TMasterUnit but the code started getting ugly whenever I needed to look up values.
As I said, OO is still new to me so I'm still learning some of the concepts. So if I understand correctly with your second method, to create my player objects as per my example, I would do something like:
For Local p = 1 To 4 For Local mu:TMasterUnit = EachIn masterUnits Local pu:TPlayerUnit = new TPlayerUnit pu.setMaster(mu) pu.player = p ListAddLast(playerUnits, pu) Next Next