This commit is contained in:
Andriy Yednarovych
2026-02-22 19:26:26 +01:00
parent fd1ff19c4c
commit e877c5f058
211 changed files with 9385 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
class_name PushableStatute extends RigidBody2D
@onready var audio: AudioStreamPlayer2D = $AudioStreamPlayer2D
@export var push_speed := 30.0
var push_direction := Vector2.ZERO :
set = set_push
func _physics_process(_delta: float) -> void:
linear_velocity = push_direction * push_speed
func set_push(new_push_direction: Vector2) -> void:
push_direction = new_push_direction
if push_direction == Vector2.ZERO:
audio.stop()
else:
audio.play()