mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-30 16:01:53 +08:00
002ad98831
- 在EntityBase中修改findWeaponAnchor方法以支持空节点检查 - 实现熊角色的注册、生成和AI行为 - 添加熊角色的攻击动画和武器锚点 - 在Wave数据中添加熊角色作为Boss - 新增熊角色的子弹资源SunDance
18 lines
605 B
GDScript
18 lines
605 B
GDScript
extends EntityBase
|
|
class_name Bear # 攻击方式模仿泰拉瑞亚光之女皇
|
|
|
|
func register():
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 2000
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.25
|
|
attackCooldownMap[0] = 100
|
|
func spawn():
|
|
texture.play("walk")
|
|
func ai():
|
|
PresetEntityAI.follow(self, currentFocusedBoss, 0)
|
|
tryAttack(0)
|
|
func attack(type):
|
|
var weaponPos = findWeaponAnchor("normal")
|
|
if type == 0:
|
|
for bullet in BulletBase.generate(preload("res://components/Bullets/BossAttack/Bear/ArrowSeven.tscn"), self, weaponPos, deg_to_rad(randf_range(0, 360))):
|
|
bullet.tracer = currentFocusedBoss
|