10 lines
216 B
GDScript3
10 lines
216 B
GDScript3
|
extends Node2D
|
||
|
|
||
|
export var thrust:float = 250
|
||
|
|
||
|
|
||
|
func _on_Area2D_body_entered(body: Node) -> void:
|
||
|
if body.name == "Player":
|
||
|
body.boost(Vector2(body._velocity.x, -thrust))
|
||
|
$AnimationPlayer.play("activated")
|