[gd_scene load_steps=6 format=2]

[ext_resource path="res://assets/trolley-lg.png" type="Texture" id=1]
[ext_resource path="res://scripts/trolley.gd" type="Script" id=2]

[sub_resource type="CircleShape2D" id=4]
radius = 172.29

[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 38, 10 )

[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 44.5, 8.25 )

[node name="Trolley" type="KinematicBody2D"]
collision_layer = 4
script = ExtResource( 2 )

[node name="TrolleySurroundingArea" type="Area2D" parent="."]

[node name="CollisionShape2D" type="CollisionShape2D" parent="TrolleySurroundingArea"]
position = Vector2( 0, -45 )
shape = SubResource( 4 )

[node name="TrolleySeatArea" type="Area2D" parent="."]
collision_layer = 0

[node name="SeatAreaShape" type="CollisionShape2D" parent="TrolleySeatArea"]
position = Vector2( -1, -41 )
shape = SubResource( 2 )

[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -70 )
scale = Vector2( 6, 6 )
texture = ExtResource( 1 )

[node name="TrolleyShape" type="CollisionPolygon2D" parent="."]
position = Vector2( 0, -64 )
scale = Vector2( 0.8, 0.8 )
polygon = PoolVector2Array( 172, -5, 198, 106, 150, 106, 122, 127, 74, 109, 46, 83, 43.75, 16.25, -46.25, 16.25, -48, 48, -48, 84, -78, 110, -114, 127, -148, 107, -197, 107, -163, 5, -163, -72, 165, -72 )

[node name="TrolleyClosedShape" type="CollisionShape2D" parent="."]
position = Vector2( 0, -2.25 )
shape = SubResource( 3 )

[connection signal="body_shape_exited" from="TrolleySurroundingArea" to="." method="_on_TrolleySurroundingArea_body_exited"]
[connection signal="body_entered" from="TrolleySeatArea" to="." method="_on_TrolleySeatArea_body_entered"]
