DuckRun/code/screen.gd
megamichi 45193fc27f - adding coins
- performance improvements
- shake effect
- keyboard support
2024-11-04 19:10:10 +01:00

9 lines
230 B
GDScript

extends Node2D
func shake(intensity):
var preview_pos = global_position
for x in range(14):
global_position.y = randi_range(0-intensity,intensity)
await get_tree().create_timer(0.02).timeout
global_position = preview_pos