coopa improvement

This commit is contained in:
Jonas Braus
2024-08-03 01:26:19 +02:00
parent cf5153c10a
commit 4a64f30c57
+6 -3
View File
@@ -16,7 +16,10 @@ var is_down = false
@onready var ray_cast_right_3 = $RayCastRight3
func _ready():
collision_shape_2d.shape.height = 24
var coll = CapsuleShape2D.new()
coll.height = 24
coll.radius = 7
collision_shape_2d.shape = coll
func _physics_process(delta):
linear_velocity.x = speed
@@ -80,8 +83,8 @@ func f_shrink(body):
die_sound.play()
if not is_down:
speed = 0
#collision_shape_2d.shape.height -= 9
#die.position.y += 2
collision_shape_2d.shape.height -= 9
die.position.y += 2
animated_sprite_2d.play("shrink")
is_down = true
elif speed == 0: