mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(武器系统): 添加魔法导弹武器及配套子弹逻辑
实现魔法导弹武器系统,包括: 1. 新增HOLD_LOOP发射类型武器 2. 添加魔法导弹子弹类实现追踪和分裂逻辑 3. 修改武器基类支持循环攻击模式 4. 更新角色控制器支持新武器类型 5. 添加相关资源文件和配置
This commit is contained in:
@@ -38,6 +38,7 @@ var initialDamage: float = 0
|
||||
var speedScale: float = 1
|
||||
var isFirstFrame: bool = true
|
||||
var cycleStateAngle: float = 0
|
||||
var lastDelta: float = 0
|
||||
|
||||
func _ready():
|
||||
initialSpeed = speed
|
||||
@@ -83,7 +84,8 @@ func _process(_delta: float) -> void:
|
||||
if lifeDistance > 0:
|
||||
if position.distance_to(spawnInWhere) >= lifeDistance:
|
||||
tryDestroy()
|
||||
func _physics_process(_delta: float) -> void:
|
||||
func _physics_process(delta: float) -> void:
|
||||
lastDelta = delta
|
||||
if destroying: return
|
||||
if is_instance_valid(launcher) and (launcher.isPlayer() or is_instance_valid(launcher.currentFocusedBoss)):
|
||||
launcher.position -= Vector2.from_angle(rotation) * recoil
|
||||
|
||||
Reference in New Issue
Block a user