mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-30 16:01:53 +08:00
feat: 添加新的角色Hen,更新Chick角色的攻击逻辑,增强Boss状态条和子弹功能
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
extends BulletBase
|
||||
class_name Diamond
|
||||
|
||||
func ai():
|
||||
rotation_degrees += 1
|
||||
forward(Vector2.from_angle(rotation))
|
||||
@@ -1,6 +1,17 @@
|
||||
extends EntityBase
|
||||
class_name Chick
|
||||
|
||||
var angle = 0
|
||||
func _ready():
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = 1000
|
||||
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.25
|
||||
super._ready()
|
||||
|
||||
func ai():
|
||||
move(currentFocusedBoss.position - position)
|
||||
if tryAttack(0):
|
||||
angle += 20
|
||||
func attack(type):
|
||||
if type == 0:
|
||||
var weaponPos = findWeaponAnchor("normal")
|
||||
BulletBase.generate(preload("res://components/Bullets/Diamond.tscn"), self, weaponPos, deg_to_rad(angle))
|
||||
|
||||
@@ -22,4 +22,4 @@ func sprint():
|
||||
move(Vector2(
|
||||
Input.get_axis("m_left", "m_right"),
|
||||
Input.get_axis("m_up", "m_down")
|
||||
) * 6, true)
|
||||
) * 8, true)
|
||||
|
||||
Reference in New Issue
Block a user