diff options
author | Jonas Bernard <public.jbernard@web.de> | 2021-04-26 21:28:33 +0200 |
---|---|---|
committer | Jonas Bernard <public.jbernard@web.de> | 2021-04-26 21:28:33 +0200 |
commit | ddbc6f7fe3e45bf17ecfc79b9cca3559e419b9fc (patch) | |
tree | 97e72ef27cd02b2c25c52449e6ba21953ed8c251 /scenes/levels/typeracer.gd | |
parent | 9f0db7bd713739c2da8b2cbfb9acb29b13f940e1 (diff) | |
download | ldjam48-ddbc6f7fe3e45bf17ecfc79b9cca3559e419b9fc.tar.gz ldjam48-ddbc6f7fe3e45bf17ecfc79b9cca3559e419b9fc.tar.bz2 ldjam48-ddbc6f7fe3e45bf17ecfc79b9cca3559e419b9fc.zip |
Balance
Diffstat (limited to 'scenes/levels/typeracer.gd')
-rw-r--r-- | scenes/levels/typeracer.gd | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scenes/levels/typeracer.gd b/scenes/levels/typeracer.gd index 6c0a63a..173817d 100644 --- a/scenes/levels/typeracer.gd +++ b/scenes/levels/typeracer.gd @@ -15,7 +15,7 @@ func start(): func _total_time(): if Settings.difficulty == Settings.Difficulty.HARD: return 10 - return 20 + return 60 func _process(delta): if not running: @@ -27,6 +27,7 @@ func _process(delta): func eval(): if $Label.text.replace('\r\n', '\n').replace('\r', '\n') == $TextEdit.text.replace('\r\n', '\n').replace('\r', '\n'): + $TextEdit.readonly = true finish_level() else: lose_heart() @@ -34,5 +35,14 @@ func eval(): $TextEdit.text = "" $Incorrect.visible = true +func eval_corr(): + if $Label.text.replace('\r\n', '\n').replace('\r', '\n') == $TextEdit.text.replace('\r\n', '\n').replace('\r', '\n'): + $TextEdit.readonly = true + finish_level() + func _on_Button_on_click(): eval() + + +func _on_TextEdit_text_changed(): + eval_corr() |