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

feat(角色): 更新Kernyr角色行为和外观

- 修改Kernyr的攻击模式,增加3种攻击类型
- 更新角色贴图和显示名称
- 调整阳毅导弹的尺寸和动画效果
- 修复Diamond子弹追踪时的空引用问题
- 调整测试波次配置
This commit is contained in:
2026-03-26 22:39:12 +08:00
parent 88a0a18d7e
commit 73b3f9d569
5 changed files with 55 additions and 38 deletions
+3 -3
View File
@@ -4,6 +4,6 @@ class_name Diamond
const traceTime = 1500
func ai():
PresetBulletAI.forward(self, rotation)
if timeLived() < traceTime:
PresetBulletAI.trace(self, launcher.currentFocusedBoss.getTrackingAnchor(), 0.05)
PresetBulletAI.forward(self , rotation)
if timeLived() < traceTime && is_instance_valid(launcher.currentFocusedBoss):
PresetBulletAI.trace(self , launcher.currentFocusedBoss.getTrackingAnchor(), 0.05)
+25 -8
View File
@@ -1,21 +1,38 @@
extends EntityBase
class_name Kernyr
var attack1Angle = 0
var attack0State = 0
func register():
fields[FieldStore.Entity.MAX_HEALTH] = 2000
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.1
fields[FieldStore.Entity.OFFSET_SHOOT] = 20
attackCooldownMap[0] = 300
attackCooldownMap[0] = 1000
attackCooldownMap[1] = 100
attackCooldownMap[2] = 1000
func ai():
PresetEntityAI.follow(self , currentFocusedBoss)
tryAttack(0)
tryAttack(1)
tryAttack(2)
func attack(type: int):
if type == 0:
for bullet in BulletBase.generate(
var states = [
Vector2(-1, 1),
Vector2(1, 1),
Vector2(1, -1),
Vector2(-1, -1)
]
await sprintTo(currentFocusedBoss.position + 400 * states[attack0State % len(states)], 0.1)
attack0State += 1
BulletBase.generate(ComponentManager.getBullet("HeavyCrystal"), self , findWeaponAnchor("normal"), position.angle_to_point(currentFocusedBoss.position))
elif type == 1:
BulletBase.generate(
ComponentManager.getBullet("Yangyi"),
self ,
position,
position.angle_to_point(currentFocusedBoss.position)
):
if bullet is YangyiBullet:
pass
attack1Angle
)
attack1Angle += deg_to_rad(360.0 / 20)
elif type == 2:
for i in randi_range(7, 16):
BulletBase.generate(ComponentManager.getBullet("Diamond"), self , position + MathTool.sampleInCircle(20), rotation + deg_to_rad(randf_range(-90, 90)))
+4 -4
View File
@@ -38,19 +38,19 @@ static var WAVE_TESTBOSS_ALL = [
Wave.create("Bear", 0, 0, true, 2, INF, 3),
]
static var WAVE_TESTBOSS_KUKE = [
Wave.create("KukeMC", 0, 0, true, 0, INF, 10),
Wave.create("KukeMC", 0, 0, true, 0, INF, 1),
]
static var WAVE_TESTBOSS_BEAR = [
Wave.create("Bear", 0, 0, true, 0, INF, 10),
Wave.create("Bear", 0, 0, true, 0, INF, 1),
]
static var WAVE_TESTBOSS_CHICK = [
Wave.create("Chick", 0, 0, true, 0, INF, 10),
Wave.create("Chick", 0, 0, true, 0, INF, 1),
]
static var WAVE_JUSTJOKE = [
Wave.create("Kernyr", 0, 0, true, 0, INF, 1),
]
static var WAVE_EMPTY = []
static var data = WAVE_NORMAL if WorldManager.isRelease() else WAVE_TESTBOSS_KUKE
static var data = WAVE_NORMAL if WorldManager.isRelease() else WAVE_JUSTJOKE
static func create(
entity_: String,