mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(战斗): 添加剑砍特效并重构火山子弹碰撞检测
- 新增剑砍音效及特效资源 - 为火山子弹添加命中时触发剑砍特效 - 使用FollowPosition组件重构碰撞检测逻辑 - 简化动画轨道和碰撞体配置
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
@tool
|
||||
extends Node2D
|
||||
|
||||
@export var target: Node2D
|
||||
@export var offsetPosition: Vector2 = Vector2.ZERO
|
||||
@export var offsetRotation: float = 0.0
|
||||
@export var enablePosition: bool = false
|
||||
@export var enableRotation: bool = false
|
||||
|
||||
func _process(_delta):
|
||||
if is_instance_valid(target):
|
||||
if enablePosition:
|
||||
global_position = target.global_position + offsetPosition
|
||||
if enableRotation:
|
||||
global_rotation = target.global_rotation + deg_to_rad(offsetRotation)
|
||||
@@ -0,0 +1 @@
|
||||
uid://ckc6guqib3rno
|
||||
Reference in New Issue
Block a user