HaxeFlixel/flixel — pull request #1105 by Masadow (2014-05-18 13:36:31+00:00)
Title: Set commands manage arrays, closes #997

Example code

class PlayState extends FlxState
{
public static var tests : Array;

/**
* Function that is called up when to state is created to set it up.
*/
override public function create():Void
{
// Set a background color
FlxG.cameras.bgColor = 0xff131c1b;
// Show the mouse (in case it hasn't been disabled)
#if !FLX_NO_MOUSE
FlxG.mouse.visible = true;
#end

super.create();

FlxG.console.registerObject("obj", PlayState);

tests = new Array();

tests.push(new Test());
tests.push(new Test());

FlxG.watch.add(PlayState, "tests", "tests");
}
}
class Test
{
public var array : Array < Array>;

public function new()
{
array = [
[1, 1],
[3, 4]
];
}

public function toString()
{
return array.toString();
}
}

Then you can use `set obj.tests[0].array[0][1] 2`