1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-11 06:07:12 +08:00

feat(战斗系统): 增强激光武器效果并添加击退机制

- 增加BigLaser的伤害值和能量消耗
- 为子弹添加击退效果和生成后自动释放功能
- 修改LaserPluse的动画参数并添加锁定发射器脚本
- 调整敌人受击时的能量获取和击退效果
- 更新波次生成配置
This commit is contained in:
2025-08-28 12:34:41 +08:00
parent 19a484643d
commit 31426987a2
7 changed files with 51 additions and 11 deletions
+4
View File
@@ -13,6 +13,8 @@ class_name BulletBase
@export var needEnergy: float = 0.0 # 发射时需要消耗的能量
@export var autoSpawnAnimation: bool = false
@export var autoLoopAnimation: bool = false
@export var freeAfterSpawn: bool = false
@export var knockback: float = 0 # 击退力,物理引擎单位
@onready var animator: AnimationPlayer = $"%animator"
@onready var hitbox: CollisionShape2D = $"%hitbox"
@@ -30,6 +32,8 @@ func _ready():
if autoSpawnAnimation:
animator.play("spawn")
await animator.animation_finished
if freeAfterSpawn:
destroy()
if autoLoopAnimation:
animator.play("loop")
dotLoop()