mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-11 06:07:12 +08:00
feat: 添加局外养成系统和游戏结束面板改进
添加新的物品类型紫水晶和钻石 实现局外属性升级系统 改进游戏结束面板的返回和退出功能 添加新的UI组件用于显示属性和物品 更新游戏规则和存储系统以支持局外养成
This commit is contained in:
@@ -1,10 +1,30 @@
|
||||
@tool
|
||||
extends FullscreenPanelBase
|
||||
|
||||
@onready var audio: AudioStreamPlayer2D = $"%audio"
|
||||
@onready var deadreason: RichTextLabel = $"%deadreason"
|
||||
@onready var audio: AudioStreamPlayer2D = $%audio
|
||||
@onready var deadreason: RichTextLabel = $%deadreason
|
||||
@onready var returnBtn: Button = $%returnBtn
|
||||
@onready var exitBtn: Button = $%exitBtn
|
||||
|
||||
func _ready():
|
||||
returnBtn.pressed.connect(
|
||||
func():
|
||||
returnBtn.disabled = true
|
||||
for bullet in get_tree().get_nodes_in_group("bullets"):
|
||||
bullet.queue_free()
|
||||
for entity in get_tree().get_nodes_in_group("entities"):
|
||||
entity.queue_free()
|
||||
UIState.setPanel("Starter")
|
||||
)
|
||||
exitBtn.pressed.connect(
|
||||
func():
|
||||
get_tree().quit()
|
||||
)
|
||||
|
||||
func beforeOpen(args: Array = []):
|
||||
audio.play()
|
||||
var reasonTemplate = MathTool.randomChoiceFrom(GameRule.deadReasons)
|
||||
deadreason.text = ("[color=gray]" + reasonTemplate + "凶手是[b]%s[/b]的[b]%s[/b]。[/color]") % args
|
||||
func afterOpen(_args: Array = []):
|
||||
returnBtn.disabled = false
|
||||
exitBtn.disabled = false
|
||||
|
||||
Reference in New Issue
Block a user