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

feat: 添加无敌状态和自定义波次逻辑

- 为EntityBase添加currentInvinsible属性控制无敌状态
- 修改BulletBase.gd在命中时检查目标无敌状态
- 在World.tscn中设置rooster初始为无敌状态
- 添加Wave.gd自定义波次启动逻辑
- 修复currentFocusedBoss未初始化时的空指针问题
This commit is contained in:
2025-09-14 16:20:34 +08:00
parent a704f4b712
commit 7dbeb7ec19
5 changed files with 17 additions and 3 deletions
+3 -1
View File
@@ -73,6 +73,7 @@ var inventoryMax = {
@export var dropCounts: Array[Vector2] = []
@export var appleCount: Vector2i = Vector2(0, 2) # 死亡后掉落的苹果数量
@export var level: int = 1
@export var currentInvinsible: bool = false
@onready var animatree: AnimationTree = $"%animatree"
@onready var texture: AnimatedSprite2D = $"%texture"
@@ -127,7 +128,8 @@ func _ready():
icon.weapon = i
UIState.skillIconContainer.add_child(icon)
else:
currentFocusedBoss = get_tree().get_nodes_in_group("players")[0]
if !currentFocusedBoss:
currentFocusedBoss = get_tree().get_nodes_in_group("players")[0]
applyLevel()
health = fields.get(FieldStore.Entity.MAX_HEALTH)
energy = fields.get(FieldStore.Entity.MAX_ENERGY)