mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-30 16:01:53 +08:00
feat: 添加新武器彩虹旗和紫水晶簇,调整饲料属性和数值
refactor: 重构子弹生成逻辑,支持分裂和折射效果 fix: 修复掉落物拾取范围和碰撞检测问题 style: 优化UI显示,添加武器品质和类型标签 docs: 更新字段描述,调整部分饲料名称和分类 perf: 优化数学工具函数,添加随机数处理工具 test: 调整波次生成逻辑,添加新敌人类型 build: 添加新资源文件和相关导入配置
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
extends BulletBase
|
||||
class_name LGBTBullet
|
||||
|
||||
var myTracer: EntityBase = null
|
||||
|
||||
func spawn():
|
||||
findTracer()
|
||||
func register():
|
||||
speed = 1
|
||||
damage = 5
|
||||
func ai():
|
||||
texture.rotation_degrees += speed
|
||||
speed *= 1.05
|
||||
speed = clamp(speed, 0, 20)
|
||||
if is_instance_valid(myTracer):
|
||||
PresetAIs.trace(self, myTracer.position, clamp(speed / 150, 0, 1))
|
||||
else:
|
||||
findTracer()
|
||||
PresetAIs.forward(self, rotation)
|
||||
func findTracer():
|
||||
myTracer = EntityTool.findClosetEntity(position, get_tree(), false, true)
|
||||
@@ -5,3 +5,20 @@ func ai():
|
||||
PresetAIs.forward(self, rotation)
|
||||
func destroy(_beacuseMap: bool):
|
||||
EffectController.create(preload("res://components/Effects/PurpleCrystalExplosion.tscn"), global_position).shot()
|
||||
func split(index, total, _last):
|
||||
BulletBase.generate(
|
||||
preload("res://components/Bullets/PurpleCrystal.tscn"),
|
||||
launcher,
|
||||
position,
|
||||
deg_to_rad(360 / total * index),
|
||||
true
|
||||
)
|
||||
func refract(entity, _index, _total, _last):
|
||||
BulletBase.generate(
|
||||
preload("res://components/Bullets/PurpleCrystal.tscn"),
|
||||
launcher,
|
||||
position,
|
||||
position.angle_to_point(entity.position) if is_instance_valid(entity) else randf_range(0, deg_to_rad(360)),
|
||||
false,
|
||||
true
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user