mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-06 03:37:13 +08:00
feat(武器): 添加彩虹猫之刃武器及相关资源
添加彩虹猫之刃武器,包含以下内容: - 新增彩虹猫子弹和武器贴图资源 - 实现彩虹猫子弹和武器逻辑脚本 - 添加武器预制体和相关动画效果 - 在公鸡角色中默认装备该武器 - 修改子弹基类添加AI调用逻辑
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
extends BulletBase
|
||||
|
||||
func ai():
|
||||
PresetBulletAI.lockLauncher(self, launcher, true)
|
||||
@@ -0,0 +1,5 @@
|
||||
extends BulletBase
|
||||
class_name RainbowCat
|
||||
|
||||
func ai():
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
@@ -0,0 +1,13 @@
|
||||
@tool
|
||||
extends Weapon
|
||||
|
||||
func update(to, origin, _entity):
|
||||
origin["atk"] += 7 * to * soulLevel
|
||||
origin["count"] = 1 * soulLevel
|
||||
return origin
|
||||
func attack(entity: EntityBase):
|
||||
var weaponPos = entity.findWeaponAnchor("normal")
|
||||
for i in BulletBase.generate(preload("res://components/Bullets/Meowmere.tscn"), entity, weaponPos, weaponPos.angle_to_point(get_global_mouse_position())):
|
||||
i.damage = readStore("atk")
|
||||
for i in readStore("count"):
|
||||
BulletBase.generate(preload("res://components/Bullets/RainbowCat.tscn"), entity, weaponPos, weaponPos.angle_to_point(get_global_mouse_position()))
|
||||
Reference in New Issue
Block a user