level 2 - moving plattforms
level2 almost finished
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user