diff --git a/bugs.md b/bugs.md index 67539f1..4a40745 100644 --- a/bugs.md +++ b/bugs.md @@ -9,3 +9,6 @@ # Minor - [ ] score text is infront of the player - [ ] warning areas are infront of the player + +# Ideas +- [ ] Have tick/cross effect appear on a won/failed game diff --git a/game_logic.gd b/game_logic.gd index fe05afe..bc447c5 100644 --- a/game_logic.gd +++ b/game_logic.gd @@ -68,8 +68,8 @@ func game_loop(delta : float): var online_channels : Array[Channel] var offline_channels : Array[Channel] # sort all the channels into online and offline - #if main_channel.channel_mode == Channel.Mode.Online: - if main_channel.platformer_online: + if main_channel.channel_mode == Channel.Mode.Online: + #if main_channel.platformer_online: online_channels.append(main_channel) else: online_channels.append(main_channel) diff --git a/games/bomb defusal/bomb_defusal.gd b/games/bomb defusal/bomb_defusal.gd index e20fb08..99423a3 100644 --- a/games/bomb defusal/bomb_defusal.gd +++ b/games/bomb defusal/bomb_defusal.gd @@ -15,7 +15,7 @@ var current_number : int # Called when the node enters the scene tree for the first time. func _ready() -> void: - pass # Replace with function body. + pick_new_number() # Called every frame. 'delta' is the elapsed time since the previous frame. diff --git a/games/crafting/crafting.gd b/games/crafting/crafting.gd index 0fcb50b..052fa79 100644 --- a/games/crafting/crafting.gd +++ b/games/crafting/crafting.gd @@ -41,8 +41,7 @@ func enter_letter(letter : String): var randomPixel : int = randi_range(0,pixels.size()-1) pixels[randomPixel].deactivate() if count_activated(): - pass - #winner + game_win.emit() func count_activated() -> bool: var count : int = 0 @@ -59,7 +58,7 @@ func _process(delta: float) -> void: current_time -= delta timer_progress.value = current_time/time_limit if current_time <= 0: - pass + game_lose.emit() #loser if Input.is_action_just_pressed("crafting_e"): diff --git a/games/ddr/ddr.gd b/games/ddr/ddr.gd index 06c6738..02af982 100644 --- a/games/ddr/ddr.gd +++ b/games/ddr/ddr.gd @@ -3,13 +3,23 @@ extends Node signal game_win signal game_lose -@export var note_frequency : float = 2 +@export var win_amount : int = 5 +@export var note_frequency : float = 3 @export var paths : Array[Node2D] var next_note : float = 99 + +@export_group("Node References") +@export var combo_label : Label + +var score: int = 0 + # Called when the node enters the scene tree for the first time. func _ready() -> void: next_note = note_frequency + for path in paths: + path.note_hit.connect(hit_note) + path.note_miss.connect(miss_note) # Called every frame. 'delta' is the elapsed time since the previous frame. @@ -33,3 +43,11 @@ func spawn_note(): func detect_hit(lane : int): paths[lane].check_hit() + +func hit_note(): + score += 1 + if score >= win_amount: + game_win.emit() + +func miss_note(): + game_lose.emit()