1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 16:31:54 +08:00

Add laser sound effect and implement BigLaser bullet behavior

- Added laserbig.ogg sound effect import configuration.
- Created BigLaser script extending BulletBase with AI targeting and dot application functionality.
This commit is contained in:
2025-08-27 19:59:05 +08:00
parent 561e12398a
commit a688fe3b44
12 changed files with 102 additions and 13 deletions
+6
View File
@@ -32,6 +32,7 @@ func _ready():
await animator.animation_finished
if autoLoopAnimation:
animator.play("loop")
dotLoop()
func _process(_delta: float) -> void:
if lifeTime > 0:
if Time.get_ticks_msec() - spawnInWhen >= lifeTime:
@@ -60,6 +61,9 @@ func fullPenerate():
return fields.get(FieldStore.Bullet.PENERATE) + launcher.fields.get(FieldStore.Entity.PENERATE)
func timeLived():
return Time.get_ticks_msec() - spawnInWhen
func dotLoop():
if await applyDot():
await dotLoop()
func ai():
pass
@@ -67,6 +71,8 @@ func destroy():
queue_free()
func spawn():
pass
func applyDot():
pass
static func generate(
bullet: PackedScene,
+1 -1
View File
@@ -83,7 +83,7 @@ func _physics_process(_delta: float) -> void:
if isPlayer() or is_instance_valid(currentFocusedBoss):
ai()
move_and_slide()
storeEnergy(0.05)
storeEnergy(0.01)
# 通用方法
func displace(direction: Vector2, isSprinting: bool = false):