From 87ff9b7f7fd81da313eedec6c3b02cfc5dfe92bb Mon Sep 17 00:00:00 2001 From: OddlyTimbot Date: Mon, 22 Jul 2024 19:38:31 -0400 Subject: [PATCH] jump and run working --- ...state-6d8e6ff1e6f20a36e0402d27c623c86c.cfg | 2 +- ...state-b6bd7a241034177d7fe082a7597ba8ea.cfg | 2 +- ...lding-b6bd7a241034177d7fe082a7597ba8ea.cfg | 4 +- .godot/editor/create_recent.Node | 1 + .godot/editor/editor_layout.cfg | 14 +- .godot/editor/favorites | 0 .godot/editor/filesystem_cache8 | 24 ++- .godot/editor/filesystem_update4 | 3 +- ...state-c2a7af834e91ff64325daddf58e45dc0.cfg | 2 +- .godot/editor/project_metadata.cfg | 1 + .godot/editor/recent_dirs | 1 + .godot/editor/script_editor_cache.cfg | 6 +- ....png-b25968a287377bab7d6899f33fed0ec9.ctex | Bin 0 -> 910 bytes ...8.png-b25968a287377bab7d6899f33fed0ec9.md5 | 3 + ....png-e8e7ab7fcf5572b88387a2fca249a12b.ctex | Bin 0 -> 910 bytes ...8.png-e8e7ab7fcf5572b88387a2fca249a12b.md5 | 3 + ....png-44bab2151e6e1eb3cf69ed16e7a4f4ad.ctex | Bin 0 -> 738 bytes ...8.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.md5 | 3 + ....png-626defb011aee5b3f5c54d9acb45d5f5.ctex | Bin 0 -> 1578 bytes ...8.png-626defb011aee5b3f5c54d9acb45d5f5.md5 | 3 + .godot/uid_cache.bin | Bin 139 -> 321 bytes graphics/Player Idle 48x48.png | Bin 0 -> 1853 bytes graphics/Player Idle 48x48.png.import | 34 ++++ graphics/player jump 48x48.png | Bin 0 -> 1021 bytes graphics/player jump 48x48.png.import | 34 ++++ graphics/player run 48x48.png | Bin 0 -> 3199 bytes graphics/player run 48x48.png.import | 34 ++++ scenes/character.tscn | 182 +++++++++++++++++- scripts/CharacterBody2D.gd | 9 + 29 files changed, 337 insertions(+), 28 deletions(-) create mode 100644 .godot/editor/favorites create mode 100644 .godot/imported/Player Idle 48x48.png-b25968a287377bab7d6899f33fed0ec9.ctex create mode 100644 .godot/imported/Player Idle 48x48.png-b25968a287377bab7d6899f33fed0ec9.md5 create mode 100644 .godot/imported/Player Idle 48x48.png-e8e7ab7fcf5572b88387a2fca249a12b.ctex create mode 100644 .godot/imported/Player Idle 48x48.png-e8e7ab7fcf5572b88387a2fca249a12b.md5 create mode 100644 .godot/imported/player jump 48x48.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.ctex create mode 100644 .godot/imported/player jump 48x48.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.md5 create mode 100644 .godot/imported/player run 48x48.png-626defb011aee5b3f5c54d9acb45d5f5.ctex create mode 100644 .godot/imported/player run 48x48.png-626defb011aee5b3f5c54d9acb45d5f5.md5 create mode 100644 graphics/Player Idle 48x48.png create mode 100644 graphics/Player Idle 48x48.png.import create mode 100644 graphics/player jump 48x48.png create mode 100644 graphics/player jump 48x48.png.import create mode 100644 graphics/player run 48x48.png create mode 100644 graphics/player run 48x48.png.import diff --git a/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg b/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg index c574e5f..b3b3605 100644 --- a/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg +++ b/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Area2D")]) +selected_nodes=Array[NodePath]([]) diff --git a/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg b/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg index 6918fec..86add5d 100644 --- a/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg +++ b/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Area2D")]) +selected_nodes=Array[NodePath]([]) diff --git a/.godot/editor/character.tscn-folding-b6bd7a241034177d7fe082a7597ba8ea.cfg b/.godot/editor/character.tscn-folding-b6bd7a241034177d7fe082a7597ba8ea.cfg index 780ff38..a8ca307 100644 --- a/.godot/editor/character.tscn-folding-b6bd7a241034177d7fe082a7597ba8ea.cfg +++ b/.godot/editor/character.tscn-folding-b6bd7a241034177d7fe082a7597ba8ea.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[] -resource_unfolds=["res://scenes/character.tscn::CircleShape2D_ubfw4", PackedStringArray()] +node_unfolds=[NodePath("AnimatedSprite2D"), PackedStringArray("Animation", "sprite_frames", "Texture")] +resource_unfolds=["res://scenes/character.tscn::SpriteFrames_h7tsu", PackedStringArray("Resource"), "res://scenes/character.tscn::CircleShape2D_ubfw4", PackedStringArray()] nodes_folded=[] diff --git a/.godot/editor/create_recent.Node b/.godot/editor/create_recent.Node index 56a4f42..66d0f70 100644 --- a/.godot/editor/create_recent.Node +++ b/.godot/editor/create_recent.Node @@ -1,3 +1,4 @@ +AnimatedSprite2D Node2D CollisionShape2D Area2D diff --git a/.godot/editor/editor_layout.cfg b/.godot/editor/editor_layout.cfg index 7d28206..7641bc6 100644 --- a/.godot/editor/editor_layout.cfg +++ b/.godot/editor/editor_layout.cfg @@ -4,12 +4,12 @@ dock_1_selected_tab_idx=0 dock_2_selected_tab_idx=0 dock_3_selected_tab_idx=0 dock_4_selected_tab_idx=0 -dock_5_selected_tab_idx=1 +dock_5_selected_tab_idx=0 dock_6_selected_tab_idx=0 dock_7_selected_tab_idx=0 dock_8_selected_tab_idx=0 dock_floating={} -dock_split_2=0 +dock_split_2=-77 dock_split_3=0 dock_hsplit_1=0 dock_hsplit_2=270 @@ -19,8 +19,8 @@ dock_filesystem_split=0 dock_filesystem_display_mode=0 dock_filesystem_file_sort=0 dock_filesystem_file_list_display_mode=1 -dock_filesystem_selected_paths=PackedStringArray("res://scenes/bullet.tscn") -dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/") +dock_filesystem_selected_paths=PackedStringArray("res://graphics/Player Idle 48x48.png") +dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/", "res://graphics/") dock_3="Scene,Import" dock_4="FileSystem" dock_5="Inspector,Node,History" @@ -28,16 +28,16 @@ dock_5="Inspector,Node,History" [EditorNode] open_scenes=PackedStringArray("res://scenes/game.tscn", "res://scenes/character.tscn", "res://scenes/bullet.tscn") -current_scene="res://scenes/bullet.tscn" +current_scene="res://scenes/character.tscn" center_split_offset=0 selected_default_debugger_tab_idx=0 selected_main_editor_idx=2 -selected_bottom_panel_item=0 +selected_bottom_panel_item=9 [ScriptEditor] open_scripts=["res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"] -selected_script="res://scripts/bullet.gd" +selected_script="res://scripts/CharacterBody2D.gd" open_help=[] script_split_offset=70 list_split_offset=0 diff --git a/.godot/editor/favorites b/.godot/editor/favorites new file mode 100644 index 0000000..e69de29 diff --git a/.godot/editor/filesystem_cache8 b/.godot/editor/filesystem_cache8 index f5c988c..2fe8b4f 100644 --- a/.godot/editor/filesystem_cache8 +++ b/.godot/editor/filesystem_cache8 @@ -1,9 +1,17 @@ ea4bc82a6ad023ab7ee23ee620429895 -::res://::1721083613 -icon.svg::CompressedTexture2D::9114977118871582245::1721083376::1721083376::1::::<><>:: -::res://scenes/::1721083376 -game.tscn::PackedScene::1738196330916037717::1721083376::0::1::::<><>::res://scripts/gamecontroller.gd<>res://scripts/CharacterBody2D.gd<>res://scripts/Trigger.gd -::res://scripts/::1721083376 -CharacterBody2D.gd::GDScript::-1::1721083376::0::1::::<>CharacterBody2D<>:: -gamecontroller.gd::GDScript::-1::1721083376::0::1::::<>Node2D<>:: -Trigger.gd::GDScript::-1::1721083376::0::1::::<>Area2D<>:: +::res://::1721688521 +icon.svg::CompressedTexture2D::9114977118871582245::1721682499::1721682499::1::::<><>:: +README.md::TextFile::-1::1721686814::0::1::::<><>:: +::res://graphics/::1721690749 +Player Idle 48x48.png::CompressedTexture2D::3034784150585975320::1721688486::1721688521::1::::<><>:: +player jump 48x48.png::CompressedTexture2D::5342238035347045068::1721690749::1721690749::1::::<><>:: +player run 48x48.png::CompressedTexture2D::3468292145757083245::1721689940::1721689940::1::::<><>:: +::res://scenes/::1721690574 +bullet.tscn::PackedScene::6880909734590904373::1721690574::0::1::::<><>::res://scripts/bullet.gd +character.tscn::PackedScene::451838158579532324::1721690574::0::1::::<><>::res://scripts/CharacterBody2D.gd<>uid://bjicpmau1iy7y::::res://graphics/Player Idle 48x48.png<>uid://bpocjaij352uj::::res://graphics/player run 48x48.png +game.tscn::PackedScene::1738196330916037717::1721690574::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>res://scripts/Trigger.gd +::res://scripts/::1721690574 +bullet.gd::GDScript::-1::1721682499::0::1::::<>Area2D<>:: +CharacterBody2D.gd::GDScript::-1::1721690574::0::1::::<>CharacterBody2D<>:: +gamecontroller.gd::GDScript::-1::1721682499::0::1::::<>Node2D<>:: +Trigger.gd::GDScript::-1::1721682499::0::1::::<>Area2D<>:: diff --git a/.godot/editor/filesystem_update4 b/.godot/editor/filesystem_update4 index 2b708c4..acb0fcf 100644 --- a/.godot/editor/filesystem_update4 +++ b/.godot/editor/filesystem_update4 @@ -1,5 +1,4 @@ res://scenes/game.tscn -res://scripts/CharacterBody2D.gd res://scenes/character.tscn -res://scripts/bullet.gd res://scenes/bullet.tscn +res://scripts/CharacterBody2D.gd diff --git a/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg b/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg index 5c855c4..0cb9104 100644 --- a/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg +++ b/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Area2D")]) +selected_nodes=Array[NodePath]([]) diff --git a/.godot/editor/project_metadata.cfg b/.godot/editor/project_metadata.cfg index faa3f2c..664dd4b 100644 --- a/.godot/editor/project_metadata.cfg +++ b/.godot/editor/project_metadata.cfg @@ -23,6 +23,7 @@ CollisionShape2D:scale=true RigidBody2D:scale=true RayCast2D:scale=true Area2D:scale=true +AnimatedSprite2D:scale=true [dialog_bounds] diff --git a/.godot/editor/recent_dirs b/.godot/editor/recent_dirs index 0cc5aaa..6c5985a 100644 --- a/.godot/editor/recent_dirs +++ b/.godot/editor/recent_dirs @@ -1,2 +1,3 @@ +res://graphics res://scripts res://scenes diff --git a/.godot/editor/script_editor_cache.cfg b/.godot/editor/script_editor_cache.cfg index 2b6b7f0..70664d6 100644 --- a/.godot/editor/script_editor_cache.cfg +++ b/.godot/editor/script_editor_cache.cfg @@ -17,11 +17,11 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 52, +"column": 30, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 47, -"scroll_position": 30.0, +"row": 69, +"scroll_position": 56.0, "selection": false, "syntax_highlighter": "GDScript" } diff --git a/.godot/imported/Player Idle 48x48.png-b25968a287377bab7d6899f33fed0ec9.ctex b/.godot/imported/Player Idle 48x48.png-b25968a287377bab7d6899f33fed0ec9.ctex new file mode 100644 index 0000000000000000000000000000000000000000..25ed9e30f1fdb361b59fe3b93662aca9824580af GIT binary patch literal 910 zcmV;919ALEQ&chm0002s0RR9n00000000gD|Ns900000000000000020002s0Wbgn z00005000110{{S0Nk&Fa0{{S5MM6+kP&iCN0{{Ro-@ywIx1cDJq^7G7z%NO_3jRMC z52#TZNmA7Aav%mY`Ah7d1`0({g({Mj>=zxVKmhU)3j3JAF@k`g$p6s-{%d&df@=Nn zXcvli;a(0DQo`jA)Z)P@2lP(CkRaP`)L3SW6EHC}_Wsujk_Zo3bpJ7;{|+Nb4I4-S z3yGy8Tz!xdB3GE7tfk~r_6GmmBOnqCw^~wb6nT`f2IM>?szWvb9BKS>UXN! zTX$8CkH;73b??HR-6zf~o+AKMxWh7>_`T`Mg)z61pkvw2u0zko%fsJep4?$6PW;~R zxtw=C4l5My?7+^W!(EAUMC2$tpH9CMzc+j?r=1dW7`G0^JNplu;q2Xti(XeEJ)h&D z)9H8O_Xf`e;Pk6h!2oCffinP~BerN@jw8)czZ1VVUAgqV_wz!S!!QP;oVe#mSTrif zVc^7BHT zqm?Wgo?|Ia{N9x1(l-sMY>zW-HDT{?9}J(P1ig(GRp<{+!f`7?JXx(_*@XqhE%q|*|wx+ z>P*17I1~1qN;#I{gy$0QxgeZv+Up(5c2-++W}6am#(1_ir#M$mF~FWXo?{_S%-)iC zDEM3~bylR>y%MbmoQn+x%5hGaA9@i^%--Z+)Z{|CmYnZmoF|!^v!#`&GdkQ{Y%oZU zvNM$61nliF7MLTO@(J`vc#SG^GvyD;l9%{+?w!z8v z49o@Ytg72|N>Keyb8@MSaB}9}yxy?6;Lge%XDc{ix!i!$shx{M^*hbUrLw^(wsVp8 kxssuHXQkh%eQ)mDU0|ExdrT_o{ literal 0 HcmV?d00001 diff --git a/.godot/imported/Player Idle 48x48.png-b25968a287377bab7d6899f33fed0ec9.md5 b/.godot/imported/Player Idle 48x48.png-b25968a287377bab7d6899f33fed0ec9.md5 new file mode 100644 index 0000000..3dd0db8 --- /dev/null +++ b/.godot/imported/Player Idle 48x48.png-b25968a287377bab7d6899f33fed0ec9.md5 @@ -0,0 +1,3 @@ +source_md5="25eca82a8943e0cb7df742fc2f8287eb" +dest_md5="40424c46e7e7da6cb6f8f38becacd5fa" + diff --git a/.godot/imported/Player Idle 48x48.png-e8e7ab7fcf5572b88387a2fca249a12b.ctex b/.godot/imported/Player Idle 48x48.png-e8e7ab7fcf5572b88387a2fca249a12b.ctex new file mode 100644 index 0000000000000000000000000000000000000000..25ed9e30f1fdb361b59fe3b93662aca9824580af GIT binary patch literal 910 zcmV;919ALEQ&chm0002s0RR9n00000000gD|Ns900000000000000020002s0Wbgn z00005000110{{S0Nk&Fa0{{S5MM6+kP&iCN0{{Ro-@ywIx1cDJq^7G7z%NO_3jRMC z52#TZNmA7Aav%mY`Ah7d1`0({g({Mj>=zxVKmhU)3j3JAF@k`g$p6s-{%d&df@=Nn zXcvli;a(0DQo`jA)Z)P@2lP(CkRaP`)L3SW6EHC}_Wsujk_Zo3bpJ7;{|+Nb4I4-S z3yGy8Tz!xdB3GE7tfk~r_6GmmBOnqCw^~wb6nT`f2IM>?szWvb9BKS>UXN! zTX$8CkH;73b??HR-6zf~o+AKMxWh7>_`T`Mg)z61pkvw2u0zko%fsJep4?$6PW;~R zxtw=C4l5My?7+^W!(EAUMC2$tpH9CMzc+j?r=1dW7`G0^JNplu;q2Xti(XeEJ)h&D z)9H8O_Xf`e;Pk6h!2oCffinP~BerN@jw8)czZ1VVUAgqV_wz!S!!QP;oVe#mSTrif zVc^7BHT zqm?Wgo?|Ia{N9x1(l-sMY>zW-HDT{?9}J(P1ig(GRp<{+!f`7?JXx(_*@XqhE%q|*|wx+ z>P*17I1~1qN;#I{gy$0QxgeZv+Up(5c2-++W}6am#(1_ir#M$mF~FWXo?{_S%-)iC zDEM3~bylR>y%MbmoQn+x%5hGaA9@i^%--Z+)Z{|CmYnZmoF|!^v!#`&GdkQ{Y%oZU zvNM$61nliF7MLTO@(J`vc#SG^GvyD;l9%{+?w!z8v z49o@Ytg72|N>Keyb8@MSaB}9}yxy?6;Lge%XDc{ix!i!$shx{M^*hbUrLw^(wsVp8 kxssuHXQkh%eQ)mDU0|ExdrT_o{ literal 0 HcmV?d00001 diff --git a/.godot/imported/Player Idle 48x48.png-e8e7ab7fcf5572b88387a2fca249a12b.md5 b/.godot/imported/Player Idle 48x48.png-e8e7ab7fcf5572b88387a2fca249a12b.md5 new file mode 100644 index 0000000..3dd0db8 --- /dev/null +++ b/.godot/imported/Player Idle 48x48.png-e8e7ab7fcf5572b88387a2fca249a12b.md5 @@ -0,0 +1,3 @@ +source_md5="25eca82a8943e0cb7df742fc2f8287eb" +dest_md5="40424c46e7e7da6cb6f8f38becacd5fa" + diff --git a/.godot/imported/player jump 48x48.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.ctex b/.godot/imported/player jump 48x48.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.ctex new file mode 100644 index 0000000000000000000000000000000000000000..dece7b15339b0f1ce6f64e542e27048749978f83 GIT binary patch literal 738 zcmV<80v-KFQ&chm0001x0000m00000000gD|Ns900000000000000020001x05AXm z00005000200ssI~Nk&GZ0ssJ4MM6+kP&iDM0ssInkH8BMx1cDJq^7G7z%NO_3jRMC z52#TZNmA7Aav%mY`Ah7d1`0({g({Mj>=zxVKmhU)3j3JAF@k`g$p6s-{%d&df@=Nn zXcvli;a(0DQo`jA)Z)P@2lP(CkZs#i)mUIa>4*^%@c)0cVOL?5^trx7^dEx2ws9L! z?A?x(vrm}+4*Fs>d@Ze<_a;@ZrQ^Gk-cW1&po8+Px{WbwJwbOZZpd0sqMH_XL#?5M z{{9Fdj84!cpn8{K{AR3X{i|GR<^kszl6yxy`J2E_oU){Qbufv60I%}4-T6$pA?J8_k zW>(@&y6BI5JTen^*^ENeg#>*G@nPXv#mw`(gb+R)E1tWNMdh2lnncW()*Lqxvk#du ztXam~#BDCeO@+YJlAJqd?=#N(9ow1}@IKI_N3A4)JNQg%NzR=y05RXk5!;q!Tu8b# z2?^mi-k>AGxyv~qCut=EgsuZgOHsgk$I$jH#8(_cDSD8oXQ|TQ@p!b5C)9dfg^_a( zgPv7w%?db(3WAZ*1`?tX; zrz#CxbK{iaJ;4=dwaa^POb`?>Qcz$G9Ho?fS7n+YXi~%4W(}-$t&?*p?Yl-V%O1K- zdRPmd3c0S#^`QZ6?Sz(MEg1;Q<&+M)r2$b&IzT}7ksJ~g<_BPOup}x$X_(b1W0Xm0NG#h*=^x?(YD)5` UmXlf)i~2LdFd7oYE-d570698GF#rGn literal 0 HcmV?d00001 diff --git a/.godot/imported/player jump 48x48.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.md5 b/.godot/imported/player jump 48x48.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.md5 new file mode 100644 index 0000000..c3a4d5b --- /dev/null +++ b/.godot/imported/player jump 48x48.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.md5 @@ -0,0 +1,3 @@ +source_md5="32c25d5ee4a6233bebc766fa35137e71" +dest_md5="e2c6a646cfe3495563ee0fd7127f6784" + diff --git a/.godot/imported/player run 48x48.png-626defb011aee5b3f5c54d9acb45d5f5.ctex b/.godot/imported/player run 48x48.png-626defb011aee5b3f5c54d9acb45d5f5.ctex new file mode 100644 index 0000000000000000000000000000000000000000..ccf024fb9f141d30d57d0970beb672e465eadeb7 GIT binary patch literal 1578 zcmV+_2G#jTQ&chm0001h0RR9n00000000gD|Ns900000000000000020001h0Wbgn z000050002;1pok2Nk&HM1pok7MM6+kP&iE91pojqf58h7x1c7Hq^PSdrbxjCGVq`L zctDNPNRpxsgC`I2m)JiI6pEq>K_n^J8B$Pz0OTVS_A!Ds5D*mkKU%d~Ud^qKR-YJ+RAW4xG5uqKqZRAMZljFw5{{OAhF88=5+!l!FKO{+V z!#1--`3md;O5OlTlH|CJ-~dFJ`~Ls80@KZz0Ym4A{zGshNs$!UwRn(~O@DwONpjl; zqya@{g8ctm4|@mfIj5?K{zGuv$dSbA0xn;-Yr-GGf3ilZ8#2N_xL+LGINq9X|Ns8M z{odHdqRzjF4TAUu!M*Yv-=qWDyqIyX&+V<6Hlb|?tv6X^VRaextx ze7--oHyOiZbQGS8cz_XYe7--ow;$U9Ii6+_lTgm>d3A2@gs%^$8Z05XIq%MmG?p6b zQhIw%noBYu;?$E{@6)$sL_ z(ag8dbr~k7mWj*&pALXYM>v*jthZ%Tr zgJ7O#Es4+_(x=BIrOb_MTrRm8U24NQ(#)0SKEdhihxty*#$}tq2M1abi+mSYDI>>O zLa~q%jB1nkG+$E6+?Y0~#(RD~FUIxR*-TY|v`SyUZi za6p@zL(5<`yt7$T$!JinAo1v)Y~=(G(&6uTzwyDdfKVLRwtWYNVZ@qDtEwYD$H@ij z!OBuE1vN)hJ_xj7K-b&F$75M6trI;VCH=SSXe=sHl3h|&N(t*L@05AAKx?by);Cb)|CS zjHQPaSI#N9(7D}iH{C4kb1OeOm4HWMmF^cZ7w0zZ%m z;&K27D^Dd-h*&y@Qy)z7Y-;j|Z`h{_js>hPv>Q1`MkSin6r}{leF|x9R%l-$bR%To zTs**F@KnkSCvF{MrAt9KiA0SlZiI|6p0>-9_$IXj4eKCu3Pc>y;w451wJ(iulpMwATr6&prRh#RKQ!d2_!VHyoqB${Xis3($%EffP6hwW-B zi|o#YHA_ubGudg~Lc&HZFGpg8{xn!wLU4ws<3tEP5O*HTdtN2X>T1Gq7^7tIwQ>Mt zhLNyE+zl$4MCs7a<;C=gVxk!d3KU-bQfWZsGn3wtpoR0E-ver2qf` literal 0 HcmV?d00001 diff --git a/.godot/imported/player run 48x48.png-626defb011aee5b3f5c54d9acb45d5f5.md5 b/.godot/imported/player run 48x48.png-626defb011aee5b3f5c54d9acb45d5f5.md5 new file mode 100644 index 0000000..f9bbe2d --- /dev/null +++ b/.godot/imported/player run 48x48.png-626defb011aee5b3f5c54d9acb45d5f5.md5 @@ -0,0 +1,3 @@ +source_md5="01ad20affe3a719d2248d3eb59a0b3dd" +dest_md5="c7e49f2c0ac84ac6a6d941074f19bd68" + diff --git a/.godot/uid_cache.bin b/.godot/uid_cache.bin index 33dc351ce502b314f22707a281c6d58a1c2b1558..c3455536b4419d6c1055d7f70170d11d81cc78e0 100644 GIT binary patch literal 321 zcmd;JU|=w6Pi=$|jAj zCOIRqC^5MtwFs;%)J3^1DnMRB3|(1zVs0u}g=(34RqFG)IzG6H%;fw$z2dTTiA5_F zrFY0`A*=|H&XFXWjq+ delta 18 ZcmX@e)Xm7k!oa{V(cfmGhWbPn6#ypB1PuTH diff --git a/graphics/Player Idle 48x48.png b/graphics/Player Idle 48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..b618511699269f9bd10ff834f6b382e147588ebd GIT binary patch literal 1853 zcma)7_g9k%7X30{KoA&uC&-k*2m(V}iiV98siI(^NQA(IG9>gOk_3>BBH$vuD&Qj0 zI|zutNC=Ul^rDWTh5#RBW5}0Z;id z0D!HW)LQ)TllZ>qrSM6Dh1{@21Fy#v)&T&1WM%eGr^rIaB8?#7EyK6Nbb3T-b(Qi9 z@b#CjK%>(Gp1cawwlgV<%ZmI`{@Js?c9fa+O`30QKn z&+sZ~v0+J1(Lfg1ne4(UQpF`e_K~L-=Dh`*_s2~4yA!0s+1dw}vR;TC2RIxU>xLj{;*R8j77@10XAu$?wdl)rA^c$Yi(opzgK>%z zXlNW1h(?gJl}r_y8Ksx1eM^;cQRnkFdTqXE93tu3q=FMR0ym+0`DJx6&}P2XkR}y% z_Do=U*?$^VodIz8N(hm9P}jrV-?lF6ZgppqvYR5*-Shi9&LR6E?W) z2TU|K#7iOjWO7mPe9*s+#Nez_cRiwsUz5bwb8u^`iF8j}iF06*`1`u^b_xrGo*MiQ z;kXHMMT4&EyA#&zo5+mmpab0ZB#=lpKbvl(k`0g+I)zh>|AhGKyhWh z*-i42H!1RA1OjP4CIH*ehRbNDDuHdtMxH>7Q9?>Qn@7lWM1{XIKC#q%>(A01*3aT< zLQh%QRUMEqyokC<7cmfWdP8$eqa62U2CJ1W9>CB=#IPK zoIlWU+Cz*FBuUX%)=e>SE!V0*Cyno=q8oJ#6dHXO}{nMM;!qc|BkNNty5-4~yF zi#|bE+@t;x{QGaK;#b8LK(@G*HUzFplPPHRQTG5DGABqxQ{8NLr)-pSSN zm)vTd(vLJT+h*@7b1}TAI#JFEUJbLr+#8IM8XiL+@1{f)jtJi8nr2qsB?7u#RyOI?>S)#x6SdspE( z{zM-Z-6+Ci2PoGh=j%CGhSM`*>Bqzk#Ef&V|K{eG{AxPH1N5wKY~Gn4TFE1=FI`f* zt>Bl7Dr^<$D|pd8pCtd*RajHqbcA+yE6$dTg(2N-YvoiOs25vc+N8bXDU^evrEi$z zjSWmRH;962W!g_3Z(b`IDyC@CGc0CwR_45$7iKhQJ7O(5uq>(i!6j1>#r9a}O%{&F z8(QZpI9=pgG-Nb# zI^Kz!r2K`Lz2Kp?zmEQ7U} zLs5iSL^ysQndjn_Z_)cK!3y?8`13c+Y_To1lzKf`rD(zM^$i(L=C%6^9Hexzmp9TP7J z3x2D_5a!4t4@Lw;++IjPL?TE)*M!XouFOAKKtr?u-6Zv(YkUXdi)sf zak0Mh>nO11+UfNJza4o$n<0Rk1Z07%>MV|KH|Cnd*}PH={w!JoU_k}q;T@2{2S2OR zD+a#QyBe@rHR$i1USRL^qA`5(r#B^2wb1c{XQEaxHcV>?NY(}bx#42)8SNHPEAhx+ zwgbTUmm?2ozQJTIB3(a3CTazbJxT1)Zea|u@~8|2{NOX;WZ4432(zCtQ7d>^3MYza z`pO61;cUJh#UB&2?YppT6D78R|4^6h|6#?IDsW4&75XzcI( zI|u+6TJ`se!ZF#4lOpqh+0S5p*beUt&(-{yaUWs}2=GNDGqzgZXbL{yCx91`EdrAH za5aCX+;6jxRN?`E{`@|6r*cN^Po;%Do_#4@uM~^*CnFzWVt7lNu6Os9ze}qfq(y&z zAN~3LRNk#6AiixSnJ2yu4LOwnk>Ay7)+Q(!7+wzKMJ61R2SEE47DYJB3DHoS125zG z=NfjWa)C7$d|>gvJRb?fU-ZQUv9Iw_V7=DGio;H>%!gN%iq-8`MjGM)49-BT&x$2f zCLY@o5T)$9hFE?0!P#ULO;mw=BX5G;-Lu&+QdMkLz^zYNPI6;W(H&45@yQ*hzGvh%)2y re59^(3$vL{@`WG>f*=TjXb=AZ>!Ac3Jx|zZ00000NkvXXu0mjfKxWs7 literal 0 HcmV?d00001 diff --git a/graphics/player jump 48x48.png.import b/graphics/player jump 48x48.png.import new file mode 100644 index 0000000..c368b57 --- /dev/null +++ b/graphics/player jump 48x48.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cid246g3bgt7a" +path="res://.godot/imported/player jump 48x48.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/player jump 48x48.png" +dest_files=["res://.godot/imported/player jump 48x48.png-44bab2151e6e1eb3cf69ed16e7a4f4ad.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/graphics/player run 48x48.png b/graphics/player run 48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..aca5b5560dba7381b8b06e68e76b1cadf80992cb GIT binary patch literal 3199 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 I)3Fc#A5dKsJ^%m! literal 0 HcmV?d00001 diff --git a/graphics/player run 48x48.png.import b/graphics/player run 48x48.png.import new file mode 100644 index 0000000..d9697ce --- /dev/null +++ b/graphics/player run 48x48.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpocjaij352uj" +path="res://.godot/imported/player run 48x48.png-626defb011aee5b3f5c54d9acb45d5f5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/player run 48x48.png" +dest_files=["res://.godot/imported/player run 48x48.png-626defb011aee5b3f5c54d9acb45d5f5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/scenes/character.tscn b/scenes/character.tscn index 58205a8..060cfe4 100644 --- a/scenes/character.tscn +++ b/scenes/character.tscn @@ -1,18 +1,194 @@ -[gd_scene load_steps=3 format=3 uid="uid://go4yc8hfo1gq"] +[gd_scene load_steps=28 format=3 uid="uid://go4yc8hfo1gq"] [ext_resource type="Script" path="res://scripts/CharacterBody2D.gd" id="1_x87yo"] +[ext_resource type="Texture2D" uid="uid://bjicpmau1iy7y" path="res://graphics/Player Idle 48x48.png" id="2_re2it"] +[ext_resource type="Texture2D" uid="uid://bpocjaij352uj" path="res://graphics/player run 48x48.png" id="3_4gwja"] +[ext_resource type="Texture2D" uid="uid://cid246g3bgt7a" path="res://graphics/player jump 48x48.png" id="3_h032e"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_bkvw7"] +atlas = ExtResource("2_re2it") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2oy63"] +atlas = ExtResource("2_re2it") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_q4cvr"] +atlas = ExtResource("2_re2it") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ib3dq"] +atlas = ExtResource("2_re2it") +region = Rect2(144, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kdna3"] +atlas = ExtResource("2_re2it") +region = Rect2(192, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_muups"] +atlas = ExtResource("2_re2it") +region = Rect2(240, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nkvak"] +atlas = ExtResource("2_re2it") +region = Rect2(288, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fxl5c"] +atlas = ExtResource("2_re2it") +region = Rect2(336, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pnqri"] +atlas = ExtResource("2_re2it") +region = Rect2(384, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_i6dxl"] +atlas = ExtResource("2_re2it") +region = Rect2(432, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fxixe"] +atlas = ExtResource("3_h032e") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mvx11"] +atlas = ExtResource("3_h032e") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a2bf2"] +atlas = ExtResource("3_h032e") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7ad6o"] +atlas = ExtResource("3_4gwja") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yoh57"] +atlas = ExtResource("3_4gwja") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rtw0v"] +atlas = ExtResource("3_4gwja") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_abqek"] +atlas = ExtResource("3_4gwja") +region = Rect2(144, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fqjri"] +atlas = ExtResource("3_4gwja") +region = Rect2(192, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_f8bsf"] +atlas = ExtResource("3_4gwja") +region = Rect2(240, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xgued"] +atlas = ExtResource("3_4gwja") +region = Rect2(288, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_six34"] +atlas = ExtResource("3_4gwja") +region = Rect2(336, 0, 48, 48) + +[sub_resource type="SpriteFrames" id="SpriteFrames_h7tsu"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_bkvw7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2oy63") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_q4cvr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ib3dq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kdna3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_muups") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nkvak") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fxl5c") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pnqri") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_i6dxl") +}], +"loop": true, +"name": &"idle", +"speed": 15.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_fxixe") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mvx11") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_a2bf2") +}], +"loop": false, +"name": &"jump", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_7ad6o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yoh57") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rtw0v") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_abqek") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fqjri") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_f8bsf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xgued") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_six34") +}], +"loop": true, +"name": &"run", +"speed": 15.0 +}] [sub_resource type="CircleShape2D" id="CircleShape2D_ubfw4"] -radius = 13.0384 +radius = 11.0 [node name="CharacterBody2D" type="CharacterBody2D"] position = Vector2(-1, 0) script = ExtResource("1_x87yo") JUMP_VELOCITY = -500.0 PUSH_FORCE = 200 -metadata/_edit_group_ = true + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +sprite_frames = SubResource("SpriteFrames_h7tsu") +animation = &"jump" +autoplay = "idle" +frame = 2 +frame_progress = 1.0 [node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0, 5) shape = SubResource("CircleShape2D_ubfw4") [node name="RightRay" type="RayCast2D" parent="."] diff --git a/scripts/CharacterBody2D.gd b/scripts/CharacterBody2D.gd index 4ea0614..cc6ebc9 100644 --- a/scripts/CharacterBody2D.gd +++ b/scripts/CharacterBody2D.gd @@ -10,6 +10,7 @@ extends CharacterBody2D @onready var left_ray = $LeftRay @onready var marker_right = $MarkerRight @onready var marker_left = $MarkerLeft +@onready var animated_sprite = $AnimatedSprite2D var faceLeft = false var pushLeftEnabled = false @@ -57,8 +58,16 @@ func _physics_process(delta): if direction: velocity.x = direction * SPEED + animated_sprite.flip_h = true if direction <0 else false else: velocity.x = move_toward(velocity.x, 0, SPEED) + if is_on_floor(): + if direction == 0: + animated_sprite.play("idle") + else: + animated_sprite.play("run") + else: + animated_sprite.play("jump") move_and_slide() if right_ray.is_colliding():