From bbcc3d08679ac5050b1c2b874ba9f8e4bb347dd9 Mon Sep 17 00:00:00 2001 From: Minimata Date: Fri, 6 Jun 2025 11:21:53 +0200 Subject: [PATCH] gd: state chart supports dashing. new greybox material --- Movement tests.sln.DotSettings.user | 2 + assets/greybox/greybox.png | Bin 0 -> 16747 bytes assets/greybox/greybox.png.import | 36 ++++++++++++++ assets/greybox/m_greybox.tres | 9 ++++ main.tscn | 46 ++++++++++++++---- .../GridTexture/Dark/texture_01.png.import | 5 +- .../GridTexture/Green/texture_01.png.import | 5 +- .../GridTexture/Light/texture_01.png.import | 5 +- .../GridTexture/Orange/texture_01.png.import | 5 +- .../GridTexture/Red/texture_01.png.import | 5 +- .../PerlinNoise/Gabor 1 - 512x512.png.import | 5 +- .../kenney-green-checkerboar-cc0.png.import | 5 +- player_controller/PlayerController.tscn | 8 +-- player_controller/Scripts/PlayerController.cs | 12 ++++- systems/dash/DashSystem.cs | 17 ++++++- systems/tween_queue/TweenQueueSystem.cs | 11 ++--- 16 files changed, 139 insertions(+), 37 deletions(-) create mode 100644 assets/greybox/greybox.png create mode 100644 assets/greybox/greybox.png.import create mode 100644 assets/greybox/m_greybox.tres diff --git a/Movement tests.sln.DotSettings.user b/Movement tests.sln.DotSettings.user index 665b421..c6ee654 100644 --- a/Movement tests.sln.DotSettings.user +++ b/Movement tests.sln.DotSettings.user @@ -1,2 +1,4 @@  + ForceIncluded + ForceIncluded True \ No newline at end of file diff --git a/assets/greybox/greybox.png b/assets/greybox/greybox.png new file mode 100644 index 0000000000000000000000000000000000000000..f11c841efe6108f3145c386d137581cbf967cc55 GIT binary patch literal 16747 zcmbV!cU)6h*X}w=AVjL*fJlod$jks16bnL*4vLBhV^>5_K~O;ukS;lhy@6%K3Q@)` zf@J^&Osrr*5EVfn#0t_v4+N6jeNI5<{qB3eKkm-&mmE$@&faUU^{nSvo4pz;fQlnh76nGGUU(~t^Sd#zg%KZ^I)jV$XDZpgbWS; zTlDuR=A=X&D+`^O=ZxK7yxJ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~ z6{+rrm04=Xah(O+uIV7M!NqMP_QP*B#9{)+Ppxu!*dYaPH%Sa|CqO{$g=2OweNKNFXJ1eUkOD3B3RLWCg#n%|ef zp4hWiO8;ly$oKse!@Y2cxhE(;MSpFJIXOloKuaR6Vx=8HPxeH@!tS&qMJ^l2@+aqF zA%2(sr7`6W87j}p%)ECa(h*tJ!gJd`7RHWT|Afhe)|0V+kt zAcQ#ydHy)y!yv#trQFgNosN*gi{JN^)=2j*A&`Xi3ol2xxEk=T&m~JI2fbkgRI7d_ z*JHUuMFM2a+91eN-AC7Xf(4|dFW1xQdR%KB;@!IBb01rXlmsidj_K8ZigP2liq>-CDA$x%kHrFL lX8bjS|Bv8ALatpafBKZGf$i;g;>a(ZJ8OaSjhQ~%{|_r!h!+3= literal 0 HcmV?d00001 diff --git a/assets/greybox/greybox.png.import b/assets/greybox/greybox.png.import new file mode 100644 index 0000000..5bd0d87 --- /dev/null +++ b/assets/greybox/greybox.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://hf6y7ws45y8p" +path.s3tc="res://.godot/imported/greybox.png-ff2e1ff515631e83618eb1350d29d6ec.s3tc.ctex" +path.etc2="res://.godot/imported/greybox.png-ff2e1ff515631e83618eb1350d29d6ec.etc2.ctex" +metadata={ +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true +} + +[deps] + +source_file="res://assets/greybox/greybox.png" +dest_files=["res://.godot/imported/greybox.png-ff2e1ff515631e83618eb1350d29d6ec.s3tc.ctex", "res://.godot/imported/greybox.png-ff2e1ff515631e83618eb1350d29d6ec.etc2.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +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=0 diff --git a/assets/greybox/m_greybox.tres b/assets/greybox/m_greybox.tres new file mode 100644 index 0000000..b282485 --- /dev/null +++ b/assets/greybox/m_greybox.tres @@ -0,0 +1,9 @@ +[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://31aulub2nqov"] + +[ext_resource type="Texture2D" uid="uid://hf6y7ws45y8p" path="res://assets/greybox/greybox.png" id="1_qik1o"] + +[resource] +albedo_texture = ExtResource("1_qik1o") +uv1_triplanar = true +uv1_world_triplanar = true +uv2_world_triplanar = true diff --git a/main.tscn b/main.tscn index 55275b8..138b45b 100644 --- a/main.tscn +++ b/main.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=6 format=3 uid="uid://cxbskue0lj2gv"] +[gd_scene load_steps=7 format=3 uid="uid://cxbskue0lj2gv"] [ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_ig7tw"] [ext_resource type="PackedScene" uid="uid://dkr80d2pi0d41" path="res://addons/guide/debugger/guide_debugger.tscn" id="2_0xm2m"] +[ext_resource type="Material" uid="uid://31aulub2nqov" path="res://assets/greybox/m_greybox.tres" id="3_h2yge"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_0xm2m"] sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) @@ -18,6 +19,9 @@ glow_enabled = true [node name="Main" type="Node3D"] +[node name="Player" parent="." instance=ExtResource("1_ig7tw")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.2019, 12.6118, 13.3006) + [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource("Environment_1bvp3") @@ -25,6 +29,11 @@ environment = SubResource("Environment_1bvp3") transform = Transform3D(-0.772218, 0.611111, 0.173844, 0.0446935, -0.220691, 0.974319, 0.633783, 0.760157, 0.143109, 0, 0, 0) shadow_enabled = true +[node name="DebugLayer" type="CanvasLayer" parent="."] + +[node name="GuideDebugger" parent="DebugLayer" instance=ExtResource("2_0xm2m")] +visible = false + [node name="Greybox" type="CSGCombiner3D" parent="."] use_collision = true collision_layer = 3 @@ -33,11 +42,13 @@ collision_layer = 3 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.09619, -0.472656, -0.958893) use_collision = true size = Vector3(100, 1, 100) +material = ExtResource("3_h2yge") [node name="CSGBox3D2" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22, 5, 11.0613) use_collision = true size = Vector3(10, 10, 57.8774) +material = ExtResource("3_h2yge") [node name="Stairs" type="CSGCombiner3D" parent="Greybox"] use_collision = true @@ -45,43 +56,53 @@ use_collision = true [node name="CSGBox3D5" type="CSGBox3D" parent="Greybox/Stairs"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.0294, 0.5, 32.891) size = Vector3(3, 1, 3) +material = ExtResource("3_h2yge") [node name="CSGBox3D6" type="CSGBox3D" parent="Greybox/Stairs"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 1, 29.905) size = Vector3(3, 2, 3) +material = ExtResource("3_h2yge") [node name="CSGBox3D7" type="CSGBox3D" parent="Greybox/Stairs"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 1.5, 26.9138) size = Vector3(3, 3, 3) +material = ExtResource("3_h2yge") [node name="CSGBox3D8" type="CSGBox3D" parent="Greybox/Stairs"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 2, 23.9462) size = Vector3(3, 4, 3) +material = ExtResource("3_h2yge") [node name="CSGBox3D9" type="CSGBox3D" parent="Greybox/Stairs"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 2.5, 20.975) size = Vector3(3, 5, 3) +material = ExtResource("3_h2yge") [node name="CSGBox3D10" type="CSGBox3D" parent="Greybox/Stairs"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 3, 17.9825) size = Vector3(3, 6, 3) +material = ExtResource("3_h2yge") [node name="CSGBox3D11" type="CSGBox3D" parent="Greybox/Stairs"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 3.5, 15) size = Vector3(3, 7, 3) +material = ExtResource("3_h2yge") [node name="CSGBox3D12" type="CSGBox3D" parent="Greybox/Stairs"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 4, 12.018) size = Vector3(3, 8, 3) +material = ExtResource("3_h2yge") [node name="CSGBox3D13" type="CSGBox3D" parent="Greybox/Stairs"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.029, 4.5, 9.04904) size = Vector3(3, 9, 3) +material = ExtResource("3_h2yge") [node name="CSGBox3D3" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.0524, 10.795, 6.27246) use_collision = true size = Vector3(39.9961, 21.6211, 2.62695) +material = ExtResource("3_h2yge") [node name="CSGCylinder3D" type="CSGCylinder3D" parent="Greybox/CSGBox3D3"] transform = Transform3D(4.2, 0, 0, 0, -6.11959e-08, -7, 0, 1.4, -3.0598e-07, 8.96759, -10.8105, -0.293446) @@ -101,79 +122,86 @@ sides = 40 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 35.9586, 5, 15.3133) use_collision = true size = Vector3(25.9171, 10, 66.0572) +material = ExtResource("3_h2yge") [node name="CSGBox3D9" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.5038, 2.5, 7.30957) size = Vector3(3, 5, 25.3809) +material = ExtResource("3_h2yge") [node name="CSGBox3D10" type="CSGBox3D" parent="Greybox"] transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 11.517, 1.29345, 21.5) size = Vector3(3, 2.5, 22.978) +material = ExtResource("3_h2yge") [node name="CSGBox3D5" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.45774, 10.7885, -6.46509) use_collision = true size = Vector3(2.15405, 21.577, 22.8794) +material = ExtResource("3_h2yge") [node name="CSGBox3D6" type="CSGBox3D" parent="Greybox"] transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -7.80455, 10.8026, -16.8324) use_collision = true size = Vector3(2.15405, 21.6052, 18.459) +material = ExtResource("3_h2yge") [node name="CSGBox3D7" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 45.6363, 5, -30.4887) use_collision = true size = Vector3(6.8864, 10, 40.8848) +material = ExtResource("3_h2yge") [node name="CSGBox3D8" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 50.0149, 26.122, -0.963737) use_collision = true size = Vector3(2.14108, 52.2441, 99.9347) +material = ExtResource("3_h2yge") [node name="CSGBox3D11" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -28.1405, 26.122, -0.963737) use_collision = true size = Vector3(2.14108, 52.2441, 99.9347) +material = ExtResource("3_h2yge") [node name="CSGBox3D12" type="CSGBox3D" parent="Greybox"] transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 8.92915, 26.122, -49.9656) use_collision = true size = Vector3(2.14108, 52.2441, 99.9347) +material = ExtResource("3_h2yge") [node name="CSGBox3D13" type="CSGBox3D" parent="Greybox"] transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 10.7529, 26.122, 49.3889) use_collision = true size = Vector3(2.14108, 52.2441, 99.9347) +material = ExtResource("3_h2yge") [node name="CSGBox3D14" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.534, 10.8458, 27.1386) use_collision = true size = Vector3(1.10791, 1.71436, 25.7228) +material = ExtResource("3_h2yge") [node name="CSGBox3D15" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10.9058, 10.795, 47.0594) use_collision = true size = Vector3(76.2239, 21.6211, 2.62695) +material = ExtResource("3_h2yge") [node name="CSGBox3D16" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -13.8856, 21.8279, -5.20281) use_collision = true size = Vector3(74.1406, 1, 25.6403) +material = ExtResource("3_h2yge") [node name="CSGBox3D17" type="CSGBox3D" parent="Greybox"] transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -22.0327, 10.786, -16.8929) use_collision = true size = Vector3(2.03296, 2.20193, 10.1753) +material = ExtResource("3_h2yge") [node name="CSGBox3D18" type="CSGBox3D" parent="Greybox"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.534, 10.9583, -4.19618) use_collision = true size = Vector3(1.10791, 1.71436, 23.4043) - -[node name="Player" parent="." instance=ExtResource("1_ig7tw")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.2019, 12.6118, 13.3006) - -[node name="DebugLayer" type="CanvasLayer" parent="."] - -[node name="GuideDebugger" parent="DebugLayer" instance=ExtResource("2_0xm2m")] -visible = false +material = ExtResource("3_h2yge") diff --git a/player_controller/Assets/Textures/GridTexture/Dark/texture_01.png.import b/player_controller/Assets/Textures/GridTexture/Dark/texture_01.png.import index 97b37c2..824bacb 100644 --- a/player_controller/Assets/Textures/GridTexture/Dark/texture_01.png.import +++ b/player_controller/Assets/Textures/GridTexture/Dark/texture_01.png.import @@ -3,16 +3,17 @@ importer="texture" type="CompressedTexture2D" uid="uid://boasm0g587eov" +path.s3tc="res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.s3tc.ctex" path.etc2="res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.etc2.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://player_controller/Assets/Textures/GridTexture/Dark/texture_01.png" -dest_files=["res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.etc2.ctex"] +dest_files=["res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.s3tc.ctex", "res://.godot/imported/texture_01.png-9deee4bf2e81814eb5c9325f2657f8c8.etc2.ctex"] [params] diff --git a/player_controller/Assets/Textures/GridTexture/Green/texture_01.png.import b/player_controller/Assets/Textures/GridTexture/Green/texture_01.png.import index bb1f6a3..c0756a2 100644 --- a/player_controller/Assets/Textures/GridTexture/Green/texture_01.png.import +++ b/player_controller/Assets/Textures/GridTexture/Green/texture_01.png.import @@ -3,16 +3,17 @@ importer="texture" type="CompressedTexture2D" uid="uid://3e1klega6uye" +path.s3tc="res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.s3tc.ctex" path.etc2="res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.etc2.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://player_controller/Assets/Textures/GridTexture/Green/texture_01.png" -dest_files=["res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.etc2.ctex"] +dest_files=["res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.s3tc.ctex", "res://.godot/imported/texture_01.png-ae5afc2ae737d1e792f0b8a0a5af4d3f.etc2.ctex"] [params] diff --git a/player_controller/Assets/Textures/GridTexture/Light/texture_01.png.import b/player_controller/Assets/Textures/GridTexture/Light/texture_01.png.import index cad96a2..681440f 100644 --- a/player_controller/Assets/Textures/GridTexture/Light/texture_01.png.import +++ b/player_controller/Assets/Textures/GridTexture/Light/texture_01.png.import @@ -3,16 +3,17 @@ importer="texture" type="CompressedTexture2D" uid="uid://0t6ie0fkv2op" +path.s3tc="res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.s3tc.ctex" path.etc2="res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.etc2.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://player_controller/Assets/Textures/GridTexture/Light/texture_01.png" -dest_files=["res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.etc2.ctex"] +dest_files=["res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.s3tc.ctex", "res://.godot/imported/texture_01.png-1dcf4b27bd12b1fd18e6c870b30bb902.etc2.ctex"] [params] diff --git a/player_controller/Assets/Textures/GridTexture/Orange/texture_01.png.import b/player_controller/Assets/Textures/GridTexture/Orange/texture_01.png.import index 5ac5649..832a0d2 100644 --- a/player_controller/Assets/Textures/GridTexture/Orange/texture_01.png.import +++ b/player_controller/Assets/Textures/GridTexture/Orange/texture_01.png.import @@ -3,16 +3,17 @@ importer="texture" type="CompressedTexture2D" uid="uid://t10lfkxrg7ay" +path.s3tc="res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.s3tc.ctex" path.etc2="res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.etc2.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://player_controller/Assets/Textures/GridTexture/Orange/texture_01.png" -dest_files=["res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.etc2.ctex"] +dest_files=["res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.s3tc.ctex", "res://.godot/imported/texture_01.png-2d26b48d2dec4e4e9eea4b1c047417c0.etc2.ctex"] [params] diff --git a/player_controller/Assets/Textures/GridTexture/Red/texture_01.png.import b/player_controller/Assets/Textures/GridTexture/Red/texture_01.png.import index bf717ef..3d26250 100644 --- a/player_controller/Assets/Textures/GridTexture/Red/texture_01.png.import +++ b/player_controller/Assets/Textures/GridTexture/Red/texture_01.png.import @@ -3,16 +3,17 @@ importer="texture" type="CompressedTexture2D" uid="uid://dgix86l87u86s" +path.s3tc="res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.s3tc.ctex" path.etc2="res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.etc2.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://player_controller/Assets/Textures/GridTexture/Red/texture_01.png" -dest_files=["res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.etc2.ctex"] +dest_files=["res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.s3tc.ctex", "res://.godot/imported/texture_01.png-a7949be0e945f82b88e838fe48a6f350.etc2.ctex"] [params] diff --git a/player_controller/Assets/Textures/PerlinNoise/Gabor 1 - 512x512.png.import b/player_controller/Assets/Textures/PerlinNoise/Gabor 1 - 512x512.png.import index 794c94c..9da5157 100644 --- a/player_controller/Assets/Textures/PerlinNoise/Gabor 1 - 512x512.png.import +++ b/player_controller/Assets/Textures/PerlinNoise/Gabor 1 - 512x512.png.import @@ -3,16 +3,17 @@ importer="texture" type="CompressedTexture2D" uid="uid://woq2hudxhckr" +path.s3tc="res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.s3tc.ctex" path.etc2="res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.etc2.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://player_controller/Assets/Textures/PerlinNoise/Gabor 1 - 512x512.png" -dest_files=["res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.etc2.ctex"] +dest_files=["res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.s3tc.ctex", "res://.godot/imported/Gabor 1 - 512x512.png-35241d8f4670c338b8c89a271f5b5891.etc2.ctex"] [params] diff --git a/player_controller/Examples/MovementTestbed/Hills/kenney-green-checkerboar-cc0.png.import b/player_controller/Examples/MovementTestbed/Hills/kenney-green-checkerboar-cc0.png.import index 0baa577..e9c1f25 100644 --- a/player_controller/Examples/MovementTestbed/Hills/kenney-green-checkerboar-cc0.png.import +++ b/player_controller/Examples/MovementTestbed/Hills/kenney-green-checkerboar-cc0.png.import @@ -3,16 +3,17 @@ importer="texture" type="CompressedTexture2D" uid="uid://lp2pt8mtj7ty" +path.s3tc="res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.s3tc.ctex" path.etc2="res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.etc2.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true } [deps] source_file="res://player_controller/Examples/MovementTestbed/Hills/kenney-green-checkerboar-cc0.png" -dest_files=["res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.etc2.ctex"] +dest_files=["res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.s3tc.ctex", "res://.godot/imported/kenney-green-checkerboar-cc0.png-2ce8609a39a655125c8e037014f6f2db.etc2.ctex"] [params] diff --git a/player_controller/PlayerController.tscn b/player_controller/PlayerController.tscn index 07ac3e4..b3c64f7 100644 --- a/player_controller/PlayerController.tscn +++ b/player_controller/PlayerController.tscn @@ -141,7 +141,7 @@ script = ExtResource("27_34snm") [node name="ToAiming" type="Node" parent="StateChart/Root/WeaponInHand"] script = ExtResource("28_n7qhm") to = NodePath("../../Aiming") -event = &"aim_triggered" +event = &"aim_pressed" delay_in_seconds = "0.0" [node name="Aiming" type="Node" parent="StateChart/Root"] @@ -162,7 +162,7 @@ delay_in_seconds = "0.0" [node name="ToWeaponThrown" type="Node" parent="StateChart/Root/Aiming"] script = ExtResource("28_n7qhm") to = NodePath("../../WeaponThrown") -event = &"hit_triggered" +event = &"hit_pressed" delay_in_seconds = "0.0" [node name="Dashing" type="Node" parent="StateChart/Root"] @@ -171,7 +171,7 @@ script = ExtResource("27_34snm") [node name="ToWeaponInHand" type="Node" parent="StateChart/Root/Dashing"] script = ExtResource("28_n7qhm") to = NodePath("../../WeaponInHand") -event = &"dash_finished" +event = &"dash_ended" delay_in_seconds = "0.0" [node name="WeaponThrown" type="Node" parent="StateChart/Root"] @@ -180,7 +180,7 @@ script = ExtResource("27_34snm") [node name="ToDashing" type="Node" parent="StateChart/Root/WeaponThrown"] script = ExtResource("28_n7qhm") to = NodePath("../../Dashing") -event = &"aim_started" +event = &"aim_pressed" delay_in_seconds = "0.0" [connection signal="input_aim_canceled" from="InputController" to="." method="OnInputAimCanceled"] diff --git a/player_controller/Scripts/PlayerController.cs b/player_controller/Scripts/PlayerController.cs index e595b0f..5c760d9 100644 --- a/player_controller/Scripts/PlayerController.cs +++ b/player_controller/Scripts/PlayerController.cs @@ -110,6 +110,7 @@ public partial class PlayerController : CharacterBody3D DashSystem = GetNode("DashSystem"); DashSystem.Init(HeadSystem, camera, TweenQueueSystem); + DashSystem.DashEnded += OnDashEnded; HealthSystem = GetNode("HealthSystem"); @@ -143,7 +144,7 @@ public partial class PlayerController : CharacterBody3D public void OnInputAimPressed() { - PlayerState.SendEvent("aim_started"); + PlayerState.SendEvent("aim_pressed"); if (_dashCanceled) return; @@ -152,19 +153,21 @@ public partial class PlayerController : CharacterBody3D } public void OnInputAimReleased() { + PlayerState.SendEvent("aim_released"); if (!_dashCanceled) DashSystem.Dash(); _dashCanceled = false; } public void OnInputAimCanceled() { + PlayerState.SendEvent("aim_canceled"); _dashCanceled = true; DashSystem.CancelDash(); } public void OnInputHitPressed() { - GD.Print("OnInputHitPressed"); + PlayerState.SendEvent("hit_pressed"); } public void OnInputJumpPressed() @@ -176,6 +179,11 @@ public partial class PlayerController : CharacterBody3D MoveSystem.Jump(IsOnFloor()); } + public void OnDashEnded() + { + PlayerState.SendEvent("dash_ended"); + } + public override void _PhysicsProcess(double delta) { TweenQueueSystem.ProcessTweens(); diff --git a/systems/dash/DashSystem.cs b/systems/dash/DashSystem.cs index 7b33c75..88abcc1 100644 --- a/systems/dash/DashSystem.cs +++ b/systems/dash/DashSystem.cs @@ -21,6 +21,11 @@ public partial class DashSystem: Node3D private DashResolve _dashResolve; + [Signal] + public delegate void DashStartedEventHandler(); + [Signal] + public delegate void DashEndedEventHandler(); + public void Init(Node3D head, Camera3D camera, TweenQueueSystem tweenQueueSystem) { _dashCast3D = GetNode("DashCast3D"); @@ -82,13 +87,21 @@ public partial class DashSystem: Node3D _dashTarget.SetVisible(false); } + public void DashTweenEnded() + { + EmitSignal(SignalName.DashEnded); + } + public void Dash() { + EmitSignal(SignalName.DashStarted); _dashTarget.SetVisible(false); - _tweenQueueSystem.QueueTween(_dashResolve.DashLocation, 0.1f); + var dashTweenInputs = new TweenQueueSystem.TweenInputs(_dashResolve.DashLocation, 0.1f); + var dashTween = _tweenQueueSystem.TweenToLocation(dashTweenInputs); + dashTween.Finished += DashTweenEnded; if (_dashResolve.EndWithMantle) { - _tweenQueueSystem.QueueTween(_dashResolve.MantleLocation, 0.1f); + _tweenQueueSystem.QueueTween(_dashResolve.MantleLocation, 0.2f); } } } diff --git a/systems/tween_queue/TweenQueueSystem.cs b/systems/tween_queue/TweenQueueSystem.cs index d2b697f..dc611b6 100644 --- a/systems/tween_queue/TweenQueueSystem.cs +++ b/systems/tween_queue/TweenQueueSystem.cs @@ -10,10 +10,12 @@ public partial class TweenQueueSystem : Node3D private Queue _tweenInputs = new Queue(); private Node3D _tweenObject; private bool _isTweening = false; + private Callable _tweenEndedCallback; public void Init(Node3D tweenObject) { _tweenObject = tweenObject; + _tweenEndedCallback = new Callable(this, MethodName.EndTween); } public void EndTween() @@ -21,18 +23,15 @@ public partial class TweenQueueSystem : Node3D _isTweening = false; } - private void TweenToLocation(TweenInputs inputs) + public Tween TweenToLocation(TweenInputs inputs) { var (location, duration) = inputs; var tween = GetTree().CreateTween(); - var callback = new Callable(this, MethodName.EndTween); - tween.TweenProperty(_tweenObject, "position", location, duration); - tween.TweenCallback(callback); - + tween.TweenCallback(_tweenEndedCallback); _isTweening = true; - tween.Play(); + return tween; } public void QueueTween(TweenInputs inputs)