structure or multy-dimensionalArray

hi,

i tryd a lot of things with scripting… but now i’m stuck with this little problem.

i’m creating a Defense tower game.
and an easy way i can think of for creating the waves is like this:

Waves[20waves]
    ->1stwave -NumberEnemys:int
              -EnemyTypes:int[]
              -CashPerEnemy:int

    ->2ndwave -NumberEnemys:int
              -EnemyTypes:int[]
              -CashPerEnemy:int
    -> etc etc....

i gues this is called a struct… but i don’t know how to set this up…
and if i create this, how can i acces for instance the EnemyTypes? (like: Waves[1].EnemyTypes? )
the last point is: i want this to be editable in the editor, so i can edit al the var’s… is this all possible?

greetz,
Henk Kappert

edit: my brother said it was an multi-dimensional array… :?:
another thing that went trough my mind was: maybe i can put all this information in an XML or something like that… and acces it externaly

anyone?!

and is there some better reference to the builtin GUI scripting reference?

greetz,

To make the array editable, create a class for the record and create an array of that type:-

class WaveData {
   NumberEnemys:int 
   EnemyTypes:int[] 
   CashPerEnemy:int
}

var waves: WaveData[];
   ...

is this C# or Java?!
thnx for your answer Andeeee

greetz,

Edit:
Thnx Andeeee!!
i tryd some stuff in JS and that helped… i had to change the code a little bit.

class WaveData 
{
   var Time:int;
   var Subwaves : SubWaveDate[];
}

class SubWaveDate
{
	var Number : int;
	var Type : int;
}

var waves: WaveData[];

thnx again!

Neither

Unity does not support java at all.

This is Javascript