Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
game restart on Q
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrikdamm committed Feb 15, 2013
1 parent 8358f6d commit 750df92
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/com/robocatapps/NGJ/GameState.as
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
{
Expand Down
2 changes: 1 addition & 1 deletion src/com/robocatapps/NGJ/MenuState.as
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/com/robocatapps/NGJ/NGJ.as
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 750df92

Please sign in to comment.