mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-01 17:01:53 +08:00
feat(人物): 添加熊角色及其攻击逻辑
- 在EntityBase中修改findWeaponAnchor方法以支持空节点检查 - 实现熊角色的注册、生成和AI行为 - 添加熊角色的攻击动画和武器锚点 - 在Wave数据中添加熊角色作为Boss - 新增熊角色的子弹资源SunDance
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
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():
|
||||
pass
|
||||
PresetEntityAI.follow(self, currentFocusedBoss, 0)
|
||||
tryAttack(0)
|
||||
func attack(type):
|
||||
var weaponPos = findWeaponAnchor("normal")
|
||||
if type == 0:
|
||||
pass
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user