45193fc27f
- performance improvements - shake effect - keyboard support
16 lines
339 B
GDScript
16 lines
339 B
GDScript
extends Sprite2D
|
|
|
|
#var sca: float
|
|
var speed: float
|
|
|
|
# Initialisierung in der _ready Methode
|
|
func _ready() -> void:
|
|
speed = 10*randi_range(1, 5)
|
|
frame = randi_range(0,4)
|
|
self_modulate = Color(1,1,1,randf_range(0,0.5))
|
|
|
|
|
|
func _process(delta: float) -> void:
|
|
global_position.x -= speed * delta
|
|
if global_position.x < -30:
|
|
queue_free()
|