From 4ac29843b1507bacfe40ac6493fca9abb0f0c2b5 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Wed, 2 Dec 2020 05:35:06 -0500 Subject: [PATCH] Un-confine the mouse on game over Fix initialization of pause time correction variable. --- global.gd | 2 +- intro/intro.gd | 4 ---- level/ui.gd | 4 +++- player/TextureProgress.gd | 8 ++------ player/wheel.gd | 1 + project.godot | 5 ++++- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/global.gd b/global.gd index 07b7e2d..c69c1f9 100644 --- a/global.gd +++ b/global.gd @@ -101,7 +101,7 @@ func reset(): start_time = OS.get_system_time_secs() time_passed = 0 time_paused = 0 - last_pause_time = 0 + last_pause_time = start_time game_over = false score = 0 combo = 0 diff --git a/intro/intro.gd b/intro/intro.gd index 9d90838..1b96fcb 100644 --- a/intro/intro.gd +++ b/intro/intro.gd @@ -4,10 +4,6 @@ extends Control var level = preload("res://level/level1.tscn") -func _ready(): - pass - - func _input(event): if event is InputEventKey and not event.is_echo() and not event.is_pressed(): # Key release. set_process_input(false) # Avoid duplicate calls. diff --git a/level/ui.gd b/level/ui.gd index 88de755..627c5bd 100644 --- a/level/ui.gd +++ b/level/ui.gd @@ -21,11 +21,12 @@ const RANDOM_BITS = [ func _ready(): $game_over.hide() - $info.hide() if global.first_run: global.first_run = false show_info() + else: + hide_info() $game_over/random_bit.set_bbcode(RANDOM_BITS[randi() % RANDOM_BITS.size()]) @@ -66,6 +67,7 @@ func _process(_delta): func game_over(): + Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) $AnimationPlayer.play("game_over") yield($AnimationPlayer, "animation_finished") $AnimationPlayer.play("highlight_button") diff --git a/player/TextureProgress.gd b/player/TextureProgress.gd index f8ab6d6..3fac91b 100644 --- a/player/TextureProgress.gd +++ b/player/TextureProgress.gd @@ -1,17 +1,14 @@ extends TextureProgress -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" var shield_timer: Timer -# Called when the node enters the scene tree for the first time. + func _ready(): shield_timer = get_node("../shield_timer") set_max(get_parent().SHIELD_MAX) $refill.set_max(shield_timer.get_wait_time()*100) - pass # Replace with function body. + func _physics_process(_delta): self.set_rotation_degrees(-get_parent().get_rotation_degrees()) @@ -22,4 +19,3 @@ func _physics_process(_delta): $refill.set_value((shield_timer.get_wait_time()-shield_timer.get_time_left())*100) else: $refill.set_value(0) - diff --git a/player/wheel.gd b/player/wheel.gd index 3b867d7..f31ced4 100644 --- a/player/wheel.gd +++ b/player/wheel.gd @@ -3,6 +3,7 @@ extends RigidBody2D func _ready(): set_physics_process(true) + func _physics_process(_delta): if $ground_detect.is_colliding() and ($AnimationPlayer.get_current_animation() != "play"): $AnimationPlayer.play("rotate") diff --git a/project.godot b/project.godot index 7ca854c..1e850a1 100644 --- a/project.godot +++ b/project.godot @@ -32,7 +32,10 @@ _global_script_class_icons={ [application] -config/name="MoonDragoon" +config/name="Moon Dragoon" +config/description="2D sidescrolling shooter in Moon-like gravity made in two weeks for the GitHub Game Off 2020 game jam with the theme MOONSHOT. + +Developed by Johannes Danneker (fry) and RĂ©mi Verschelde (akien)." run/main_scene="res://intro/intro.tscn" config/icon="res://level/earth.png"