1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00

feat(子弹): 添加BlockWall子弹类型并实现击退效果

为CyberCat角色添加新的攻击类型3,发射BlockWall子弹
修改子弹资源为长条形并调整碰撞形状
实现子弹命中后的击退效果
This commit is contained in:
2026-04-05 21:09:47 +08:00
parent 1a78d5b82b
commit 1910f10e9a
6 changed files with 153 additions and 4 deletions
+7
View File
@@ -8,10 +8,12 @@ func register():
attackCooldownMap[0] = 6000
attackCooldownMap[1] = 10000
attackCooldownMap[2] = 100
attackCooldownMap[3] = 200
func ai():
PresetEntityAI.follow(self , currentFocusedBoss)
for i in 3:
tryAttack(i)
PresetEntityAI.distanceAttack(self , currentFocusedBoss, 1000, INF, 3)
func attack(type: int):
if type == 0:
BulletBase.generate(ComponentManager.getBullet("Bengbeng"), self , position, 0)
@@ -19,3 +21,8 @@ func attack(type: int):
heal(percentHealth(0.05))
elif type == 2:
BulletBase.generate(ComponentManager.getBullet("SCBlock"), self , position, 0)
elif type == 3:
for bullet in BulletBase.generate(ComponentManager.getBullet("BlockWall"), self , currentFocusedBoss.hurtbox.global_position, 0):
if bullet is BlockWallBullet:
bullet.look_at(position)
bullet.position -= Vector2.from_angle(bullet.rotation) * 100