level 2 - moving plattforms

level2 almost finished
This commit is contained in:
Jonas Braus
2024-08-02 22:44:01 +02:00
parent a4476f2ce2
commit a706375da0
18 changed files with 46260 additions and 150 deletions
+6 -3
View File
@@ -10,6 +10,7 @@ extends RigidBody2D
@onready var ray_cast_right_2 = $RayCastRight2
var innocent = false
@onready var timer_2 = $Timer2
@onready var gumba = $"."
func _physics_process(delta):
linear_velocity.x = speed
@@ -41,10 +42,12 @@ func f_die():
animated_sprite_2d.play("die")
timer.start()
if die != null:
gumba.collision_layer = 32
die.queue_free()
die_sound.play()
ray_cast_left_2.queue_free()
ray_cast_right_2.queue_free()
die_sound.play()
ray_cast_left_2.queue_free()
ray_cast_right_2.queue_free()
func _on_die_body_entered(body):
f_die()