platformer-game-test/src/Items/Spring.gd

11 lines
252 B
GDScript3
Raw Normal View History

2020-11-05 02:13:24 +00:00
extends Node2D
export var thrust:float = 250
func _on_Area2D_body_entered(body: Node) -> void:
if body.name == "Player":
body.boost(Vector2(0, -thrust))
AudioManager.play_sfx(AudioManager.Sfx.SPRING)
2020-11-05 02:13:24 +00:00
$AnimationPlayer.play("activated")