coopa improvement
This commit is contained in:
@@ -16,7 +16,10 @@ var is_down = false
|
|||||||
@onready var ray_cast_right_3 = $RayCastRight3
|
@onready var ray_cast_right_3 = $RayCastRight3
|
||||||
|
|
||||||
func _ready():
|
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):
|
func _physics_process(delta):
|
||||||
linear_velocity.x = speed
|
linear_velocity.x = speed
|
||||||
@@ -80,8 +83,8 @@ func f_shrink(body):
|
|||||||
die_sound.play()
|
die_sound.play()
|
||||||
if not is_down:
|
if not is_down:
|
||||||
speed = 0
|
speed = 0
|
||||||
#collision_shape_2d.shape.height -= 9
|
collision_shape_2d.shape.height -= 9
|
||||||
#die.position.y += 2
|
die.position.y += 2
|
||||||
animated_sprite_2d.play("shrink")
|
animated_sprite_2d.play("shrink")
|
||||||
is_down = true
|
is_down = true
|
||||||
elif speed == 0:
|
elif speed == 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user