diff options
author | Roman Gräf <romangraef@gmail.com> | 2020-04-18 12:18:38 +0200 |
---|---|---|
committer | Roman Gräf <romangraef@gmail.com> | 2020-04-18 12:18:38 +0200 |
commit | d3e26b3e2263770faa493e39caccab4dfe81fb17 (patch) | |
tree | 45d074bcce40b02f159276169eac4a448c789c8f /main_scene/programmers.gd | |
parent | f6762253e43fc8dd782b026f4014d62350845ea5 (diff) | |
download | LDJam46-d3e26b3e2263770faa493e39caccab4dfe81fb17.tar.gz LDJam46-d3e26b3e2263770faa493e39caccab4dfe81fb17.tar.bz2 LDJam46-d3e26b3e2263770faa493e39caccab4dfe81fb17.zip |
Programmierer und Riots
Diffstat (limited to 'main_scene/programmers.gd')
-rw-r--r-- | main_scene/programmers.gd | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/main_scene/programmers.gd b/main_scene/programmers.gd new file mode 100644 index 0000000..fdb5290 --- /dev/null +++ b/main_scene/programmers.gd @@ -0,0 +1,16 @@ +extends Ticked + +var riot_cooldown := 0 + +func _tick() -> void: + if riot_cooldown == 0: + SaveState.coffee -= SaveState.programmers + if SaveState.coffee < 0: + riot() + SaveState.coffee = 0 + else: + riot_cooldown -= 1 + if riot_cooldown < 0: + riot_cooldown = 0 +func riot(): + riot_cooldown = 10 |