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:
@@ -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
|
||||
@@ -0,0 +1,6 @@
|
||||
extends BulletBase
|
||||
class_name Diamond2Bullet
|
||||
|
||||
func ai():
|
||||
if is_instance_valid(parent):
|
||||
position = parent.position
|
||||
@@ -0,0 +1 @@
|
||||
uid://c1ywds8xwerm3
|
||||
Reference in New Issue
Block a user