remove hardcoded node references in favor of exported properties
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
# https://forum.godotengine.org/t/how-to-set-all-3d-animation-tracks-to-nearest-interpolation/22056/4
|
||||
@tool
|
||||
extends AnimationPlayer
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
interpolation_change()
|
||||
|
||||
|
||||
func interpolation_change() -> void:
|
||||
for animation in get_animation_list():
|
||||
var anim_track_1: Animation = get_animation(animation)
|
||||
var count: int = anim_track_1.get_track_count()
|
||||
for i in count:
|
||||
anim_track_1.track_set_interpolation_type(
|
||||
i, Animation.INTERPOLATION_NEAREST
|
||||
)
|
||||
@@ -1 +0,0 @@
|
||||
uid://c8ocu8tvf2l6k
|
||||
@@ -1,26 +0,0 @@
|
||||
extends MeshInstance3D
|
||||
|
||||
@export var _swoop_effect_time: float = 0.25
|
||||
|
||||
var _swoop_effect_timer: float
|
||||
|
||||
@onready var _attack: PlayerAttack = $"../../Attack" as PlayerAttack
|
||||
|
||||
func _ready() -> void:
|
||||
mesh.radius = _attack.attack_radius
|
||||
mesh.height = _attack.attack_radius
|
||||
_attack.attacked.connect(_on_attack_attacked)
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if _swoop_effect_timer > 0:
|
||||
_swoop_effect_timer -= delta
|
||||
|
||||
(material_override as StandardMaterial3D).albedo_color = Color(
|
||||
1, 1, 1, _swoop_effect_timer / _swoop_effect_time
|
||||
)
|
||||
visible = _swoop_effect_timer > 0
|
||||
|
||||
|
||||
func _on_attack_attacked() -> void:
|
||||
_swoop_effect_timer = _swoop_effect_time
|
||||
@@ -1 +0,0 @@
|
||||
uid://bxsmma3kjo381
|
||||
Reference in New Issue
Block a user