Advertisement
Masadow

FlxGUI.hx

May 2nd, 2013
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.65 KB | None | 0 0
  1. package gui;
  2. import gui.ActionBar;
  3. import org.flixel.FlxBasic;
  4. import org.flixel.FlxCamera;
  5. import gui.FlxTextBox;
  6. import org.flixel.FlxSprite;
  7. import org.flixel.FlxG;
  8. import flixel.FlxGroupX;
  9.  
  10. /**
  11.  * ...
  12.  * @author Masadow
  13.  */
  14. class PlayerGUI extends FlxGroupX
  15. {
  16.  
  17.     public function new()
  18.     {
  19.         super();
  20.        
  21.         cameras = new Array<FlxCamera>();
  22.         cameras.push(new FlxCamera(0, 0, FlxG.width, FlxG.height));
  23.         FlxG.addCamera(cameras[0]);
  24.  
  25.         //Add GUI elements
  26.         add(new FlxTextBox(140, 0, 40, "Hello"));
  27.         add(new ActionBar());
  28.     }
  29.    
  30.     override public function draw():Void
  31.     {
  32.         this.cameras[0].fill(0x0, false);
  33.         super.draw();
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement