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:
@@ -0,0 +1 @@
|
||||
extends BulletBase
|
||||
@@ -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))
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
extends EntityBase
|
||||
class_name Rooster
|
||||
|
||||
func _ready():
|
||||
super._ready()
|
||||
|
||||
func ai():
|
||||
texture.play("walk")
|
||||
var direction = Vector2(
|
||||
|
||||
Reference in New Issue
Block a user