mirror of
https://github.com/kristoferssolo/FuncIt.git
synced 2025-10-21 19:30:35 +00:00
[Partial-Completion] Tutorial, loading_screen, player-killed
This commit is contained in:
parent
e5ffc4c41c
commit
fbda5ea0f5
@ -17,6 +17,8 @@ var finishedTutorial = false
|
|||||||
var ts_bot = preload("res://source/entities/ts_bot/ts_bot.tscn")
|
var ts_bot = preload("res://source/entities/ts_bot/ts_bot.tscn")
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
for player in PersistentNodes.get_children():
|
||||||
|
Global.get("killed_players").append(player)
|
||||||
$controls/user_input/controls/ready_button.hide()
|
$controls/user_input/controls/ready_button.hide()
|
||||||
$controls/user_input/controls/skip_button.hide()
|
$controls/user_input/controls/skip_button.hide()
|
||||||
$controls/timer/phase.text = "Tutorial"
|
$controls/timer/phase.text = "Tutorial"
|
||||||
@ -55,6 +57,7 @@ func _process(delta):
|
|||||||
if Input.is_action_pressed("enter") and not begunTutorial:
|
if Input.is_action_pressed("enter") and not begunTutorial:
|
||||||
$win_lose_screen.modulate[3] = 0
|
$win_lose_screen.modulate[3] = 0
|
||||||
begunTutorial = true
|
begunTutorial = true
|
||||||
|
Global.get("killed_players").clear()
|
||||||
if Input.is_action_pressed("enter") and finishedAiming:
|
if Input.is_action_pressed("enter") and finishedAiming:
|
||||||
finishedTutorial = true
|
finishedTutorial = true
|
||||||
|
|
||||||
@ -81,6 +84,8 @@ func begin_tutorial():
|
|||||||
botsActivated = true
|
botsActivated = true
|
||||||
if botsActivated and botCount == 0:
|
if botsActivated and botCount == 0:
|
||||||
finishedAiming = true
|
finishedAiming = true
|
||||||
|
for player in PersistentNodes.get_children():
|
||||||
|
Global.get("killed_players").append(player)
|
||||||
if finishedAiming:
|
if finishedAiming:
|
||||||
if $controls.modulate[3] > 0: $controls.modulate[3] -= 0.1
|
if $controls.modulate[3] > 0: $controls.modulate[3] -= 0.1
|
||||||
$win_lose_screen/Panel/Label.text = "Complete"
|
$win_lose_screen/Panel/Label.text = "Complete"
|
||||||
@ -88,6 +93,7 @@ func begin_tutorial():
|
|||||||
$win_lose_screen/Panel/Label2.text = "Press ENTER to continue"
|
$win_lose_screen/Panel/Label2.text = "Press ENTER to continue"
|
||||||
if $win_lose_screen.modulate[3] < 1: $win_lose_screen.modulate[3] += 0.1
|
if $win_lose_screen.modulate[3] < 1: $win_lose_screen.modulate[3] += 0.1
|
||||||
if finishedTutorial:
|
if finishedTutorial:
|
||||||
|
Global.get("killed_players").clear()
|
||||||
Network._server_leave()
|
Network._server_leave()
|
||||||
get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn")
|
get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user