Permalink
Browse files

Added reset key

  • Loading branch information...
1 parent 600084e commit 17cb2d59f07fbe446ad4a9bbd7456746429084e1 @whitingjp committed Dec 18, 2011
Showing with 9 additions and 2 deletions.
  1. +8 −2 Galaxy.as
  2. +1 −0 Player.as
View
@@ -53,6 +53,13 @@ package
public function enter_dungeon(room_key:String):void
{
+ if(transition)
+ {
+ transition--;
+ return;
+ }
+ transition = 1;
+
overworld = false;
var byte_class:Class = null;
@@ -86,13 +93,12 @@ package
var dungeon:Dungeon = Dungeon(FP.world);
if(overworld)
{
- transition = 4;
trace("entering sub dungeon: "+dungeon.current_room_key);
current_dungeon_key = dungeon.current_room_key;
enter_dungeon(dungeon.current_room_key);
} else
{
- transition = 4;
+ trace("returning to overworld: ");
dungeon_completion[current_dungeon_key] = true;
enter_dungeon("master");
}
View
@@ -79,6 +79,7 @@ package
vy /= Math.sqrt(2);
}
+ if(Input.pressed(Key.R)) Main.galaxy.enter_dungeon("master");
if(collide("orb_source", x+vx, y+vy))
orb_timer = ORB_TIMEOUT;

0 comments on commit 17cb2d5

Please sign in to comment.