Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Alone Developer |
So guys i need a little help in the game “Dodge The Creeps” so i just finished the game and i was fixing some problems and most of them i could but then i came to this that i just cant fix cause i dont have idea whats the problem,but it says “Invalid call to function ‘game over’ in base ‘CanvasLayer’(HUD.gd)'. Expected 1 arguments”.
Here is the code from HUD.
extends CanvasLayer
signal start_game
func show_message(text):
$MessageLabel.text = text
$MessageLabel.show()
$MessageTimer.start()
func game_over(text):
show_message(“Game Over”)
yield($MessageTimer, “timeout”)
$StartButton.show()
$MessageLabel.text = “Dodge The\nCreeps”
$MessageLabel.show()
func update_score(score):
$ScoreLabel.text = str(score)
func _on_MessageTimer_timeout():
$MessageLabel.hide()
func _on_StartButton_pressed():
$StartButton.hide()
emit_signal(“start_game”)
PROBLEM SOLVED!
Alone Developer | 2018-09-11 09:12