2025-12-28 08:59:19 -05:00
|
|
|
extends Node3D
|
|
|
|
|
|
|
|
|
|
@onready var anim_player : AnimationPlayer = $AnimationPlayer
|
|
|
|
|
|
|
|
|
|
func _ready() -> void:
|
|
|
|
|
anim_player.play("default")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_timer_timeout() -> void:
|
|
|
|
|
print("Done")
|
|
|
|
|
queue_free()
|
2025-12-29 15:03:05 -05:00
|
|
|
|
|
|
|
|
func proximal_shake(distance : float) -> void:
|
|
|
|
|
print(Input.get_connected_joypads())
|
|
|
|
|
if !Game.player:
|
|
|
|
|
return
|
|
|
|
|
var d = global_position.distance_squared_to(Game.player.global_position)
|
|
|
|
|
if d <= distance * distance:
|
|
|
|
|
Input.start_joy_vibration(0, 1,1,1000)
|
|
|
|
|
|