mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-03 18:27:13 +08:00
feat(游戏平衡): 调整敌人生成和子弹行为
- 将敌人数量增长逻辑移至GameRule并调整计算公式 - 修改鸡的攻击行为,子弹现在会朝向玩家发射 - 调整子弹伤害值和旋转动画 - 减少玩家初始苹果数量并增加敌人掉落苹果数量 - 修改BOSS出现波数为第8波 - 移除无用属性和优化代码结构
This commit is contained in:
@@ -4,14 +4,16 @@ 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, randf_range(0, PI * 2))
|
||||
BulletBase.generate(preload("res://components/Bullets/Star.tscn"), self, weaponPos, (currentFocusedBoss.position - position).angle())
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user