-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcar_chase.tscn
85 lines (67 loc) · 2.92 KB
/
car_chase.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
[gd_scene load_steps=9 format=3 uid="uid://c3dduj02yv8lj"]
[ext_resource type="Script" path="res://car_chase.gd" id="1_hw11o"]
[ext_resource type="PackedScene" uid="uid://dygdljn57s6ms" path="res://segements/segment_1.tscn" id="2_0bisj"]
[ext_resource type="PackedScene" uid="uid://1ttu6tdabpom" path="res://hud.tscn" id="3_tyk61"]
[ext_resource type="PackedScene" uid="uid://caq4ujq27osce" path="res://police_car.tscn" id="3_xu5jf"]
[ext_resource type="PackedScene" uid="uid://cgw367utsoohc" path="res://game_over_screen.tscn" id="4_ayib8"]
[ext_resource type="Script" path="res://despawn area.gd" id="4_y20er"]
[ext_resource type="PackedScene" uid="uid://cm7a1o03w3tm8" path="res://civilian_car.tscn" id="6_ill3w"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_yv1b5"]
size = Vector2(387, 23)
[node name="Car Chase" type="Node2D" node_paths=PackedStringArray("camera")]
script = ExtResource("1_hw11o")
segments = Array[PackedScene]([ExtResource("2_0bisj")])
offset = 30
camera = NodePath("Camera2D")
[node name="UILayer" type="CanvasLayer" parent="."]
follow_viewport_enabled = true
[node name="HUD" parent="UILayer" instance=ExtResource("3_tyk61")]
anchors_preset = 0
anchor_right = 0.0
anchor_bottom = 0.0
offset_left = -300.0
offset_top = -216.0
offset_right = 300.0
offset_bottom = 216.0
grow_horizontal = 1
grow_vertical = 1
[node name="GameOverScreen" parent="UILayer" instance=ExtResource("4_ayib8")]
visible = false
anchors_preset = -1
anchor_left = -0.333
anchor_top = -0.333
anchor_right = 0.333
anchor_bottom = 0.333
offset_left = -0.299988
offset_top = -0.216003
offset_right = 0.299988
offset_bottom = 0.216003
[node name="Police Car" parent="." instance=ExtResource("3_xu5jf")]
z_index = 2
position = Vector2(0, 79)
scale = Vector2(0.45, 0.45)
[node name="Camera2D" type="Camera2D" parent="."]
zoom = Vector2(1.5, 1.5)
[node name="segment1" parent="." instance=ExtResource("2_0bisj")]
position = Vector2(0, -233)
[node name="Far Right" type="Marker2D" parent="."]
position = Vector2(69, -233)
[node name="Middle Right" type="Marker2D" parent="."]
position = Vector2(25, -233)
[node name="Middle Left" type="Marker2D" parent="."]
position = Vector2(-25, -233)
[node name="Far Left" type="Marker2D" parent="."]
position = Vector2(-69, -233)
[node name="Timer" type="Timer" parent="."]
wait_time = 1.5
autostart = true
[node name="despawn area" type="Area2D" parent="."]
position = Vector2(0, 266)
script = ExtResource("4_y20er")
[node name="CollisionShape2D" type="CollisionShape2D" parent="despawn area"]
shape = SubResource("RectangleShape2D_yv1b5")
[node name="Civilian Car" parent="." instance=ExtResource("6_ill3w")]
position = Vector2(554, 4)
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
[connection signal="area_shape_entered" from="despawn area" to="Civilian Car" method="_on_despawn_area_area_shape_entered"]
[connection signal="body_entered" from="despawn area" to="despawn area" method="_on_body_entered"]