mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(子弹): 添加BlockWall子弹类型并实现击退效果
为CyberCat角色添加新的攻击类型3,发射BlockWall子弹 修改子弹资源为长条形并调整碰撞形状 实现子弹命中后的击退效果
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
extends BulletBase
|
||||
class_name BlockWallBullet
|
||||
|
||||
func succeedToHit(_dmg: float, entity: EntityBase):
|
||||
entity.impluse(Vector2.from_angle(rotation) * 1000)
|
||||
@@ -0,0 +1 @@
|
||||
uid://b6bkhv8nc1ao3
|
||||
@@ -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
|
||||
|
||||
@@ -50,8 +50,8 @@ static var WAVE_TESTBOSS_CHICK = [
|
||||
]
|
||||
static var WAVE_JUSTJOKE = [
|
||||
# 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)
|
||||
Wave.create("CyberCat", 0, 0, true, 0, INF, 1),
|
||||
# Wave.create("Deepsea", 0, 0, true, 0, INF, 1)
|
||||
]
|
||||
static var WAVE_MOWING = [
|
||||
Wave.create("Hen", 15, 30, false, 0, INF, 1),
|
||||
|
||||
Reference in New Issue
Block a user