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

feat: 添加深海角色和木制子弹相关功能

添加深海角色及其攻击逻辑,包括两种攻击方式:
1. 随机发射水泥子弹
2. 向目标发射三发追踪木制子弹
新增木制子弹资源及脚本,实现追踪效果
调整武器树和波次配置,将深海加入测试波次
优化水泥子弹和筷子子弹的动画效果
This commit is contained in:
2026-04-05 14:23:47 +08:00
parent e61cfecdd3
commit 3691a06f8b
15 changed files with 380 additions and 14 deletions
+11
View File
@@ -0,0 +1,11 @@
extends BulletBase
class_name CementBullet
func succeedToHit(_dmg: float, _entity: EntityBase):
for i in 3:
BulletBase.generate(ComponentManager.getBullet("Kuaizi"), launcher, position + MathTool.sampleInCircle(50), deg_to_rad(90) + deg_to_rad(randf_range(-1, 1) * 10))
await TickTool.millseconds(200)
await TickTool.millseconds(1000)
tryDestroy()
func ai():
PresetBulletAI.forward(self , rotation)
+1
View File
@@ -0,0 +1 @@
uid://c1yuakupcia1u
+13
View File
@@ -0,0 +1,13 @@
extends BulletBase
class_name WoodBullet
var speedV2: Vector2 = Vector2.ZERO
func spawn():
speedV2 = Vector2.from_angle(rotation) * 10
func ai():
if is_instance_valid(launcher.currentFocusedBoss):
speedV2 += (launcher.currentFocusedBoss.position - launcher.position).normalized() * 1
speed = speedV2.length() / 2.0
rotation = speedV2.angle()
PresetBulletAI.forward(self , rotation)
+1
View File
@@ -0,0 +1 @@
uid://bkopn3gee3qp1
+8 -1
View File
@@ -5,8 +5,15 @@ 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
func ai():
PresetEntityAI.follow(self , currentFocusedBoss)
for i in 2:
tryAttack(i)
func attack(type: int):
if type == 0:
pass
BulletBase.generate(ComponentManager.getBullet("Cement"), self , position, deg_to_rad(randf_range(0, 360)))
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))
+7 -6
View File
@@ -32,11 +32,12 @@ static var WAVE_NORMAL = [
Wave.create("Bear", 0, 0, true, 29, INF, 23),
]
static var WAVE_TESTBOSS_ALL = [
Wave.create("Kernyr", 0, 0, true, 0, INF, 5),
Wave.create("CyberCat", 0, 0, true, 1, INF, 5),
Wave.create("Chick", 0, 0, true, 2, INF, 5),
Wave.create("KukeMC", 0, 0, true, 3, INF, 5),
Wave.create("Bear", 0, 0, true, 4, INF, 5),
Wave.create("Deepsea", 0, 0, true, 0, INF, 6),
Wave.create("Kernyr", 0, 0, true, 1, INF, 6),
Wave.create("CyberCat", 0, 0, true, 2, INF, 6),
Wave.create("Chick", 0, 0, true, 3, INF, 6),
Wave.create("KukeMC", 0, 0, true, 4, INF, 6),
Wave.create("Bear", 0, 0, true, 5, INF, 6),
]
static var WAVE_TESTBOSS_KUKE = [
Wave.create("KukeMC", 0, 0, true, 0, INF, 1),
@@ -59,7 +60,7 @@ static var WAVE_MOWING = [
]
static var WAVE_EMPTY = []
static var waveReleaseConfig = [WAVE_TESTBOSS_ALL, 1]
static var waveDebugConfig = [WAVE_MOWING, 1]
static var waveDebugConfig = [WAVE_TESTBOSS_ALL, 1]
static var current: int = startWith(waveReleaseConfig[1]) if WorldManager.isRelease() else startWith(waveDebugConfig[1])
static var data = waveReleaseConfig[0] if WorldManager.isRelease() else waveDebugConfig[0]