mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(子弹系统): 新增道里和母体子弹资源及音效
添加新的子弹资源包括道里(daoli)和母体(mother)的图片,以及相关音效文件(sddl.wav和xiangkan.wav) 为Deepsea角色调整攻击冷却时间并添加攻击音效 优化Wood子弹的行为逻辑,增加子弹发射效果 新增BlockWall子弹类型及其资源文件
This commit is contained in:
@@ -2,12 +2,32 @@ extends BulletBase
|
||||
class_name WoodBullet
|
||||
|
||||
var speedV2: Vector2 = Vector2.ZERO
|
||||
var shooted: bool = false
|
||||
|
||||
@onready var mother: Node2D = $%mother
|
||||
@onready var daoli: Node2D = $%daoli
|
||||
|
||||
func spawn():
|
||||
speedV2 = Vector2.from_angle(rotation) * 10
|
||||
func ai():
|
||||
mother.global_rotation = 0
|
||||
daoli.global_rotation = 0
|
||||
if is_instance_valid(launcher.currentFocusedBoss):
|
||||
speedV2 += (launcher.currentFocusedBoss.position - launcher.position).normalized() * 1
|
||||
speedV2 += (launcher.currentFocusedBoss.position - launcher.position).normalized() * 1.0
|
||||
speed = speedV2.length() / 2.0
|
||||
rotation = speedV2.angle()
|
||||
PresetBulletAI.forward(self , rotation)
|
||||
if !shooted && launcher.currentFocusedBoss.position.distance_to(daoli.global_position) < 300:
|
||||
animator.play("xiangkan")
|
||||
for i in randf_range(2, 6):
|
||||
for bullet in BulletBase.generate(
|
||||
ComponentManager.getBullet("Diamond"),
|
||||
launcher,
|
||||
daoli.global_position + MathTool.sampleInCircle(20),
|
||||
0
|
||||
):
|
||||
if bullet is Diamond:
|
||||
bullet.look_at(launcher.currentFocusedBoss.position)
|
||||
bullet.rotation += deg_to_rad(180)
|
||||
bullet.rotation += deg_to_rad(randf_range(-1, 1) * 45)
|
||||
shooted = true
|
||||
|
||||
@@ -5,8 +5,8 @@ func register():
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = 2000
|
||||
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.9
|
||||
fields[FieldStore.Entity.OFFSET_SHOOT] = 2
|
||||
attackCooldownMap[0] = 1000
|
||||
attackCooldownMap[1] = 2000
|
||||
attackCooldownMap[0] = 2000
|
||||
attackCooldownMap[1] = 5000
|
||||
func ai():
|
||||
PresetEntityAI.follow(self , currentFocusedBoss)
|
||||
for i in 2:
|
||||
@@ -17,3 +17,4 @@ func attack(type: int):
|
||||
elif type == 1:
|
||||
for i in 3:
|
||||
BulletBase.generate(ComponentManager.getBullet("Wood"), self , position, position.angle_to_point(currentFocusedBoss.position) + i * deg_to_rad(20))
|
||||
return true
|
||||
|
||||
@@ -49,8 +49,8 @@ static var WAVE_TESTBOSS_CHICK = [
|
||||
Wave.create("Chick", 0, 0, true, 0, INF, 1),
|
||||
]
|
||||
static var WAVE_JUSTJOKE = [
|
||||
Wave.create("Kernyr", 0, 0, true, 0, INF, 1),
|
||||
Wave.create("CyberCat", 0, 0, true, 0, INF, 1),
|
||||
# Wave.create("Kernyr", 0, 0, true, 0, INF, 1),
|
||||
# Wave.create("CyberCat", 0, 0, true, 0, INF, 1),
|
||||
Wave.create("Deepsea", 0, 0, true, 0, INF, 1)
|
||||
]
|
||||
static var WAVE_MOWING = [
|
||||
|
||||
Reference in New Issue
Block a user