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

feat: 添加SCBlock和Bengbeng子弹类型及相关资源

feat(角色): 为Kernyr和CyberCat添加新攻击类型

refactor(角色): 更新Kernyr角色贴图和显示名称

feat(关卡): 调整测试关卡配置和敌人波次

style: 更新子弹资源文件及导入配置
This commit is contained in:
2026-04-04 21:07:16 +08:00
parent c413744dbf
commit b343708b3b
35 changed files with 716 additions and 18 deletions
+12
View File
@@ -0,0 +1,12 @@
extends BulletBase
class_name BengbengBullet
func spawn():
hitbox.disabled = true
func ai():
texture.global_rotation = 0
PresetBulletAI.forward(self , position.angle_to_point(launcher.currentFocusedBoss.position))
if is_instance_valid(launcher.currentFocusedBoss):
if launcher.currentFocusedBoss.position.distance_to(position) < 125 && hitbox.disabled:
EffectController.create(ComponentManager.getEffect("NuclearExplosion"), position).shot()
hitbox.disabled = false
+1
View File
@@ -0,0 +1 @@
uid://ddgydi8qj3t40
+28
View File
@@ -0,0 +1,28 @@
extends BulletBase
class_name SCBlockBullet
var speedV2 = Vector2.ZERO
func register():
speedV2 = Vector2(
(launcher.currentFocusedBoss.position - launcher.position)
.sign().x
* randf_range(-0.25, 1)
* 100,
-50
)
func spawn():
var staticTexture = texture.get_node_or_null("static")
if staticTexture is Sprite2D:
var text = load("res://resources/bullets/scblock/%d.png" % randi_range(0, 8))
staticTexture.texture = text
var trail = staticTexture.get_node_or_null("trail")
if trail is GPUParticles2D:
trail.texture = text
func ai():
rotation = speedV2.angle()
speed = speedV2.length()
PresetBulletAI.trace(self , position + Vector2.from_angle(deg_to_rad(90)), lifeTimePercent() / 15)
PresetBulletAI.forward(self , rotation)
speedV2 *= 0.95
speedV2 += Vector2(0, 1)
+1
View File
@@ -0,0 +1 @@
uid://cek16mji13xpe
+21
View File
@@ -0,0 +1,21 @@
extends EntityBase
class_name CyberCatEntity
func register():
fields[FieldStore.Entity.MAX_HEALTH] = 1500
fields[FieldStore.Entity.OFFSET_SHOOT] = 0
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.2
attackCooldownMap[0] = 6000
attackCooldownMap[1] = 10000
attackCooldownMap[2] = 100
func ai():
PresetEntityAI.follow(self , currentFocusedBoss)
for i in 3:
tryAttack(i)
func attack(type: int):
if type == 0:
BulletBase.generate(ComponentManager.getBullet("Bengbeng"), self , position, 0)
elif type == 1:
heal(percentHealth(0.05))
elif type == 2:
BulletBase.generate(ComponentManager.getBullet("SCBlock"), self , position, 0)
@@ -0,0 +1 @@
uid://cnqdjw7i7noxk
+4
View File
@@ -11,10 +11,12 @@ func register():
attackCooldownMap[0] = 2000
attackCooldownMap[1] = 100
attackCooldownMap[2] = 10000
attackCooldownMap[3] = 4500
attackMutexes = [2]
func ai():
for i in 3:
tryAttack(i, [2])
# tryAttack(3)
func attack(type: int):
if type == 0:
for i in randi_range(7, 16):
@@ -62,3 +64,5 @@ func attack(type: int):
await TickTool.frame()
await TickTool.millseconds(2000)
await chargeUp()
elif type == 3:
BulletBase.generate(ComponentManager.getBullet("Bengbeng"), self , position, 0)
+11 -8
View File
@@ -23,18 +23,20 @@ func duplicate() -> Wave:
return wave
static var WAVE_NORMAL = [
Wave.create("Hen", 1, 3, false, 0, INF, 3),
Wave.create("Hen", 1, 3, false, 2, INF, 1),
Wave.create("Cat", 1, 5, false, 0, INF, 1),
Wave.create("Dog", 1, 2, false, 0, INF, 5),
Wave.create("MTY", 0, 1, false, 4, INF, 7),
Wave.create("Dog", 1, 2, false, 4, INF, 1),
Wave.create("MTY", 0, 1, false, 6, INF, 7),
Wave.create("Chick", 0, 0, true, 9, INF, 20),
Wave.create("KukeMC", 0, 0, true, 19, INF, 20),
Wave.create("Bear", 0, 0, true, 29, INF, 23),
]
static var WAVE_TESTBOSS_ALL = [
Wave.create("Chick", 0, 0, true, 0, INF, 3),
Wave.create("KukeMC", 0, 0, true, 1, INF, 3),
Wave.create("Bear", 0, 0, true, 2, INF, 3),
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),
]
static var WAVE_TESTBOSS_KUKE = [
Wave.create("KukeMC", 0, 0, true, 0, INF, 1),
@@ -46,7 +48,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("Kernyr", 0, 0, true, 0, INF, 2),
Wave.create("CyberCat", 0, 0, true, 1, INF, 2)
]
static var WAVE_MOWING = [
Wave.create("Hen", 15, 30, false, 0, INF, 1),
@@ -55,7 +58,7 @@ static var WAVE_MOWING = [
Wave.create("MTY", 1, 5, false, 0, INF, 1),
]
static var WAVE_EMPTY = []
static var waveConfig = [WAVE_MOWING, 1]
static var waveConfig = [WAVE_TESTBOSS_ALL, 1]
static var current: int = startWith(1) if WorldManager.isRelease() else startWith(waveConfig[1])
static var data = WAVE_NORMAL if WorldManager.isRelease() else waveConfig[0]