/src/levels/DiodeOne.as
ActionScript | 36 lines | 28 code | 8 blank | 0 comment | 0 complexity | f542874d42776fdcd3d6e953d1e7fe8f MD5 | raw file
1package levels 2{ 3 import org.flixel.*; 4 5 public class DiodeOne extends PlayState 6 { 7 [Embed(source = '../../data/Levels/DiodeOne/Ground.txt', mimeType = "application/octet-stream")] private var Ground:Class; 8 [Embed(source = '../../data/Levels/DiodeOne/Wall.txt', mimeType = "application/octet-stream")] private var Wall:Class; 9 public static var title:String = "Short Circuit"; 10 11 public function DiodeOne() { 12 GroundMap = Ground; 13 WallMap = Wall; 14 super(); 15 } 16 17 public override function initialize():void { 18 _player = new Player(5, 2, Direction.RIGHT); 19 20 barActive = false; 21 22 addDiode(8, 2, Direction.LEFT); 23 addDiode(7, 3, Direction.DOWN); 24 addDiode(10, 7, Direction.UP); 25 addDiode(8, 8, Direction.RIGHT); 26 addDiode(6, 8, Direction.RIGHT); 27 addDiode(14, 7, Direction.DOWN); 28 29 addKey(14, 2, new FlxPoint(5, 3)); 30 addKey(12, 8, new FlxPoint(14, 3)); 31 32 addStairs(5, 10); 33 } 34 } 35} 36