Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package;
- import nme.Lib;
- import org.flixel.FlxGame;
- import states.MenuState;
- class MyGame extends FlxGame
- {
- #if flash
- public static var SoundExtension:String = ".mp3";
- #elseif neko
- public static var SoundExtension:String = ".ogg";
- #else
- public static var SoundExtension:String = ".wav";
- #end
- #if !neko
- public static var SoundOn:Bool = true;
- #else
- public static var SoundOn:Bool = true;
- #end
- public function new()
- {
- var stageWidth:Int = Lib.current.stage.stageWidth;
- var stageHeight:Int = Lib.current.stage.stageHeight;
- var ratioX:Float = stageWidth / 640;
- var ratioY:Float = stageHeight / 480;
- var ratio:Float = Math.min(ratioX, ratioY);
- #if (flash || desktop || neko)
- super(Math.floor(stageWidth / ratio), Math.floor(stageHeight / ratio), MenuState, ratio, 60, 60, true);
- #else
- super(Math.floor(stageWidth / ratio), Math.floor(stageHeight / ratio), MenuState, ratio, 60, 30, true);
- #end
- forceDebugger = true;
- useSystemCursor = true;
- mouseEnabled = true;
- _mouse.visible = true;
- }
- }
Add Comment
Please, Sign In to add comment