Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * ...
- * @author S*****************************
- */
- package;
- import flash.display.Sprite;
- import flash.display.Shape;
- import flash.Lib;
- class Main extends Sprite
- {
- static function main()
- {
- Lib.current.addChild(new Main());
- }
- public function new()
- {
- super();
- arrayHandler();
- }
- public function arrayHandler()
- {
- var array:Array<Array<Map>> = new Array<Array<Map>>();
- for (i in 0...10)
- {
- for (j in 0...10)
- {
- var m = new Map(20*j, 20*i);
- Lib.current.addChild(m);
- }
- }
- }
- }
- class Map extends Sprite
- {
- public function new(xx:Int, yy:Int)
- {
- super();
- graphics.beginFill(0);
- graphics.drawRect(0, 0, 20, 20);
- graphics.beginFill(0xFF0000);
- graphics.drawRect(1, 1, 18, 18);
- this.x = xx;
- this.y = yy;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement