mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-11 20:42:55 +08:00
refactor(Characters): 优化KukeMC的攻击逻辑和代码可读性
移除七彩飞星注释,简化攻击逻辑 重构紫色水晶子弹生成方式,增加旋转效果
This commit is contained in:
@@ -22,7 +22,7 @@ func ai():
|
|||||||
for bullet in get_tree().get_nodes_in_group("bullets"):
|
for bullet in get_tree().get_nodes_in_group("bullets"):
|
||||||
if (
|
if (
|
||||||
bullet is LGBTBullet and
|
bullet is LGBTBullet and
|
||||||
bullet.position.distance_to(self.position) < 200 # 酷可mc会去摧毁200半径以内的七彩飞星
|
bullet.position.distance_to(self.position) < 200
|
||||||
):
|
):
|
||||||
bullet.tryDestroy()
|
bullet.tryDestroy()
|
||||||
for i in len(attackCooldownMap.keys()):
|
for i in len(attackCooldownMap.keys()):
|
||||||
@@ -40,5 +40,7 @@ func attack(type):
|
|||||||
elif type == 2:
|
elif type == 2:
|
||||||
var count = randi_range(50, 60)
|
var count = randi_range(50, 60)
|
||||||
for i in count:
|
for i in count:
|
||||||
BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), self, findWeaponAnchor("normal"), 360.0 / count * i)
|
var count1 = 3
|
||||||
|
for j in count1:
|
||||||
|
BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), self, findWeaponAnchor("normal"), 360.0 / count * i + 360.0 / count1 * j)
|
||||||
await TickTool.millseconds(50)
|
await TickTool.millseconds(50)
|
||||||
|
|||||||
Reference in New Issue
Block a user