1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-03 01:41:53 +08:00

feat(武器系统): 新增蓝水晶武器及其子弹效果

实现蓝水晶武器系统,包含追踪子弹和环绕钻石效果
- 添加蓝水晶武器及配套子弹资源
- 实现子弹追踪逻辑和钻石环绕效果
- 扩展BulletBase类支持父子弹关联
- 更新角色预设包含新武器
This commit is contained in:
2025-12-13 07:55:02 +08:00
parent d8fcc8eb38
commit 311bc79252
11 changed files with 212 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
extends BulletBase
class_name BlueCrystalBullet
var tracer: EntityBase = null
@onready var trail: GPUParticles2D = $%trail
func ai():
if is_instance_valid(tracer):
var tracker = tracer.getTrackingAnchor()
var targetAngle = position.angle_to_point(tracker)
trail.rotation = - Vector2.from_angle(rotation).angle_to(Vector2.from_angle(targetAngle)) * 0.75 / (speed / initialSpeed)
PresetBulletAI.trace(self, tracker, 0.05)
else:
trail.rotation = 0
speed += 0.1
PresetBulletAI.forward(self, rotation)
@@ -0,0 +1 @@
uid://d1031p38h24tw
+6
View File
@@ -0,0 +1,6 @@
extends BulletBase
class_name Diamond2Bullet
func ai():
if is_instance_valid(parent):
position = parent.position
+1
View File
@@ -0,0 +1 @@
uid://c1ywds8xwerm3