mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-01 17:01:53 +08:00
feat(武器): 添加齿轮回旋镖武器及其子弹效果
添加新的武器"齿轮回旋镖"及其配套子弹资源: 1. 实现齿轮武器的基本逻辑,包括攻击和属性计算 2. 添加齿轮子弹的旋转、减速和回旋行为 3. 包含相关资源文件(图片、场景、脚本) 4. 将新武器添加到公鸡角色的武器库中
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
@tool
|
||||
extends Weapon
|
||||
|
||||
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||
origin["atk"] += 2 * to * soulLevel
|
||||
origin["rotate"] += 1 * to * soulLevel
|
||||
return origin
|
||||
func attack(entity: EntityBase):
|
||||
var weaponPos = entity.findWeaponAnchor("normal")
|
||||
for bullet in BulletBase.generate(
|
||||
ComponentManager.getBullet("Cogwheel"),
|
||||
entity,
|
||||
weaponPos,
|
||||
weaponPos.angle_to_point(get_global_mouse_position()),
|
||||
):
|
||||
if bullet is CogwheelBullet:
|
||||
bullet.initialRotate = readStore("rotate")
|
||||
bullet.rotateSpeed = readStore("rotate")
|
||||
bullet.baseDamage = readStore("atk")
|
||||
return true
|
||||
@@ -0,0 +1 @@
|
||||
uid://nm2xleunwf4r
|
||||
Reference in New Issue
Block a user