From 750df92d414301939599b36a8d3bf82a2c5345c3 Mon Sep 17 00:00:00 2001 From: Ulrik Damm Date: Fri, 15 Feb 2013 18:16:01 +0100 Subject: [PATCH] game restart on Q --- src/com/robocatapps/NGJ/GameState.as | 6 ++++++ src/com/robocatapps/NGJ/MenuState.as | 2 +- src/com/robocatapps/NGJ/NGJ.as | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/com/robocatapps/NGJ/GameState.as b/src/com/robocatapps/NGJ/GameState.as index f871d14..f4786fe 100644 --- a/src/com/robocatapps/NGJ/GameState.as +++ b/src/com/robocatapps/NGJ/GameState.as @@ -407,6 +407,12 @@ package com.robocatapps.NGJ { this.gameOver(this.level1.player); } } + + if (this.state == GameState.STATE_GAMEOVER) { + if (FlxG.keys.pressed("Q")) { + FlxG.switchState(new MenuState()); + } + } /*if (FlxG.keys.justPressed("Y")) { diff --git a/src/com/robocatapps/NGJ/MenuState.as b/src/com/robocatapps/NGJ/MenuState.as index 6ff0898..faf09f9 100644 --- a/src/com/robocatapps/NGJ/MenuState.as +++ b/src/com/robocatapps/NGJ/MenuState.as @@ -37,7 +37,7 @@ package com.robocatapps.NGJ { private function toggle_fullscreen() : void { if (FlxG.stage.displayState == StageDisplayState.NORMAL) { - FlxG.stage.fullScreenSourceRect = new Rectangle(0, 0, 1440, 900); + FlxG.stage.fullScreenSourceRect = new Rectangle(0, 0, 980, 613); FlxG.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; } else FlxG.stage.displayState = StageDisplayState.NORMAL; diff --git a/src/com/robocatapps/NGJ/NGJ.as b/src/com/robocatapps/NGJ/NGJ.as index f6bd1a4..fe39a59 100644 --- a/src/com/robocatapps/NGJ/NGJ.as +++ b/src/com/robocatapps/NGJ/NGJ.as @@ -9,7 +9,7 @@ package com.robocatapps.NGJ { [Embed(source="font_subtext.ttf", fontFamily="Subtext", embedAsCFF="false")] public var fontSubtext:String; public function NGJ() { - super(1440, 900, RobocatScreen, 1); + super(1440, 900, RobocatScreen, .680555556); FlxG.mouse.show(); }