mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-03 18:27:13 +08:00
refactor(Statemachine): 将FollowPosition重构为SyncTransform并增加缩放功能
feat(EnergyBlock): 添加新的攻击类型1并设置冷却时间 fix(Parrier): 修复子弹碰撞时的hitbox禁用问题 feat(Bullets): 添加新的SwingSword子弹资源 style(Wave): 调整调试配置使用测试小怪而非Boss
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
@tool
|
||||
extends Node2D
|
||||
|
||||
@export var target: Node2D
|
||||
|
||||
@export var offsetPosition: Vector2 = Vector2.ZERO
|
||||
@export var offsetRotation: float = 0.0
|
||||
@export var multipilerScale: Vector2 = Vector2.ONE
|
||||
|
||||
@export var enablePosition: bool = false
|
||||
@export var enableRotation: bool = false
|
||||
@export var enableScale: 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)
|
||||
if enableScale:
|
||||
global_scale = target.global_scale * multipilerScale
|
||||
Reference in New Issue
Block a user