This commit is contained in:
PfandBoss
2022-12-10 04:11:58 +01:00
parent 701f0bfee9
commit f43307ac67
2 changed files with 38 additions and 15 deletions

View File

@@ -6,8 +6,8 @@ signal shoot
var t = 0.0
@onready var tween = create_tween() as Tween
@onready var p1 = $Player1Path/PathFollow3D
@onready var p2 = $Player2Path/PathFollow3D
@export var p1 : PathFollow3D
@export var p2 : PathFollow3D
func _ready():
@@ -16,8 +16,8 @@ func _ready():
func start_tween():
tween.set_trans(Tween.TRANS_LINEAR)
tween.set_parallel(true)
tween.tween_property(p1, "progress_ratio", 1, 5)
tween.tween_property(p2, "progress_ratio", -1, 5)
tween.tween_property(p1, "progress_ratio", 1, 20)
tween.tween_property(p2, "progress_ratio", -1, 20)
func _process(delta):
if round(p1.position.distance_to(p2.position)) == 9: