]> Untitled Git - lightcycles.git/blob - map/world.tscn
Added map split screen
[lightcycles.git] / map / world.tscn
1 [gd_scene load_steps=11 format=3 uid="uid://6tmryoxhs3yq"]
2
3 [ext_resource type="PackedScene" uid="uid://dysxftv7xniv0" path="res://player/player.tscn" id="1_3tqxd"]
4 [ext_resource type="Script" path="res://map/world.gd" id="1_mjcfj"]
5 [ext_resource type="Texture2D" uid="uid://cp8pv6wya3ep2" path="res://textures/untextured.png" id="2_sxhh7"]
6 [ext_resource type="Script" path="res://map/split_screen_container.gd" id="4_nc5g8"]
7
8 [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ul8mq"]
9 albedo_color = Color(0.199732, 0.199732, 0.199732, 1)
10 albedo_texture = ExtResource("2_sxhh7")
11 uv1_scale = Vector3(0.5, 0.5, 0.5)
12 uv1_triplanar = true
13 uv1_world_triplanar = true
14 texture_filter = 0
15
16 [sub_resource type="PlaneMesh" id="PlaneMesh_43sel"]
17 material = SubResource("StandardMaterial3D_ul8mq")
18 size = Vector2(50, 50)
19
20 [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_t6tpe"]
21 data = PackedVector3Array(25, 0, 25, -25, 0, 25, 25, 0, -25, -25, 0, 25, -25, 0, -25, 25, 0, -25)
22
23 [sub_resource type="PlaneMesh" id="PlaneMesh_0exak"]
24 size = Vector2(10, 50)
25
26 [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_qttgn"]
27 data = PackedVector3Array(5, 0, 25, -5, 0, 25, 5, 0, -25, -5, 0, 25, -5, 0, -25, 5, 0, -25)
28
29 [sub_resource type="Environment" id="Environment_h5n2a"]
30
31 [node name="World" type="Node3D"]
32 script = ExtResource("1_mjcfj")
33
34 [node name="map" type="Node3D" parent="."]
35
36 [node name="DirectionalLight3D" type="DirectionalLight3D" parent="map"]
37 transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 10, 0)
38 shadow_enabled = true
39
40 [node name="ground" type="MeshInstance3D" parent="map"]
41 mesh = SubResource("PlaneMesh_43sel")
42 skeleton = NodePath("../..")
43
44 [node name="StaticBody3D" type="StaticBody3D" parent="map/ground"]
45
46 [node name="CollisionShape3D" type="CollisionShape3D" parent="map/ground/StaticBody3D"]
47 shape = SubResource("ConcavePolygonShape3D_t6tpe")
48
49 [node name="wall" type="MeshInstance3D" parent="map"]
50 transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 25, 5, 0)
51 mesh = SubResource("PlaneMesh_0exak")
52 skeleton = NodePath("../..")
53
54 [node name="StaticBody3D" type="StaticBody3D" parent="map/wall"]
55
56 [node name="CollisionShape3D" type="CollisionShape3D" parent="map/wall/StaticBody3D"]
57 shape = SubResource("ConcavePolygonShape3D_qttgn")
58
59 [node name="wall2" type="MeshInstance3D" parent="map"]
60 transform = Transform3D(4.37114e-08, 1, 8.74228e-08, 1, -4.37114e-08, 0, 3.82137e-15, 8.74228e-08, -1, -25, 5, 0)
61 mesh = SubResource("PlaneMesh_0exak")
62 skeleton = NodePath("../..")
63
64 [node name="StaticBody3D" type="StaticBody3D" parent="map/wall2"]
65
66 [node name="CollisionShape3D" type="CollisionShape3D" parent="map/wall2/StaticBody3D"]
67 shape = SubResource("ConcavePolygonShape3D_qttgn")
68
69 [node name="wall3" type="MeshInstance3D" parent="map"]
70 transform = Transform3D(-5.73206e-15, -1.31134e-07, 1, 1, -4.37114e-08, 0, 4.37114e-08, 1, 1.31134e-07, 0, 5, -25)
71 mesh = SubResource("PlaneMesh_0exak")
72 skeleton = NodePath("../..")
73
74 [node name="StaticBody3D" type="StaticBody3D" parent="map/wall3"]
75
76 [node name="CollisionShape3D" type="CollisionShape3D" parent="map/wall3/StaticBody3D"]
77 shape = SubResource("ConcavePolygonShape3D_qttgn")
78
79 [node name="wall4" type="MeshInstance3D" parent="map"]
80 transform = Transform3D(1.91069e-15, 4.37114e-08, -1, 1, -4.37114e-08, 0, -4.37114e-08, -1, -4.37114e-08, 0, 5, 25)
81 mesh = SubResource("PlaneMesh_0exak")
82 skeleton = NodePath("../..")
83
84 [node name="StaticBody3D" type="StaticBody3D" parent="map/wall4"]
85
86 [node name="CollisionShape3D" type="CollisionShape3D" parent="map/wall4/StaticBody3D"]
87 shape = SubResource("ConcavePolygonShape3D_qttgn")
88
89 [node name="Player1" parent="." instance=ExtResource("1_3tqxd")]
90 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -16)
91 color = Color(1, 0.843137, 0, 1)
92 distance = 5.0
93
94 [node name="Player2" parent="." instance=ExtResource("1_3tqxd")]
95 transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 16)
96 color = Color(1, 0, 0, 1)
97 distance = 5.0
98
99 [node name="topdown_camera" type="Camera3D" parent="."]
100 transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 32.95, 0)
101 environment = SubResource("Environment_h5n2a")
102 projection = 1
103 size = 50.0
104
105 [node name="SplitScreenContainer" type="GridContainer" parent="."]
106 custom_minimum_size = Vector2(3456, 1944)
107 anchors_preset = 15
108 anchor_right = 1.0
109 anchor_bottom = 1.0
110 grow_horizontal = 2
111 grow_vertical = 2
112 script = ExtResource("4_nc5g8")
113
114 [node name="HSplitContainer" type="HSplitContainer" parent="SplitScreenContainer"]
115 layout_mode = 2
116 size_flags_horizontal = 3
117 size_flags_vertical = 3
118
119 [node name="SubViewportContainer" type="SubViewportContainer" parent="SplitScreenContainer/HSplitContainer"]
120 layout_mode = 2
121 size_flags_horizontal = 3
122 stretch = true
123
124 [node name="SubViewport_map" type="SubViewport" parent="SplitScreenContainer/HSplitContainer/SubViewportContainer"]
125 unique_name_in_owner = true
126 handle_input_locally = false
127 size = Vector2i(1722, 1944)
128 render_target_update_mode = 4
129
130 [node name="VSplitContainer" type="VSplitContainer" parent="SplitScreenContainer/HSplitContainer"]
131 layout_mode = 2
132 size_flags_horizontal = 3
133
134 [node name="SubViewportContainer" type="SubViewportContainer" parent="SplitScreenContainer/HSplitContainer/VSplitContainer"]
135 layout_mode = 2
136 size_flags_horizontal = 3
137 size_flags_vertical = 3
138 stretch = true
139
140 [node name="SubViewport_Player1" type="SubViewport" parent="SplitScreenContainer/HSplitContainer/VSplitContainer/SubViewportContainer"]
141 unique_name_in_owner = true
142 handle_input_locally = false
143 size = Vector2i(1722, 966)
144 render_target_update_mode = 4
145
146 [node name="SubViewportContainer2" type="SubViewportContainer" parent="SplitScreenContainer/HSplitContainer/VSplitContainer"]
147 layout_mode = 2
148 size_flags_horizontal = 3
149 size_flags_vertical = 3
150 stretch = true
151
152 [node name="SubViewport_Player2" type="SubViewport" parent="SplitScreenContainer/HSplitContainer/VSplitContainer/SubViewportContainer2"]
153 unique_name_in_owner = true
154 handle_input_locally = false
155 size = Vector2i(1722, 966)
156 render_target_update_mode = 4
157
158 [connection signal="playerDestroyed" from="Player1" to="." method="_on_player_destroyed"]
159 [connection signal="playerRestart" from="Player1" to="." method="_on_player_player_restart"]
160 [connection signal="playerTurn" from="Player1" to="." method="_player_add_wall"]
161 [connection signal="playerDestroyed" from="Player2" to="." method="_on_player_destroyed"]
162 [connection signal="playerRestart" from="Player2" to="." method="_on_player_player_restart"]
163 [connection signal="playerTurn" from="Player2" to="." method="_player_add_wall"]