mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 07:50:22 +01:00
8 lines
187 B
GDScript
8 lines
187 B
GDScript
extends Area2D
|
|
|
|
export var _bounce_direction = 1
|
|
|
|
func _on_area_entered( area ):
|
|
if area.name == "Ball":
|
|
area.direction = (area.direction + Vector2(0, _bounce_direction)).normalized()
|