Skip to content

Commit

Permalink
Merge pull request #2 from aaronfranke/confine
Browse files Browse the repository at this point in the history
Un-confine the mouse on game over
  • Loading branch information
akien-mga authored Dec 2, 2020
2 parents 59bdf56 + 4ac2984 commit d4a0521
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,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
Expand Down
4 changes: 0 additions & 4 deletions intro/intro.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion level/ui.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()])

Expand Down Expand Up @@ -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")
Expand Down
8 changes: 2 additions & 6 deletions player/TextureProgress.gd
Original file line number Diff line number Diff line change
@@ -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())
Expand All @@ -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)

1 change: 1 addition & 0 deletions player/wheel.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
5 changes: 4 additions & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit d4a0521

Please sign in to comment.