time to rest, ill get to sleep and then cook tomorrow
This commit is contained in:
parent
df9ad93a43
commit
892b22ce6b
5 changed files with 27 additions and 7 deletions
3
bugs.md
3
bugs.md
|
|
@ -9,3 +9,6 @@
|
||||||
# Minor
|
# Minor
|
||||||
- [ ] score text is infront of the player
|
- [ ] score text is infront of the player
|
||||||
- [ ] warning areas are infront of the player
|
- [ ] warning areas are infront of the player
|
||||||
|
|
||||||
|
# Ideas
|
||||||
|
- [ ] Have tick/cross effect appear on a won/failed game
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,8 @@ func game_loop(delta : float):
|
||||||
var online_channels : Array[Channel]
|
var online_channels : Array[Channel]
|
||||||
var offline_channels : Array[Channel]
|
var offline_channels : Array[Channel]
|
||||||
# sort all the channels into online and offline
|
# sort all the channels into online and offline
|
||||||
#if main_channel.channel_mode == Channel.Mode.Online:
|
if main_channel.channel_mode == Channel.Mode.Online:
|
||||||
if main_channel.platformer_online:
|
#if main_channel.platformer_online:
|
||||||
online_channels.append(main_channel)
|
online_channels.append(main_channel)
|
||||||
else:
|
else:
|
||||||
online_channels.append(main_channel)
|
online_channels.append(main_channel)
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ var current_number : int
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
pass # Replace with function body.
|
pick_new_number()
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,7 @@ func enter_letter(letter : String):
|
||||||
var randomPixel : int = randi_range(0,pixels.size()-1)
|
var randomPixel : int = randi_range(0,pixels.size()-1)
|
||||||
pixels[randomPixel].deactivate()
|
pixels[randomPixel].deactivate()
|
||||||
if count_activated():
|
if count_activated():
|
||||||
pass
|
game_win.emit()
|
||||||
#winner
|
|
||||||
|
|
||||||
func count_activated() -> bool:
|
func count_activated() -> bool:
|
||||||
var count : int = 0
|
var count : int = 0
|
||||||
|
|
@ -59,7 +58,7 @@ func _process(delta: float) -> void:
|
||||||
current_time -= delta
|
current_time -= delta
|
||||||
timer_progress.value = current_time/time_limit
|
timer_progress.value = current_time/time_limit
|
||||||
if current_time <= 0:
|
if current_time <= 0:
|
||||||
pass
|
game_lose.emit()
|
||||||
#loser
|
#loser
|
||||||
|
|
||||||
if Input.is_action_just_pressed("crafting_e"):
|
if Input.is_action_just_pressed("crafting_e"):
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,23 @@ extends Node
|
||||||
signal game_win
|
signal game_win
|
||||||
signal game_lose
|
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]
|
@export var paths : Array[Node2D]
|
||||||
var next_note : float = 99
|
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.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
next_note = note_frequency
|
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.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
|
@ -33,3 +43,11 @@ func spawn_note():
|
||||||
|
|
||||||
func detect_hit(lane : int):
|
func detect_hit(lane : int):
|
||||||
paths[lane].check_hit()
|
paths[lane].check_hit()
|
||||||
|
|
||||||
|
func hit_note():
|
||||||
|
score += 1
|
||||||
|
if score >= win_amount:
|
||||||
|
game_win.emit()
|
||||||
|
|
||||||
|
func miss_note():
|
||||||
|
game_lose.emit()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue