Skip to content

Commit 3558b49

Browse files
committed
Commit for Tutorial 09
1 parent d3e8628 commit 3558b49

File tree

5 files changed

+226
-51
lines changed

5 files changed

+226
-51
lines changed

project/.fscache

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
::res://::1422394637
2-
character.xml::PackedScene::1422391007::
3-
character_sprites.xml::PackedScene::1422394637::
4-
icon.png::ImageTexture::1422081463::
5-
level_01.xml::PackedScene::1422394637::
6-
level_ground_element_01.xml::PackedScene::1422094586::
7-
::res://scripts::1422391028
8-
input_states.gd::GDScript::1422391028::
9-
player.gd::GDScript::1422391028::
10-
::res://textures::1422394637
11-
blue_square.png::ImageTexture::1422081463::
12-
red_square.png::ImageTexture::1422081463::
13-
::res://textures/gbot::1422394637
14-
gBot_arm_l.png::ImageTexture::1422394637::
15-
gBot_arm_r.png::ImageTexture::1422394637::
16-
gBot_body.png::ImageTexture::1422394637::
17-
gBot_complete.png::ImageTexture::1422394637::
18-
gBot_foot_l.png::ImageTexture::1422394637::
19-
gBot_foot_r.png::ImageTexture::1422394637::
20-
gBot_forearm_l.png::ImageTexture::1422394637::
21-
gBot_forearm_r.png::ImageTexture::1422394637::
22-
gBot_head.png::ImageTexture::1422394637::
23-
gBot_hip.png::ImageTexture::1422394637::
24-
gBot_jaw.png::ImageTexture::1422394637::
25-
gBot_leg_l.png::ImageTexture::1422394637::
26-
gBot_leg_r.png::ImageTexture::1422394637::
27-
gBot_shin_l.png::ImageTexture::1422394637::
28-
gBot_shin_r.png::ImageTexture::1422394637::
1+
::res://::1422993807
2+
character.xml::PackedScene::1422710762::
3+
character_sprites.xml::PackedScene::1422993807::
4+
icon.png::ImageTexture::1422710762::
5+
level_01.xml::PackedScene::1422993807::
6+
level_ground_element_01.xml::PackedScene::1422710762::
7+
::res://scripts::1422710762
8+
input_states.gd::GDScript::1422710762::
9+
player.gd::GDScript::1422710762::
10+
::res://textures::1422710762
11+
blue_square.png::ImageTexture::1422710762::
12+
red_square.png::ImageTexture::1422710762::
13+
::res://textures/gbot::1422710762
14+
gBot_arm_l.png::ImageTexture::1422710762::
15+
gBot_arm_r.png::ImageTexture::1422710762::
16+
gBot_body.png::ImageTexture::1422710762::
17+
gBot_complete.png::ImageTexture::1422710762::
18+
gBot_foot_l.png::ImageTexture::1422710762::
19+
gBot_foot_r.png::ImageTexture::1422710762::
20+
gBot_forearm_l.png::ImageTexture::1422710762::
21+
gBot_forearm_r.png::ImageTexture::1422710762::
22+
gBot_head.png::ImageTexture::1422710762::
23+
gBot_hip.png::ImageTexture::1422710762::
24+
gBot_jaw.png::ImageTexture::1422710762::
25+
gBot_leg_l.png::ImageTexture::1422710762::
26+
gBot_leg_r.png::ImageTexture::1422710762::
27+
gBot_shin_l.png::ImageTexture::1422710762::
28+
gBot_shin_r.png::ImageTexture::1422710762::

project/character.xml

Lines changed: 151 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<resource_file type="PackedScene" subresource_count="4" version="1.0" version_name="Godot Engine v1.0.stable.custom_build">
3-
<ext_resource path="res://scripts/player.gd" type="Script"></ext_resource>
2+
<resource_file type="PackedScene" subresource_count="5" version="1.0" version_name="Godot Engine v1.0.stable.custom_build">
43
<ext_resource path="res://textures/blue_square.png" type="Texture"></ext_resource>
5-
<resource type="RectangleShape2D" path="local://1">
4+
<ext_resource path="res://scripts/player.gd" type="Script"></ext_resource>
5+
<ext_resource path="res://character_sprites.xml" type="PackedScene"></ext_resource>
6+
<resource type="CapsuleShape2D" path="local://1">
67
<real name="custom_solver_bias"> 0 </real>
7-
<vector2 name="extents"> 32, 32 </vector2>
8+
<real name="radius"> 40 </real>
9+
<real name="height"> 180 </real>
810

911
</resource>
1012
<main_resource>
1113
<dictionary name="_bundled" shared="false">
1214
<string> "names" </string>
13-
<string_array len="77">
15+
<string_array len="78">
1416
<string> "player" </string>
1517
<string> "RigidBody2D" </string>
1618
<string> "_import_path" </string>
@@ -49,9 +51,6 @@
4951
<string> "acceleration" </string>
5052
<string> "air_acceleration" </string>
5153
<string> "extra_gravity" </string>
52-
<string> "CollisionShape2D" </string>
53-
<string> "shape" </string>
54-
<string> "trigger" </string>
5554
<string> "Camera2D" </string>
5655
<string> "offset" </string>
5756
<string> "centered" </string>
@@ -88,43 +87,55 @@
8887
<string> "region" </string>
8988
<string> "region_rect" </string>
9089
<string> "player_sprite1" </string>
90+
<string> "character_sprites" </string>
91+
<string> "CollisionShape2D" </string>
92+
<string> "shape" </string>
93+
<string> "trigger" </string>
9194
</string_array>
9295
<string> "version" </string>
9396
<int> 1 </int>
9497
<string> "conn_count" </string>
9598
<int> 0 </int>
9699
<string> "node_count" </string>
97-
<int> 7 </int>
100+
<int> 8 </int>
98101
<string> "variants" </string>
99-
<array len="32" shared="false">
102+
<array len="36" shared="false">
100103
<node_path> "" </node_path>
101104
<bool> True </bool>
102105
<real> 1 </real>
103-
<vector2> 297, 95 </vector2>
106+
<vector2> 0, 0 </vector2>
104107
<real> 0 </real>
105108
<vector2> 1, 1 </vector2>
106109
<int> 0 </int>
107110
<int> 1 </int>
108111
<resource resource_type="Shape2D" path="local://1"> </resource>
109-
<matrix32> 1, -0, 0, 1, 4.41074e-06, -0.270176 </matrix32>
112+
<matrix32> 1, -0, 0, 1, 4.64916e-06, -140.915 </matrix32>
110113
<bool> False </bool>
111114
<int> 2 </int>
112-
<vector2> 0, 0 </vector2>
113115
<real> -1 </real>
114116
<resource resource_type="Script" path="res://scripts/player.gd"> </resource>
115117
<dictionary shared="false">
116118
<string> "__editor_plugin_states__" </string>
117119
<dictionary shared="false">
120+
<string> "Script" </string>
121+
<dictionary shared="false">
122+
<string> "current" </string>
123+
<int> 0 </int>
124+
<string> "sources" </string>
125+
<array len="1" shared="false">
126+
<string> "res://scripts/player.gd" </string>
127+
</array>
128+
</dictionary>
118129
<string> "2D" </string>
119130
<dictionary shared="false">
120131
<string> "pixel_snap" </string>
121132
<bool> False </bool>
122133
<string> "zoom" </string>
123-
<real> 1.108033 </real>
134+
<real> 1.507339 </real>
124135
<string> "use_snap" </string>
125136
<bool> False </bool>
126137
<string> "ofs" </string>
127-
<vector2> -234.514, -185.908 </vector2>
138+
<vector2> -409.645, -381.74 </vector2>
128139
<string> "snap" </string>
129140
<int> 10 </int>
130141
</dictionary>
@@ -234,22 +245,145 @@
234245
<int> 400 </int>
235246
<int> 8 </int>
236247
<int> 300 </int>
237-
<vector2> 4.41074e-06, -0.270176 </vector2>
238248
<vector2> 0, -100 </vector2>
239249
<real> 7 </real>
240250
<vector2> 2, 2 </vector2>
241251
<int> -10000000 </int>
242252
<int> 10000000 </int>
243253
<real> 0.2 </real>
254+
<vector2> 0, -25.8734 </vector2>
244255
<vector2> 0, 60 </vector2>
245256
<resource resource_type="Texture" path="res://textures/blue_square.png"> </resource>
246257
<color> 1, 1, 1, 1 </color>
247258
<rect2> 0, 0, 0, 0 </rect2>
248259
<vector2> 43.32, -3.57628e-07 </vector2>
249260
<vector2> 0.2, 0.2 </vector2>
261+
<resource resource_type="PackedScene" path="res://character_sprites.xml"> </resource>
262+
<vector2> 5.97079, -139.318 </vector2>
263+
<vector2> 0.3, 0.3 </vector2>
264+
<dictionary shared="false">
265+
<string> "__editor_plugin_states__" </string>
266+
<dictionary shared="false">
267+
<string> "2D" </string>
268+
<dictionary shared="false">
269+
<string> "pixel_snap" </string>
270+
<bool> False </bool>
271+
<string> "zoom" </string>
272+
<real> 0.66342 </real>
273+
<string> "use_snap" </string>
274+
<bool> False </bool>
275+
<string> "ofs" </string>
276+
<vector2> -915.832, -305.871 </vector2>
277+
<string> "snap" </string>
278+
<int> 10 </int>
279+
</dictionary>
280+
<string> "3D" </string>
281+
<dictionary shared="false">
282+
<string> "fov" </string>
283+
<real> 45 </real>
284+
<string> "zfar" </string>
285+
<real> 500 </real>
286+
<string> "viewports" </string>
287+
<array len="4" shared="false">
288+
<dictionary shared="false">
289+
<string> "distance" </string>
290+
<real> 4 </real>
291+
<string> "x_rot" </string>
292+
<real> 0 </real>
293+
<string> "y_rot" </string>
294+
<real> 0 </real>
295+
<string> "listener" </string>
296+
<bool> True </bool>
297+
<string> "use_environment" </string>
298+
<bool> False </bool>
299+
<string> "use_orthogonal" </string>
300+
<bool> False </bool>
301+
<string> "pos" </string>
302+
<vector3> 0, 0, 0 </vector3>
303+
</dictionary>
304+
<dictionary shared="false">
305+
<string> "distance" </string>
306+
<real> 4 </real>
307+
<string> "x_rot" </string>
308+
<real> 0 </real>
309+
<string> "y_rot" </string>
310+
<real> 0 </real>
311+
<string> "listener" </string>
312+
<bool> False </bool>
313+
<string> "use_environment" </string>
314+
<bool> False </bool>
315+
<string> "use_orthogonal" </string>
316+
<bool> False </bool>
317+
<string> "pos" </string>
318+
<vector3> 0, 0, 0 </vector3>
319+
</dictionary>
320+
<dictionary shared="false">
321+
<string> "distance" </string>
322+
<real> 4 </real>
323+
<string> "x_rot" </string>
324+
<real> 0 </real>
325+
<string> "y_rot" </string>
326+
<real> 0 </real>
327+
<string> "listener" </string>
328+
<bool> False </bool>
329+
<string> "use_environment" </string>
330+
<bool> False </bool>
331+
<string> "use_orthogonal" </string>
332+
<bool> False </bool>
333+
<string> "pos" </string>
334+
<vector3> 0, 0, 0 </vector3>
335+
</dictionary>
336+
<dictionary shared="false">
337+
<string> "distance" </string>
338+
<real> 4 </real>
339+
<string> "x_rot" </string>
340+
<real> 0 </real>
341+
<string> "y_rot" </string>
342+
<real> 0 </real>
343+
<string> "listener" </string>
344+
<bool> False </bool>
345+
<string> "use_environment" </string>
346+
<bool> False </bool>
347+
<string> "use_orthogonal" </string>
348+
<bool> False </bool>
349+
<string> "pos" </string>
350+
<vector3> 0, 0, 0 </vector3>
351+
</dictionary>
352+
</array>
353+
<string> "deflight_rot_y" </string>
354+
<real> 0.628319 </real>
355+
<string> "viewport_mode" </string>
356+
<int> 1 </int>
357+
<string> "default_light" </string>
358+
<bool> True </bool>
359+
<string> "ambient_light_color" </string>
360+
<color> 0.15, 0.15, 0.15, 1 </color>
361+
<string> "show_grid" </string>
362+
<bool> True </bool>
363+
<string> "show_origin" </string>
364+
<bool> True </bool>
365+
<string> "znear" </string>
366+
<real> 0.1 </real>
367+
<string> "default_srgb" </string>
368+
<bool> False </bool>
369+
<string> "deflight_rot_x" </string>
370+
<real> 0.942478 </real>
371+
</dictionary>
372+
</dictionary>
373+
<string> "__editor_run_settings__" </string>
374+
<dictionary shared="false">
375+
<string> "custom_args" </string>
376+
<string> "-l $scene" </string>
377+
<string> "run_mode" </string>
378+
<int> 0 </int>
379+
</dictionary>
380+
<string> "__editor_plugin_screen__" </string>
381+
<string> "2D" </string>
382+
</dictionary>
383+
<vector2> 4.64916e-06, -140.915 </vector2>
250384
</array>
251385
<string> "nodes" </string>
252-
<int_array len="319"> -1, -1, 1, 0, -1, 36, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 1, 11, 7, 12, 8, 13, 9, 14, 10, 15, 7, 16, 11, 17, 2, 18, 4, 19, 4, 20, 2, 21, 10, 22, 6, 23, 6, 24, 10, 25, 10, 26, 1, 27, 12, 28, 4, 29, 13, 30, 13, 31, 14, 32, 15, 33, 16, 34, 16, 35, 17, 36, 7, 37, 18, 0, 0, 0, 38, 38, -1, 11, 2, 0, 3, 1, 4, 2, 5, 2, 6, 19, 7, 4, 8, 5, 9, 6, 10, 1, 39, 8, 40, 10, 0, 0, 0, 41, 41, -1, 25, 2, 0, 3, 1, 4, 2, 5, 2, 6, 12, 7, 4, 8, 5, 9, 6, 10, 1, 42, 20, 43, 1, 44, 10, 45, 1, 46, 21, 47, 22, 48, 23, 49, 23, 50, 24, 51, 24, 52, 1, 53, 1, 54, 25, 55, 25, 56, 25, 57, 25, 0, 0, 0, 58, 58, -1, 12, 2, 0, 3, 1, 4, 2, 5, 2, 6, 12, 7, 4, 8, 5, 9, 6, 10, 1, 59, 1, 60, 26, 61, 7, 0, 0, 0, 63, 62, -1, 9, 2, 0, 3, 1, 4, 2, 5, 2, 6, 12, 7, 4, 8, 5, 9, 6, 10, 1, 0, 4, 0, 65, 64, -1, 21, 2, 0, 3, 1, 4, 2, 5, 2, 66, 1, 6, 12, 7, 4, 8, 5, 9, 6, 10, 1, 67, 27, 43, 1, 42, 12, 68, 10, 69, 10, 70, 7, 71, 7, 72, 6, 73, 28, 74, 10, 75, 29, 0, 4, 0, 65, 76, -1, 21, 2, 0, 3, 1, 4, 2, 5, 2, 66, 1, 6, 30, 7, 4, 8, 31, 9, 6, 10, 1, 67, 27, 43, 1, 42, 12, 68, 10, 69, 10, 70, 7, 71, 7, 72, 6, 73, 28, 74, 10, 75, 29, 0 </int_array>
386+
<int_array len="334"> -1, -1, 1, 0, -1, 36, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 1, 11, 7, 12, 8, 13, 9, 14, 10, 15, 7, 16, 11, 17, 2, 18, 4, 19, 4, 20, 2, 21, 10, 22, 6, 23, 6, 24, 10, 25, 10, 26, 1, 27, 3, 28, 4, 29, 12, 30, 12, 31, 13, 32, 14, 33, 15, 34, 15, 35, 16, 36, 7, 37, 17, 0, 0, 0, 38, 38, -1, 25, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 1, 39, 18, 40, 1, 41, 10, 42, 1, 43, 19, 44, 20, 45, 21, 46, 21, 47, 22, 48, 22, 49, 1, 50, 1, 51, 23, 52, 23, 53, 23, 54, 23, 0, 0, 0, 55, 55, -1, 12, 2, 0, 3, 1, 4, 2, 5, 2, 6, 24, 7, 4, 8, 5, 9, 6, 10, 1, 56, 1, 57, 25, 58, 7, 0, 0, 0, 60, 59, -1, 9, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 1, 0, 3, 0, 62, 61, -1, 21, 2, 0, 3, 10, 4, 2, 5, 2, 63, 1, 6, 3, 7, 4, 8, 5, 9, 6, 10, 1, 64, 26, 40, 1, 39, 3, 65, 10, 66, 10, 67, 7, 68, 7, 69, 6, 70, 27, 71, 10, 72, 28, 0, 3, 0, 62, 73, -1, 21, 2, 0, 3, 10, 4, 2, 5, 2, 63, 1, 6, 29, 7, 4, 8, 30, 9, 6, 10, 1, 64, 26, 40, 1, 39, 3, 65, 10, 66, 10, 67, 7, 68, 7, 69, 6, 70, 27, 71, 10, 72, 28, 0, 3, 0, 60, 74, 31, 4, 2, 0, 6, 32, 8, 33, 32, 34, 0, 0, 0, 75, 75, -1, 11, 2, 0, 3, 1, 4, 2, 5, 2, 6, 35, 7, 4, 8, 5, 9, 6, 10, 1, 76, 8, 77, 10, 0 </int_array>
253387
<string> "conns" </string>
254388
<int_array len="0"> </int_array>
255389
</dictionary>

project/engine.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ name="Godot Tutorial"
44
main_scene="res://level_01.xml"
55
icon="icon.png"
66

7+
[display]
8+
9+
width=800
10+
height=600
11+
712
[input]
813

914
btn_right=[key(Right)]

project/level_01.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<main_resource>
66
<dictionary name="_bundled" shared="false">
77
<string> "names" </string>
8-
<string_array len="18">
8+
<string_array len="21">
99
<string> "world" </string>
1010
<string> "Node2D" </string>
1111
<string> "_import_path" </string>
@@ -20,6 +20,9 @@
2020
<string> "__meta__" </string>
2121
<string> "player" </string>
2222
<string> "RigidBody2D" </string>
23+
<string> "player_speed" </string>
24+
<string> "jumpforce" </string>
25+
<string> "extra_gravity" </string>
2326
<string> "ground" </string>
2427
<string> "StaticBody2D" </string>
2528
<string> "ground1" </string>
@@ -32,7 +35,7 @@
3235
<string> "node_count" </string>
3336
<int> 5 </int>
3437
<string> "variants" </string>
35-
<array len="17" shared="false">
38+
<array len="20" shared="false">
3639
<node_path> "" </node_path>
3740
<bool> True </bool>
3841
<real> 1 </real>
@@ -62,7 +65,7 @@
6265
<string> "use_snap" </string>
6366
<bool> False </bool>
6467
<string> "ofs" </string>
65-
<vector2> -590.935, -324.265 </vector2>
68+
<vector2> -384.374, -442.628 </vector2>
6669
<string> "snap" </string>
6770
<int> 10 </int>
6871
</dictionary>
@@ -175,6 +178,9 @@
175178
<string> "_editor_collapsed" </string>
176179
<bool> True </bool>
177180
</dictionary>
181+
<int> 1200 </int>
182+
<int> 1000 </int>
183+
<int> 2000 </int>
178184
<resource resource_type="PackedScene" path="res://level_ground_element_01.xml"> </resource>
179185
<dictionary shared="false">
180186
<string> "_editor_collapsed" </string>
@@ -186,7 +192,7 @@
186192
<real> 0.222343 </real>
187193
</array>
188194
<string> "nodes" </string>
189-
<int_array len="81"> -1, -1, 1, 0, -1, 10, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 1, 11, 7, 0, 0, 0, 13, 12, 8, 3, 2, 0, 6, 9, 11, 10, 0, 0, 0, 15, 14, 11, 2, 2, 0, 11, 12, 0, 0, 0, 15, 16, 11, 4, 2, 0, 6, 13, 7, 14, 11, 12, 0, 0, 0, 15, 17, 11, 4, 2, 0, 6, 15, 7, 16, 11, 12, 0 </int_array>
195+
<int_array len="87"> -1, -1, 1, 0, -1, 10, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 1, 11, 7, 0, 0, 0, 13, 12, 8, 6, 2, 0, 6, 9, 11, 10, 14, 11, 15, 12, 16, 13, 0, 0, 0, 18, 17, 14, 2, 2, 0, 11, 15, 0, 0, 0, 18, 19, 14, 4, 2, 0, 6, 16, 7, 17, 11, 15, 0, 0, 0, 18, 20, 14, 4, 2, 0, 6, 18, 7, 19, 11, 15, 0 </int_array>
190196
<string> "conns" </string>
191197
<int_array len="0"> </int_array>
192198
</dictionary>

0 commit comments

Comments
 (0)