1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-07 04:07:13 +08:00

Add audio effect and implement FireScan bullet behavior

- Added Rip.wav audio effect to the project.
- Created FireScan bullet script with speed and damage properties.
- Implemented basic AI movement for FireScan bullets.
- Introduced Wave class for managing enemy waves with dynamic counts and spawning logic.
This commit is contained in:
2025-08-26 17:28:20 +08:00
parent 66413bd75d
commit 9a10e87cb0
17 changed files with 283 additions and 70 deletions
+14 -2
View File
@@ -1,7 +1,10 @@
extends EntityBase
class_name Chick
@onready var firepot = $"%firepot"
var angle = 0
func _ready():
fields[FieldStore.Entity.MAX_HEALTH] = 1000
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.1
@@ -9,9 +12,18 @@ func _ready():
func ai():
move(currentFocusedBoss.position - position)
if tryAttack(0):
angle += 20
if currentFocusedBoss.position.distance_to(position) < 300:
tryAttack(1)
else:
if tryAttack(0):
angle += 20
func attack(type):
if type == 0:
var weaponPos = findWeaponAnchor("normal")
BulletBase.generate(preload("res://components/Bullets/Diamond.tscn"), self, weaponPos, deg_to_rad(angle))
elif type == 1:
var weaponPos = findWeaponAnchor("normal")
var target = weaponPos.angle_to_point(currentFocusedBoss.position)
firepot.global_rotation = target
firepot.shot()
BulletBase.generate(preload("res://components/Bullets/FireScan.tscn"), self, weaponPos, target)
+4
View File
@@ -1,6 +1,10 @@
extends EntityBase
class_name Rooster
func _ready():
fields[FieldStore.Entity.MAX_HEALTH] = 500
super._ready()
func ai():
texture.play("walk")
var direction = Vector2(