Milestone 3: Freezer

The freezer is now implemented, just as it worked in the original. There are also a few fixes here and there in preparation for Milestonr 4.
This commit is contained in:
patrick_pluto 2024-08-04 13:41:19 +02:00
commit a92202b536
14 changed files with 199 additions and 114 deletions

View file

@ -19,7 +19,7 @@ func _ready():
Game.computers += 1
func _on_computer_tick_timeout():
if multiplayer.is_server():
if Server.is_server:
current += (pc_occupied[0] + pc_occupied[1] + pc_occupied[2])
Server.sync_computers.rpc(name, current)
if current >= TARGET:
@ -32,19 +32,19 @@ func _on_computer_tick_timeout():
func _on_pc_1_area_body_entered(body):
if pc_occupied[0] == 0:
if pc_occupied[0] == 0 and !body.beast:
pc_occupied[0] = 1
pc_body[0] = body
func _on_pc_2_area_body_entered(body):
if pc_occupied[1] == 0:
if pc_occupied[1] == 0 and !body.beast:
pc_occupied[1] = 1
pc_body[1] = body
func _on_pc_3_area_body_entered(body):
if pc_occupied[2] == 0:
if pc_occupied[2] == 0 and !body.beast:
pc_occupied[2] = 1
pc_body[2] = body