gameplay start
This commit is contained in:
17
scenes/objects/ui/word_select_button.gd
Normal file
17
scenes/objects/ui/word_select_button.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
extends Button
|
||||
|
||||
var current_scene
|
||||
var next_scene
|
||||
|
||||
func _on_pressed() -> void:
|
||||
current_scene = self.get_parent().get_parent().get_parent()
|
||||
|
||||
if current_scene.game_mode == "cascade":
|
||||
pass
|
||||
elif current_scene.game_mode == "comet":
|
||||
$ButtonPress.play()
|
||||
await $ButtonPress.finished
|
||||
next_scene = load("res://scenes/game/comet_zap.tscn").instantiate()
|
||||
next_scene.word_set = self.text.to_lower().replace(" ", "")
|
||||
get_tree().change_scene_to_node(next_scene)
|
||||
|
||||
Reference in New Issue
Block a user