mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 00:11:54 +08:00
feat(武器): 添加火山阴影子弹并调整火山武器属性
新增火山阴影子弹类型,优化火山武器的攻击效果和动画 调整火山武器的伤害、冷却时间和旋转属性 移除多余的生命值属性,简化武器逻辑 优化狐狸爪子弹的追踪速度和碰撞体积 删除公鸡角色的多余武器配置
This commit is contained in:
@@ -5,4 +5,4 @@ class_name FoxZhua
|
||||
|
||||
func ai():
|
||||
if canTrace:
|
||||
PresetBulletAI.lerpPosition(self, launcher.currentFocusedBoss.getTrackingAnchor() - Vector2(0, 200), 0.1)
|
||||
PresetBulletAI.lerpPosition(self, launcher.currentFocusedBoss.getTrackingAnchor() - Vector2(0, 200), 0.07)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
extends BulletBase
|
||||
class_name Volcano
|
||||
|
||||
@onready var textureSword: Sprite2D = $%textureSword
|
||||
@onready var anchor: Node2D = $%anchor
|
||||
|
||||
var rotates: float = 0
|
||||
|
||||
func register():
|
||||
@@ -12,3 +15,14 @@ func ai():
|
||||
position.angle_to_point(get_global_mouse_position()),
|
||||
rotates
|
||||
)
|
||||
|
||||
func generateShadow():
|
||||
for i in BulletBase.generate(
|
||||
ComponentManager.getBullet("VolcanoShadow"),
|
||||
launcher,
|
||||
textureSword.global_position,
|
||||
anchor.global_rotation,
|
||||
false, false, true, true
|
||||
):
|
||||
if i is VolcanoShadow:
|
||||
i.damage = damage
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
extends BulletBase
|
||||
class_name VolcanoShadow
|
||||
|
||||
func ai():
|
||||
speed = initialSpeed * (1 - animator.current_animation_position / animator.current_animation_length)
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
@@ -0,0 +1 @@
|
||||
uid://d2jh0hihcc0uj
|
||||
@@ -4,11 +4,14 @@ extends Weapon
|
||||
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||
origin["atk"] += 3 * to * soulLevel
|
||||
origin["rotate"] += 0.015 * to * soulLevel
|
||||
origin["life"] += 0.1 * to * soulLevel
|
||||
return origin
|
||||
func attack(entity: EntityBase):
|
||||
for j in BulletBase.generate(ComponentManager.getBullet("Volcano"), entity, entity.findWeaponAnchor("normal"), entity.position.angle_to_point(entity.get_global_mouse_position()), false, false, true, true):
|
||||
for j in BulletBase.generate(
|
||||
ComponentManager.getBullet("Volcano"),
|
||||
entity,
|
||||
entity.findWeaponAnchor("normal"),
|
||||
entity.position.angle_to_point(entity.get_global_mouse_position()), false, false, true, true
|
||||
):
|
||||
var bullet: Volcano = j
|
||||
bullet.damage = readStore("atk")
|
||||
bullet.rotates = readStore("rotate")
|
||||
bullet.lifeTime = readStore("life") * 1000
|
||||
|
||||
Reference in New Issue
Block a user