level 5
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
extends Node2D
|
||||
@onready var animated_sprite_2d = $AnimatedSprite2D
|
||||
@onready var collision_shape_2d = $StaticBody2D/CollisionShape2D
|
||||
|
||||
func _on_area_2d_body_entered(body):
|
||||
animated_sprite_2d.play("down")
|
||||
body.JUMPt_velocity *= 1.6
|
||||
animated_sprite_2d.position.y += 8
|
||||
collision_shape_2d.position.y += 8
|
||||
collision_shape_2d.shape.size.y -= 16
|
||||
|
||||
|
||||
func _on_area_2d_body_exited(body):
|
||||
animated_sprite_2d.play("default")
|
||||
body.JUMPt_velocity /= 1.6
|
||||
animated_sprite_2d.position.y -= 8
|
||||
collision_shape_2d.position.y -= 8
|
||||
collision_shape_2d.shape.size.y += 16
|
||||
Reference in New Issue
Block a user