Fixed round resetting

This commit is contained in:
Paul Black 2023-05-23 12:00:25 -06:00
parent f024c3f2ef
commit b8e42872f7
2 changed files with 10 additions and 5 deletions

View file

@ -25,8 +25,9 @@ func _process(delta):
$startLabel.text = Global.HUDStartLabelText $startLabel.text = Global.HUDStartLabelText
$Fatigue.value = Global.fatigue $Fatigue.value = Global.fatigue
$Health.value = Global.playerHealth $Health.value = Global.playerHealth
if not Global.roundInSession: #if not Global.roundInSession:
if Input.is_action_just_pressed("start_game"): if Input.is_action_just_pressed("start_game"):
print("Player with authority ID of " + str(Global.teddyAuthorityID) + " attempted to restart the round!")
if Global.teddyAuthorityID == 1: if Global.teddyAuthorityID == 1:
restart_round() restart_round()
rpc("restart_round") rpc("restart_round")

View file

@ -1,8 +1,12 @@
extends Node extends Node
@onready var mapNode = get_node("/root/tutorial")
var mapPath = "res://scenes/tutorial.tscn"
var audio_stream_player = AudioStreamPlayer.new() var audio_stream_player = AudioStreamPlayer.new()
func _ready(): func _ready():
Global.currentMapNode = mapNode
Global.currentMapPath = mapPath
Global.playerHealth = 100 Global.playerHealth = 100
Global.fatigue = 100 Global.fatigue = 100
Global.roundTimer = 90.0 Global.roundTimer = 90.0