2019-06-01 15:38:26 +00:00
|
|
|
extends Node2D
|
|
|
|
|
|
|
|
export var targetPosRot := [
|
|
|
|
Vector3(-2425.52002, -1513.22998, -0.682842),
|
|
|
|
Vector3(-1714.47998, -742.367004, 0.107902),
|
|
|
|
Vector3(-229.889008, -1378.040039, 0.107902),
|
|
|
|
Vector3(-1493.560059, -1456.449951, -1.13486),
|
|
|
|
Vector3(-757.916016, -681.47998, -0.297441),
|
|
|
|
Vector3(-1943.130005, -82.720901, -0.344115),
|
|
|
|
Vector3(-2418.840088, -1182.540039, -0.127431),
|
|
|
|
Vector3(-1613.47998, -497.794006, 0.663313),
|
|
|
|
Vector3(-192.798004, -1129.569946, 0.663313),
|
|
|
|
Vector3(-1486.880005, -1125.75, -0.579449),
|
|
|
|
Vector3(-576.434021, -112.779999, -0.579449),
|
|
|
|
Vector3(-755.335022, -350.783997, 0.211295),
|
|
|
|
Vector3(-1861, -1473.150024, -0.120897),
|
|
|
|
Vector3(-1125.359985, -698.182007, 0.669847),
|
|
|
|
Vector3(-2253.439941, -172.882996, 0.669847),
|
|
|
|
Vector3(-854.388977, -1449.02002, -0.572915),
|
|
|
|
Vector3(-197.494995, -641.395996, 0.217829),
|
|
|
|
Vector3(-1846.109985, -1109.640015, 0.604969),
|
|
|
|
Vector3(-1122.780029, -367.484985, 1.39571),
|
|
|
|
Vector3(-1390.01001, -1346.209961, 0.604969),
|
|
|
|
Vector3(-594.39502, -292.231995, 0.604969),
|
|
|
|
Vector3(-658.466003, -571.247986, 1.39571),
|
|
|
|
Vector3(-922.354004, -1085.660034, 0.152952),
|
|
|
|
Vector3(-1967.660034, -391.760986, 0.152952),
|
|
|
|
Vector3(-507.67099, -1035.630005, 0.152952),
|
|
|
|
Vector3(-231.824997, -286.092987, 0.943696),
|
|
|
|
Vector3(-1625.719971, -149.938004, 0.328764),
|
|
|
|
Vector3(-2111.530029, -1566.680054, -0.586263),
|
|
|
|
Vector3(-2408.820068, -888.583008, -1.19034),
|
|
|
|
Vector3(-1367.680054, -795.814026, 0.204481),
|
|
|
|
Vector3(92.306602, -1439.689941, 0.204481),
|
|
|
|
Vector3(-2095.879883, -572.008972, 0.204481),
|
|
|
|
Vector3(-1427.400024, -198.809998, -0.657498),
|
|
|
|
Vector3(-1179.560059, -1509.890015, -1.03828),
|
|
|
|
Vector3(-2015.709961, -869.302002, -1.03828),
|
|
|
|
Vector3(-555.723999, -1513.170044, -1.03828),
|
|
|
|
Vector3(-443.921997, -734.927002, -0.247536),
|
|
|
|
Vector3(-1629.140015, -136.167007, -0.247536),
|
|
|
|
Vector3(-1099.619995, -118.944, 0.149231),
|
|
|
|
Vector3(-2104.840088, -1235.97998, 0.139604),
|
|
|
|
Vector3(-2503.679932, -573.754028, -0.464474),
|
|
|
|
Vector3(-1361, -465.118011, 0.930348),
|
|
|
|
Vector3(98.987801, -1108.98999, 0.930348),
|
|
|
|
Vector3(-2476.290039, -155.207001, 0.930348),
|
|
|
|
Vector3(-1168.780029, -1179.189941, -0.141957),
|
|
|
|
Vector3(-291.14801, -71.900101, -0.141957),
|
|
|
|
Vector3(-2304.780029, -596.840027, -0.141957),
|
|
|
|
Vector3(-441.34201, -404.230011, 0.648787),
|
|
|
|
Vector3(-1690.640015, -1409.680054, -1.13599),
|
|
|
|
Vector3(-913.987976, -671.625, -0.345251),
|
|
|
|
Vector3(-2099.199951, -72.866203, -0.345251),
|
|
|
|
Vector3(-126.578003, -946.398987, -0.345251),
|
|
|
|
Vector3(-758.677979, -1352.890015, -1.58801),
|
|
|
|
Vector3(-27.137899, -577.929016, -0.797268),
|
|
|
|
Vector3(-1683.959961, -1078.97998, -0.410128),
|
|
|
|
Vector3(-851.437988, -61.913799, -0.410128),
|
|
|
|
Vector3(-952.419006, -304.019012, 0.20453),
|
|
|
|
Vector3(-747.895996, -1022.200012, -0.862145),
|
|
|
|
Vector3(-1933.109985, -423.437988, -0.506863),
|
|
|
|
Vector3(-24.5581, -193.917999, -0.071401)
|
|
|
|
]
|
|
|
|
|
|
|
|
export var cardTemplate : PackedScene = preload("res://Scenes/Loading/ScatterCard.tscn")
|
|
|
|
|
|
|
|
func scatter_in():
|
|
|
|
var index := 0
|
|
|
|
for tpr in targetPosRot:
|
|
|
|
var card: ScatterCard = cardTemplate.instance()
|
|
|
|
card.position = Vector2(200 + index * 3, 150 + index * 5)
|
|
|
|
card.rotation = -PI
|
|
|
|
add_child(card)
|
|
|
|
card.tweenTo(Vector2(tpr.x, tpr.y), tpr.z)
|
|
|
|
index += 1
|
|
|
|
|
|
|
|
func scatter_out():
|
|
|
|
for card in get_children():
|
2019-06-01 21:52:16 +00:00
|
|
|
card.tweenTo(Vector2((card.position.x / 2)-3000, (card.position.y)-1800), PI)
|
|
|
|
|
|
|
|
func cleanup():
|
|
|
|
for card in get_children():
|
|
|
|
card.queue_free()
|