Data is not even a reserved keyword, and there are no labels or Read statements in Monkey either. So I'm guessing no chance it will come.
Here is one way you might do something equivalent in Monkey:
levels:LevelData[] = New LevelData[ 100 ]
levels[ 0 ] = New LevelData( 40, 7.5, ALIEN_SCOUT, "We will destroy all humans!" )
levels[ 1 ] = New LevelData( 60, 8.0, ALIEN_SOLDIER, "Prepare to die!" )
'...more levels
' New level at runtime
level = New Level( levels[ currentLevel ] )
LevelData is just a simple class with four fields and the constructor used above. And Level has a constructor (or initialiser) that takes a LevelData parameter.
|