mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
a572a77eda
- 将敌人数量增长逻辑移至GameRule并调整计算公式 - 修改鸡的攻击行为,子弹现在会朝向玩家发射 - 调整子弹伤害值和旋转动画 - 减少玩家初始苹果数量并增加敌人掉落苹果数量 - 修改BOSS出现波数为第8波 - 移除无用属性和优化代码结构
20 lines
574 B
GDScript
20 lines
574 B
GDScript
extends EntityBase
|
|
class_name Hen
|
|
|
|
func _ready():
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 75
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.25
|
|
fields[FieldStore.Entity.OFFSET_SHOOT] = 10
|
|
super._ready()
|
|
|
|
func ai():
|
|
cooldownUnit = randi_range(1500, 4000)
|
|
move(currentFocusedBoss.position - position)
|
|
tryAttack(0)
|
|
func attack(type):
|
|
if type == 0:
|
|
var weaponPos = findWeaponAnchor("normal")
|
|
for i in randi_range(1, 4):
|
|
BulletBase.generate(preload("res://components/Bullets/Star.tscn"), self, weaponPos, (currentFocusedBoss.position - position).angle())
|
|
return true
|