forked from team-sg/hero-mark-2
10 lines
292 B
GDScript
10 lines
292 B
GDScript
extends Area2D
|
|
|
|
export var speed = 120.0
|
|
export var direction = Vector2.RIGHT
|
|
|
|
func _on_TubeEntrance_area_entered(area):
|
|
if area.is_in_group("player"):
|
|
var player = area.get_parent()
|
|
player.global_position = global_position + Vector2(4.0, 4.0)
|
|
player.enter_transport(speed, direction)
|