mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
01ab16ed9f
添加道教石像武器资源文件、脚本和场景配置 实现无为子弹的碰撞检测和动画效果 调整树武器的伤害计算方式,现在基于格挡率 优化游戏波次配置,调整敌人数量和出现时机 修复初始选择面板在发布模式下的逻辑问题
43 lines
1.1 KiB
GDScript
43 lines
1.1 KiB
GDScript
@tool
|
|
extends FullscreenPanelBase
|
|
|
|
@onready var initialFeedSelection: HBoxContainer = $%initialFeedSelection
|
|
@onready var initialWeaponSelection: HBoxContainer = $%initialWeaponSelection
|
|
@onready var startBtn: Button = $%startBtn
|
|
@onready var title1: Label = $%title1
|
|
@onready var title2: Label = $%title2
|
|
|
|
func _ready():
|
|
startBtn.pressed.connect(func(): UIState.closeCurrentPanel())
|
|
|
|
func beforeOpen(_args: Array = []):
|
|
clearFeeds()
|
|
clearWeapons()
|
|
ComponentManager.feeds.shuffle()
|
|
for feed in ComponentManager.feeds:
|
|
var card = feed.instantiate() as Feed
|
|
card.freeToBuy = true
|
|
if card.topic == FeedName.Topic.WEAPON:
|
|
initialWeaponSelection.add_child(card)
|
|
card.selected.connect(
|
|
func(_x):
|
|
if WorldManager.isRelease():
|
|
clearWeapons()
|
|
title2.hide()
|
|
)
|
|
else:
|
|
initialFeedSelection.add_child(card)
|
|
card.selected.connect(
|
|
func(_x):
|
|
if WorldManager.isRelease():
|
|
clearFeeds()
|
|
title1.hide()
|
|
)
|
|
|
|
func clearFeeds():
|
|
for feed in initialFeedSelection.get_children():
|
|
feed.queue_free()
|
|
func clearWeapons():
|
|
for weapon in initialWeaponSelection.get_children():
|
|
weapon.queue_free()
|