1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 08:21:54 +08:00

feat: 添加子弹生成和动画功能,创建铅笔子弹及其资源

This commit is contained in:
2025-08-27 13:30:50 +08:00
parent 873630e969
commit 28b86e8b1e
9 changed files with 219 additions and 4 deletions
+16
View File
@@ -1 +1,17 @@
extends EntityBase
class_name Bear
func ai():
pass
func attack(type):
if type == 0:
var weaponPos = findWeaponAnchor("normal")
return BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), self, weaponPos, (get_global_mouse_position() - weaponPos).angle())
func sprint():
move(Vector2(
Input.get_axis("m_left", "m_right"),
Input.get_axis("m_up", "m_down")
) * sprintMultiplier, true)
func heal(count: float):
health += count
DamageLabel.create(-count, false, damageAnchor.global_position + MathTool.randv2_range(GameRule.damageLabelSpawnOffset))
-3
View File
@@ -1,9 +1,6 @@
extends EntityBase
class_name Rooster
func _ready():
super._ready()
func ai():
texture.play("walk")
var direction = Vector2(