mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
1a78d5b82b
添加新的子弹资源包括道里(daoli)和母体(mother)的图片,以及相关音效文件(sddl.wav和xiangkan.wav) 为Deepsea角色调整攻击冷却时间并添加攻击音效 优化Wood子弹的行为逻辑,增加子弹发射效果 新增BlockWall子弹类型及其资源文件
21 lines
690 B
GDScript
21 lines
690 B
GDScript
extends EntityBase
|
|
class_name DeepseaEntity
|
|
|
|
func register():
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 2000
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.9
|
|
fields[FieldStore.Entity.OFFSET_SHOOT] = 2
|
|
attackCooldownMap[0] = 2000
|
|
attackCooldownMap[1] = 5000
|
|
func ai():
|
|
PresetEntityAI.follow(self , currentFocusedBoss)
|
|
for i in 2:
|
|
tryAttack(i)
|
|
func attack(type: int):
|
|
if type == 0:
|
|
BulletBase.generate(ComponentManager.getBullet("Cement"), self , position, deg_to_rad(randf_range(0, 360)))
|
|
elif type == 1:
|
|
for i in 3:
|
|
BulletBase.generate(ComponentManager.getBullet("Wood"), self , position, position.angle_to_point(currentFocusedBoss.position) + i * deg_to_rad(20))
|
|
return true
|