|
@ -3,15 +3,13 @@ extends Node3D |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@export var block_tilt: float = 15.0 |
|
|
@export var block_tilt: float = 15.0 |
|
|
@export var bounce_height: float = 0.25 |
|
|
|
|
|
@export var bounce_duration: float = 1.0 |
|
|
|
|
|
|
|
|
#@export var bounce_height: float = 0.25 |
|
|
|
|
|
#@export var bounce_duration: float = 1.0 |
|
|
@export var spin_duration: float = 2.0 |
|
|
@export var spin_duration: float = 2.0 |
|
|
@export var block_size_scale: float = 0.25 |
|
|
@export var block_size_scale: float = 0.25 |
|
|
|
|
|
|
|
|
@onready var start_position: Vector3 = self.position |
|
|
@onready var start_position: Vector3 = self.position |
|
|
|
|
|
|
|
|
var tween: Tween |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func drop_block(block_id: String) -> void: |
|
|
func drop_block(block_id: String) -> void: |
|
|
_create_block(block_id) |
|
|
_create_block(block_id) |
|
@ -30,7 +28,7 @@ func _create_block(block_id: String) -> void: |
|
|
block.collision_shape.disabled = true |
|
|
block.collision_shape.disabled = true |
|
|
|
|
|
|
|
|
func _run_animation() -> void: |
|
|
func _run_animation() -> void: |
|
|
tween = create_tween().set_loops() |
|
|
|
|
|
|
|
|
var tween: Tween = create_tween().set_loops() |
|
|
tween.tween_property( |
|
|
tween.tween_property( |
|
|
self, |
|
|
self, |
|
|
"rotation_degrees", |
|
|
"rotation_degrees", |
|
|