2024-01-27 23:38:20 +01:00
|
|
|
extends Node2D
|
|
|
|
var talk = load("res://levels/ui/talk.tscn").instantiate()
|
2024-01-29 01:52:01 +01:00
|
|
|
var boss
|
2024-03-06 20:48:56 +01:00
|
|
|
var player
|
2024-01-27 23:38:20 +01:00
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
2024-01-29 01:52:01 +01:00
|
|
|
boss = $Natasha
|
2024-03-06 20:48:56 +01:00
|
|
|
player = $Player
|
2024-01-29 01:57:21 +01:00
|
|
|
boss.add_to_group("boss")
|
2024-05-11 03:35:07 +02:00
|
|
|
Global.cdialog = [[tr("DIALOG_DANMAKUTEST_0"), true, 0, 0], [tr("DIALOG_DANMAKUTEST_1"), false, 9], [tr("DIALOG_DANMAKUTEST_2"), true, 0, 0]]
|
2024-01-27 23:38:20 +01:00
|
|
|
Global.live = 0
|
|
|
|
get_tree().root.add_child.call(talk)
|
|
|
|
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(delta):
|
2024-03-09 02:50:47 +01:00
|
|
|
pass
|
|
|
|
|
2024-07-24 01:46:32 +02:00
|
|
|
#func _physics_process(delta):
|
|
|
|
# pass
|
2024-01-27 23:38:20 +01:00
|
|
|
|
|
|
|
func _input(event):
|
2024-06-17 23:08:25 +02:00
|
|
|
if Global.cdialog.size() != 0 && Global.live == 1:
|
2024-01-27 23:38:20 +01:00
|
|
|
get_tree().root.remove_child(talk)
|
2024-06-17 23:08:25 +02:00
|
|
|
Global.cdialog = []
|
2024-07-16 02:22:33 +02:00
|
|
|
if Global.cboss[1] <= 0 && Global.live == 1:
|
|
|
|
_winner()
|
2024-03-06 20:48:56 +01:00
|
|
|
|
2024-07-16 02:22:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _winner():
|
|
|
|
Global.cdialog = [[tr("DIALOG_DANMAKUTEST_3"), true, 0, 0], [tr("DIALOG_DANMAKUTEST_4"), false, 9], [tr("DIALOG_DANMAKUTEST_5"), true, 0, 0]]
|
|
|
|
Global.live = 3
|
|
|
|
#talk.queue_free()
|
|
|
|
talk = load("res://levels/ui/talk.tscn").instantiate()
|
|
|
|
get_tree().root.add_child.call(talk)
|