1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(子弹效果): 为蓝水晶子弹添加爆炸效果并调整相关配置

- 在BlueCrystal.gd中添加destroy方法创建爆炸效果
- 新增BlueCrystalExplosion.tscn爆炸效果场景
- 调整PurpleCrystalExplosion.tscn粒子数量
- 修复ItemDropped.gd中玩家实例有效性检查
- 将Rooster.tscn的武器更换为水晶系武器
This commit is contained in:
2025-12-14 14:18:30 +08:00
parent c0d5faf668
commit 0f3b75513a
5 changed files with 111 additions and 13 deletions
+5 -2
View File
@@ -41,7 +41,7 @@ func _physics_process(_delta):
refindPlayer()
func canICollect():
return targetPlayer.inventoryMax[item] > targetPlayer.inventory[item]
return is_instance_valid(targetPlayer) && targetPlayer.inventoryMax[item] > targetPlayer.inventory[item]
func collect():
collecting = true
animator.play("collect")
@@ -65,7 +65,10 @@ static func generate(
instance.add_to_group("drops")
return instance
static func getDrops() -> Array[ItemDropped]:
return WorldManager.tree.get_nodes_in_group("drops") as Array[ItemDropped]
var result: Array[ItemDropped] = []
for drop in WorldManager.tree.get_nodes_in_group("drops"):
result.append(drop)
return result
static func getDropsCanCollet() -> Array[ItemDropped]:
var result: Array[ItemDropped] = []
for drop in getDrops():