diff --git a/addons/kenney_particle_pack/flame_01.png.import b/addons/kenney_particle_pack/flame_01.png.import index e73cfec..d0437f7 100644 --- a/addons/kenney_particle_pack/flame_01.png.import +++ b/addons/kenney_particle_pack/flame_01.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://bukf50yk87utm" -path="res://.godot/imported/flame_01.png-578039d34a9ea6c8d8af8e6077b372a7.ctex" +path.s3tc="res://.godot/imported/flame_01.png-578039d34a9ea6c8d8af8e6077b372a7.s3tc.ctex" +path.etc2="res://.godot/imported/flame_01.png-578039d34a9ea6c8d8af8e6077b372a7.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/flame_01.png" -dest_files=["res://.godot/imported/flame_01.png-578039d34a9ea6c8d8af8e6077b372a7.ctex"] +dest_files=["res://.godot/imported/flame_01.png-578039d34a9ea6c8d8af8e6077b372a7.s3tc.ctex", "res://.godot/imported/flame_01.png-578039d34a9ea6c8d8af8e6077b372a7.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/addons/kenney_particle_pack/flame_02.png.import b/addons/kenney_particle_pack/flame_02.png.import index fea5cb2..0e09c54 100644 --- a/addons/kenney_particle_pack/flame_02.png.import +++ b/addons/kenney_particle_pack/flame_02.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://cby0q0kwwuu1w" -path="res://.godot/imported/flame_02.png-13f314bbf868fa240cf692eff6560a3b.ctex" +path.s3tc="res://.godot/imported/flame_02.png-13f314bbf868fa240cf692eff6560a3b.s3tc.ctex" +path.etc2="res://.godot/imported/flame_02.png-13f314bbf868fa240cf692eff6560a3b.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/flame_02.png" -dest_files=["res://.godot/imported/flame_02.png-13f314bbf868fa240cf692eff6560a3b.ctex"] +dest_files=["res://.godot/imported/flame_02.png-13f314bbf868fa240cf692eff6560a3b.s3tc.ctex", "res://.godot/imported/flame_02.png-13f314bbf868fa240cf692eff6560a3b.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/addons/kenney_particle_pack/flame_03.png.import b/addons/kenney_particle_pack/flame_03.png.import index 873f7f6..5500a5d 100644 --- a/addons/kenney_particle_pack/flame_03.png.import +++ b/addons/kenney_particle_pack/flame_03.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://csjepyy0qqg76" -path="res://.godot/imported/flame_03.png-aa573b91da2c8daf70550680d9f23b7b.ctex" +path.s3tc="res://.godot/imported/flame_03.png-aa573b91da2c8daf70550680d9f23b7b.s3tc.ctex" +path.etc2="res://.godot/imported/flame_03.png-aa573b91da2c8daf70550680d9f23b7b.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/flame_03.png" -dest_files=["res://.godot/imported/flame_03.png-aa573b91da2c8daf70550680d9f23b7b.ctex"] +dest_files=["res://.godot/imported/flame_03.png-aa573b91da2c8daf70550680d9f23b7b.s3tc.ctex", "res://.godot/imported/flame_03.png-aa573b91da2c8daf70550680d9f23b7b.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/addons/kenney_particle_pack/spark_01.png.import b/addons/kenney_particle_pack/spark_01.png.import index b4df555..dbb82c4 100644 --- a/addons/kenney_particle_pack/spark_01.png.import +++ b/addons/kenney_particle_pack/spark_01.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://cykuuu3rfqm7d" -path="res://.godot/imported/spark_01.png-5d3cd8844c4c7bf36ab5c15bbdf2212f.ctex" +path.s3tc="res://.godot/imported/spark_01.png-5d3cd8844c4c7bf36ab5c15bbdf2212f.s3tc.ctex" +path.etc2="res://.godot/imported/spark_01.png-5d3cd8844c4c7bf36ab5c15bbdf2212f.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/spark_01.png" -dest_files=["res://.godot/imported/spark_01.png-5d3cd8844c4c7bf36ab5c15bbdf2212f.ctex"] +dest_files=["res://.godot/imported/spark_01.png-5d3cd8844c4c7bf36ab5c15bbdf2212f.s3tc.ctex", "res://.godot/imported/spark_01.png-5d3cd8844c4c7bf36ab5c15bbdf2212f.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/addons/kenney_particle_pack/spark_02.png.import b/addons/kenney_particle_pack/spark_02.png.import index e757cb9..3bdf6e7 100644 --- a/addons/kenney_particle_pack/spark_02.png.import +++ b/addons/kenney_particle_pack/spark_02.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://dveqynfgdfrt3" -path="res://.godot/imported/spark_02.png-5e50dbc434260af2153ca5a43e08726b.ctex" +path.s3tc="res://.godot/imported/spark_02.png-5e50dbc434260af2153ca5a43e08726b.s3tc.ctex" +path.etc2="res://.godot/imported/spark_02.png-5e50dbc434260af2153ca5a43e08726b.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/spark_02.png" -dest_files=["res://.godot/imported/spark_02.png-5e50dbc434260af2153ca5a43e08726b.ctex"] +dest_files=["res://.godot/imported/spark_02.png-5e50dbc434260af2153ca5a43e08726b.s3tc.ctex", "res://.godot/imported/spark_02.png-5e50dbc434260af2153ca5a43e08726b.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/addons/kenney_particle_pack/spark_03.png.import b/addons/kenney_particle_pack/spark_03.png.import index 780c71e..be380de 100644 --- a/addons/kenney_particle_pack/spark_03.png.import +++ b/addons/kenney_particle_pack/spark_03.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://cc750lgosa8v2" -path="res://.godot/imported/spark_03.png-5b4ca9b4022ebca888e09309cbd4a81b.ctex" +path.s3tc="res://.godot/imported/spark_03.png-5b4ca9b4022ebca888e09309cbd4a81b.s3tc.ctex" +path.etc2="res://.godot/imported/spark_03.png-5b4ca9b4022ebca888e09309cbd4a81b.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/spark_03.png" -dest_files=["res://.godot/imported/spark_03.png-5b4ca9b4022ebca888e09309cbd4a81b.ctex"] +dest_files=["res://.godot/imported/spark_03.png-5b4ca9b4022ebca888e09309cbd4a81b.s3tc.ctex", "res://.godot/imported/spark_03.png-5b4ca9b4022ebca888e09309cbd4a81b.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/addons/kenney_particle_pack/spark_04.png.import b/addons/kenney_particle_pack/spark_04.png.import index a6f4620..21978a0 100644 --- a/addons/kenney_particle_pack/spark_04.png.import +++ b/addons/kenney_particle_pack/spark_04.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://cbwl2u2v3ng4r" -path="res://.godot/imported/spark_04.png-08436cfd8d8b364232b4851b8c322296.ctex" +path.s3tc="res://.godot/imported/spark_04.png-08436cfd8d8b364232b4851b8c322296.s3tc.ctex" +path.etc2="res://.godot/imported/spark_04.png-08436cfd8d8b364232b4851b8c322296.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/spark_04.png" -dest_files=["res://.godot/imported/spark_04.png-08436cfd8d8b364232b4851b8c322296.ctex"] +dest_files=["res://.godot/imported/spark_04.png-08436cfd8d8b364232b4851b8c322296.s3tc.ctex", "res://.godot/imported/spark_04.png-08436cfd8d8b364232b4851b8c322296.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/addons/kenney_particle_pack/spark_05.png.import b/addons/kenney_particle_pack/spark_05.png.import index 20eee10..8f61030 100644 --- a/addons/kenney_particle_pack/spark_05.png.import +++ b/addons/kenney_particle_pack/spark_05.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://knj3xwimgy57" -path="res://.godot/imported/spark_05.png-b79596ab24169d29e58c4e40317a2373.ctex" +path.s3tc="res://.godot/imported/spark_05.png-b79596ab24169d29e58c4e40317a2373.s3tc.ctex" +path.etc2="res://.godot/imported/spark_05.png-b79596ab24169d29e58c4e40317a2373.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/spark_05.png" -dest_files=["res://.godot/imported/spark_05.png-b79596ab24169d29e58c4e40317a2373.ctex"] +dest_files=["res://.godot/imported/spark_05.png-b79596ab24169d29e58c4e40317a2373.s3tc.ctex", "res://.godot/imported/spark_05.png-b79596ab24169d29e58c4e40317a2373.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/addons/kenney_particle_pack/spark_06.png.import b/addons/kenney_particle_pack/spark_06.png.import index 7740df2..3145984 100644 --- a/addons/kenney_particle_pack/spark_06.png.import +++ b/addons/kenney_particle_pack/spark_06.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://cjsb6q05mu0bf" -path="res://.godot/imported/spark_06.png-2149877f56d761f9fef62e5b224acc12.ctex" +path.s3tc="res://.godot/imported/spark_06.png-2149877f56d761f9fef62e5b224acc12.s3tc.ctex" +path.etc2="res://.godot/imported/spark_06.png-2149877f56d761f9fef62e5b224acc12.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/spark_06.png" -dest_files=["res://.godot/imported/spark_06.png-2149877f56d761f9fef62e5b224acc12.ctex"] +dest_files=["res://.godot/imported/spark_06.png-2149877f56d761f9fef62e5b224acc12.s3tc.ctex", "res://.godot/imported/spark_06.png-2149877f56d761f9fef62e5b224acc12.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/addons/kenney_particle_pack/spark_07.png.import b/addons/kenney_particle_pack/spark_07.png.import index ad19ba5..765bc9c 100644 --- a/addons/kenney_particle_pack/spark_07.png.import +++ b/addons/kenney_particle_pack/spark_07.png.import @@ -3,25 +3,27 @@ importer="texture" type="CompressedTexture2D" uid="uid://bgemqk22k1lq7" -path="res://.godot/imported/spark_07.png-bb4af08be8c2fa7113b6f1bb60fb4de6.ctex" +path.s3tc="res://.godot/imported/spark_07.png-bb4af08be8c2fa7113b6f1bb60fb4de6.s3tc.ctex" +path.etc2="res://.godot/imported/spark_07.png-bb4af08be8c2fa7113b6f1bb60fb4de6.etc2.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc", "etc2_astc"], +"vram_texture": true } [deps] source_file="res://addons/kenney_particle_pack/spark_07.png" -dest_files=["res://.godot/imported/spark_07.png-bb4af08be8c2fa7113b6f1bb60fb4de6.ctex"] +dest_files=["res://.godot/imported/spark_07.png-bb4af08be8c2fa7113b6f1bb60fb4de6.s3tc.ctex", "res://.godot/imported/spark_07.png-bb4af08be8c2fa7113b6f1bb60fb4de6.etc2.ctex"] [params] -compress/mode=0 +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=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +33,4 @@ 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 +detect_3d/compress_to=0 diff --git a/ar/hands/hand_pose_action_map.tres b/ar/hands/hand_pose_action_map.tres index ed56a64..3fab056 100644 --- a/ar/hands/hand_pose_action_map.tres +++ b/ar/hands/hand_pose_action_map.tres @@ -1,22 +1,29 @@ -[gd_resource type="Resource" script_class="HandPoseActionMap" load_steps=7 format=3 uid="uid://c7gtqq7mvo024"] +[gd_resource type="Resource" script_class="HandPoseActionMap" load_steps=9 format=3 uid="uid://c7gtqq7mvo024"] [ext_resource type="Script" path="res://addons/hand_pose_detector/hand_pose_action.gd" id="1_5g380"] [ext_resource type="Resource" uid="uid://dhbqusuodrl3r" path="res://addons/hand_pose_detector/poses/fist.tres" id="2_pe5e8"] -[ext_resource type="Resource" uid="uid://c5pg3bqcsep5y" path="res://addons/hand_pose_detector/poses/metal.tres" id="3_d646n"] +[ext_resource type="Resource" uid="uid://ceofxcl7q122" path="res://addons/hand_pose_detector/poses/point.tres" id="3_dk2tv"] [ext_resource type="Script" path="res://addons/hand_pose_detector/hand_pose_action_map.gd" id="4_2myt4"] +[ext_resource type="Resource" uid="uid://8kyxp8p3nnv0" path="res://ar/hands/lightning.tres" id="4_4ccfd"] [sub_resource type="Resource" id="Resource_uf4kw"] script = ExtResource("1_5g380") pose = ExtResource("2_pe5e8") action_type = 0 +action_name = "charge" + +[sub_resource type="Resource" id="Resource_cc2a6"] +script = ExtResource("1_5g380") +pose = ExtResource("3_dk2tv") +action_type = 0 action_name = "fireball" [sub_resource type="Resource" id="Resource_5y3a0"] script = ExtResource("1_5g380") -pose = ExtResource("3_d646n") +pose = ExtResource("4_4ccfd") action_type = 0 action_name = "lightning" [resource] script = ExtResource("4_2myt4") -actions = Array[ExtResource("1_5g380")]([SubResource("Resource_uf4kw"), SubResource("Resource_5y3a0")]) +actions = Array[ExtResource("1_5g380")]([SubResource("Resource_uf4kw"), SubResource("Resource_cc2a6"), SubResource("Resource_5y3a0")]) diff --git a/ar/hands/hand_pose_set.tres b/ar/hands/hand_pose_set.tres index bfa6a5b..16a9f14 100644 --- a/ar/hands/hand_pose_set.tres +++ b/ar/hands/hand_pose_set.tres @@ -1,10 +1,11 @@ -[gd_resource type="Resource" script_class="HandPoseSet" load_steps=5 format=3 uid="uid://bmmigv35h8cxa"] +[gd_resource type="Resource" script_class="HandPoseSet" load_steps=6 format=3 uid="uid://bmmigv35h8cxa"] [ext_resource type="Script" path="res://addons/hand_pose_detector/hand_pose.gd" id="1_vg67v"] [ext_resource type="Resource" uid="uid://dhbqusuodrl3r" path="res://addons/hand_pose_detector/poses/fist.tres" id="2_c4yhd"] -[ext_resource type="Resource" uid="uid://c5pg3bqcsep5y" path="res://addons/hand_pose_detector/poses/metal.tres" id="3_cneg2"] +[ext_resource type="Resource" uid="uid://ceofxcl7q122" path="res://addons/hand_pose_detector/poses/point.tres" id="3_a70uy"] [ext_resource type="Script" path="res://addons/hand_pose_detector/hand_pose_set.gd" id="4_f1s8l"] +[ext_resource type="Resource" uid="uid://8kyxp8p3nnv0" path="res://ar/hands/lightning.tres" id="4_ukem6"] [resource] script = ExtResource("4_f1s8l") -poses = Array[ExtResource("1_vg67v")]([ExtResource("2_c4yhd"), ExtResource("3_cneg2")]) +poses = Array[ExtResource("1_vg67v")]([ExtResource("2_c4yhd"), ExtResource("3_a70uy"), ExtResource("4_ukem6")]) diff --git a/ar/hands/lightning.tres b/ar/hands/lightning.tres new file mode 100644 index 0000000..7a9bd16 --- /dev/null +++ b/ar/hands/lightning.tres @@ -0,0 +1,101 @@ +[gd_resource type="Resource" script_class="HandPose" load_steps=13 format=3 uid="uid://8kyxp8p3nnv0"] + +[ext_resource type="Script" path="res://addons/hand_pose_detector/fitness_function.gd" id="1_6gpoa"] +[ext_resource type="Script" path="res://addons/hand_pose_detector/hand_pose.gd" id="2_kb37q"] + +[sub_resource type="Resource" id="Resource_xltr5"] +script = ExtResource("1_6gpoa") +type = 1 +min = 4.0 +from = 7.0 +to = 13.0 +max = 16.0 + +[sub_resource type="Resource" id="Resource_hp7ec"] +script = ExtResource("1_6gpoa") +type = 1 +min = 4.0 +from = 7.0 +to = 13.0 +max = 16.0 + +[sub_resource type="Resource" id="Resource_rudpc"] +script = ExtResource("1_6gpoa") +type = 1 +min = -20.0 +from = -15.0 +to = 15.0 +max = 20.0 + +[sub_resource type="Resource" id="Resource_u5l6k"] +script = ExtResource("1_6gpoa") +type = 1 +min = -20.0 +from = -15.0 +to = 15.0 +max = 20.0 + +[sub_resource type="Resource" id="Resource_2krph"] +script = ExtResource("1_6gpoa") +type = 1 +min = -20.0 +from = -15.0 +to = 15.0 +max = 20.0 + +[sub_resource type="Resource" id="Resource_mtrhp"] +script = ExtResource("1_6gpoa") +type = 1 +min = -20.0 +from = -15.0 +to = 15.0 +max = 20.0 + +[sub_resource type="Resource" id="Resource_nguvj"] +script = ExtResource("1_6gpoa") +type = 1 +min = -20.0 +from = -15.0 +to = 15.0 +max = 20.0 + +[sub_resource type="Resource" id="Resource_65cb0"] +script = ExtResource("1_6gpoa") +type = 1 +min = -20.0 +from = -15.0 +to = 15.0 +max = 20.0 + +[sub_resource type="Resource" id="Resource_mg0wa"] +script = ExtResource("1_6gpoa") +type = 1 +min = -20.0 +from = -15.0 +to = 15.0 +max = 20.0 + +[sub_resource type="Resource" id="Resource_gi5nw"] +script = ExtResource("1_6gpoa") +type = 1 +min = -20.0 +from = -15.0 +to = 15.0 +max = 20.0 + +[resource] +script = ExtResource("2_kb37q") +pose_name = "Lightning" +threshold = 0.3 +hold_time = 0.2 +release_time = 0.2 +flexion_index = SubResource("Resource_nguvj") +flexion_middle = SubResource("Resource_65cb0") +flexion_ring = SubResource("Resource_gi5nw") +flexion_pinky = SubResource("Resource_mg0wa") +curl_index = SubResource("Resource_rudpc") +curl_middle = SubResource("Resource_u5l6k") +curl_ring = SubResource("Resource_mtrhp") +curl_pinky = SubResource("Resource_2krph") +abduction_index_middle = SubResource("Resource_xltr5") +abduction_middle_ring = SubResource("Resource_hp7ec") diff --git a/ar/spells/fireball.gd b/ar/spells/fireball.gd index 2fae99f..fcb1cce 100644 --- a/ar/spells/fireball.gd +++ b/ar/spells/fireball.gd @@ -1,7 +1,7 @@ extends AnimatableBody3D -const VELOCITY := 2.5 +const VELOCITY := 4.0 var _hit : bool = false @@ -21,9 +21,11 @@ func _process(delta: float) -> void: # Handle collision or flight-expiration if collision or _expire <= 0.0: # Stop emitting and let expire - %GPUParticles3D.emitting = false + %TrailParticles.emitting = false + %ExplosionParticles.emitting = true + %ExplosionSound.play() _hit = true - _expire = 1.0 + _expire = 2.0 # Free if expired if _hit and _expire <= 0.0: diff --git a/ar/spells/fireball.tscn b/ar/spells/fireball.tscn index d4f88f6..63d6090 100644 --- a/ar/spells/fireball.tscn +++ b/ar/spells/fireball.tscn @@ -1,7 +1,9 @@ -[gd_scene load_steps=10 format=3 uid="uid://bcjr1trix0aie"] +[gd_scene load_steps=19 format=3 uid="uid://bcjr1trix0aie"] [ext_resource type="Script" path="res://ar/spells/fireball.gd" id="1_k2x8b"] [ext_resource type="Texture2D" uid="uid://c2depw22ryg7c" path="res://addons/kenney_particle_pack/flame_04.png" id="2_lg1im"] +[ext_resource type="Texture2D" uid="uid://bukf50yk87utm" path="res://addons/kenney_particle_pack/flame_01.png" id="3_4brq1"] +[ext_resource type="AudioStream" uid="uid://dflv2024uk3yh" path="res://assets/sounds/244345__willlewis__musket-explosion.wav" id="4_786r5"] [sub_resource type="SphereShape3D" id="SphereShape3D_rbyv2"] radius = 0.05 @@ -15,6 +17,7 @@ transparency = 1 blend_mode = 1 vertex_color_use_as_albedo = true albedo_texture = ExtResource("2_lg1im") +disable_receive_shadows = true billboard_mode = 3 particles_anim_h_frames = 1 particles_anim_v_frames = 1 @@ -41,6 +44,45 @@ turbulence_noise_scale = 0.67 [sub_resource type="QuadMesh" id="QuadMesh_n6yde"] size = Vector2(0.2, 0.2) +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1dj25"] +transparency = 1 +blend_mode = 1 +vertex_color_use_as_albedo = true +albedo_texture = ExtResource("3_4brq1") +disable_receive_shadows = true +billboard_mode = 3 +particles_anim_h_frames = 1 +particles_anim_v_frames = 1 +particles_anim_loop = false + +[sub_resource type="Curve" id="Curve_8f7un"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_fl81v"] +curve = SubResource("Curve_8f7un") + +[sub_resource type="Gradient" id="Gradient_dihus"] +offsets = PackedFloat32Array(0, 0.20428, 0.367704, 0.68677, 1) +colors = PackedColorArray(5, 5, 5, 1, 1, 1, 1, 1, 1, 0.831373, 0.470588, 1, 1, 0, 0, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_64qvn"] +gradient = SubResource("Gradient_dihus") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_rdh8d"] +angle_min = 1.07288e-05 +angle_max = 360.0 +spread = 180.0 +initial_velocity_min = 1.0 +initial_velocity_max = 1.5 +gravity = Vector3(0, 0, 0) +damping_max = 1.0 +color_ramp = SubResource("GradientTexture1D_64qvn") +alpha_curve = SubResource("CurveTexture_fl81v") + +[sub_resource type="QuadMesh" id="QuadMesh_4nyge"] +size = Vector2(0.3, 0.3) + [node name="Fireball" type="AnimatableBody3D"] collision_layer = 0 sync_to_physics = false @@ -53,10 +95,25 @@ shape = SubResource("SphereShape3D_rbyv2") visible = false mesh = SubResource("SphereMesh_v0c6o") -[node name="GPUParticles3D" type="GPUParticles3D" parent="."] +[node name="TrailParticles" type="GPUParticles3D" parent="."] unique_name_in_owner = true material_override = SubResource("StandardMaterial3D_8ekkm") amount = 200 lifetime = 0.5 process_material = SubResource("ParticleProcessMaterial_p0a8k") draw_pass_1 = SubResource("QuadMesh_n6yde") + +[node name="ExplosionParticles" type="GPUParticles3D" parent="."] +unique_name_in_owner = true +material_override = SubResource("StandardMaterial3D_1dj25") +emitting = false +amount = 100 +lifetime = 0.8 +one_shot = true +explosiveness = 0.8 +process_material = SubResource("ParticleProcessMaterial_rdh8d") +draw_pass_1 = SubResource("QuadMesh_4nyge") + +[node name="ExplosionSound" type="AudioStreamPlayer3D" parent="."] +unique_name_in_owner = true +stream = ExtResource("4_786r5") diff --git a/ar/spells/lightning.gd b/ar/spells/lightning.gd new file mode 100644 index 0000000..b9be951 --- /dev/null +++ b/ar/spells/lightning.gd @@ -0,0 +1,9 @@ +extends Node3D + + +func _ready() -> void: + %GPUParticles3D.emitting = true + + +func _on_timer_timeout() -> void: + queue_free() diff --git a/ar/spells/lightning.tscn b/ar/spells/lightning.tscn new file mode 100644 index 0000000..3716f5f --- /dev/null +++ b/ar/spells/lightning.tscn @@ -0,0 +1,62 @@ +[gd_scene load_steps=9 format=3 uid="uid://blv7ye5k0f3ox"] + +[ext_resource type="Script" path="res://ar/spells/lightning.gd" id="1_6klr6"] +[ext_resource type="Texture2D" uid="uid://cc750lgosa8v2" path="res://addons/kenney_particle_pack/spark_03.png" id="1_lbhv0"] +[ext_resource type="AudioStream" uid="uid://bx6nrnl7vl0xc" path="res://assets/sounds/sparks.wav" id="3_os4q2"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_luvq8"] +transparency = 1 +blend_mode = 1 +cull_mode = 2 +vertex_color_use_as_albedo = true +albedo_texture = ExtResource("1_lbhv0") +billboard_mode = 3 +billboard_keep_scale = true +particles_anim_h_frames = 1 +particles_anim_v_frames = 1 +particles_anim_loop = false + +[sub_resource type="Curve" id="Curve_fcwys"] +_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.0395738, 0), 0.0, 0.0, 0, 0, Vector2(0.0898021, 1), 0.0, 0.0, 0, 0, Vector2(0.146119, 0), 0.0, 0.0, 0, 0, Vector2(0.216134, 0), 0.0, 0.0, 0, 0, Vector2(0.254186, 0.717391), 0.0, 0.0, 0, 0, Vector2(0.29376, 0), 0.0, 0.0, 0, 0, Vector2(0.400304, 0), 0.0, 0.0, 0, 0, Vector2(0.439878, 0.542102), 0.0, 0.0, 0, 0, Vector2(0.487062, 0), 0.0, 0.0, 0, 0, Vector2(0.563166, 0), 0.0, 0.0, 0, 0, Vector2(0.61035, 0.341772), 0.0, 0.0, 0, 0, Vector2(0.668189, 0), 0.0, 0.0, 0, 0, Vector2(0.729072, 0), 0.0, 0.0, 0, 0, Vector2(0.761035, 0.255916), 0.0, 0.0, 0, 0, Vector2(0.802131, 0), 0.0, 0.0, 0, 0, Vector2(0.858447, 0), 0.0, 0.0, 0, 0, Vector2(0.887984, 0.12282), 0.0, 0.0, 0, 0, Vector2(0.916286, 0), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 20 + +[sub_resource type="CurveTexture" id="CurveTexture_5vcqc"] +curve = SubResource("Curve_fcwys") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_uuexw"] +angle_min = -180.0 +angle_max = 180.0 +direction = Vector3(0, 0, -1) +spread = 20.0 +flatness = 1.0 +initial_velocity_min = 3.0 +initial_velocity_max = 6.0 +gravity = Vector3(0, 0, 0) +color = Color(3, 5, 5, 1) +alpha_curve = SubResource("CurveTexture_5vcqc") + +[sub_resource type="QuadMesh" id="QuadMesh_h5g5p"] +size = Vector2(0.3, 0.3) + +[node name="Lightning" type="Node3D"] +script = ExtResource("1_6klr6") + +[node name="GPUParticles3D" type="GPUParticles3D" parent="."] +unique_name_in_owner = true +material_override = SubResource("StandardMaterial3D_luvq8") +emitting = false +amount = 50 +one_shot = true +explosiveness = 0.45 +process_material = SubResource("ParticleProcessMaterial_uuexw") +draw_pass_1 = SubResource("QuadMesh_h5g5p") + +[node name="Timer" type="Timer" parent="."] +wait_time = 2.0 +one_shot = true + +[node name="Sparks" type="AudioStreamPlayer3D" parent="."] +stream = ExtResource("3_os4q2") +autoplay = true + +[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] diff --git a/ar/spells/spell_caster.gd b/ar/spells/spell_caster.gd index 357212c..5554e43 100644 --- a/ar/spells/spell_caster.gd +++ b/ar/spells/spell_caster.gd @@ -3,24 +3,51 @@ extends Node3D const FIREBALL := preload("res://ar/spells/fireball.tscn") +const LIGHTNING := preload("res://ar/spells/lightning.tscn") + @onready var controller : XRController3D = get_parent() -# In-spell flag -var _in_spell : bool = false +# Power level (1.0 is fully-charged) +var _power : float = 0.0 # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: - # Handle spell poses + # Handle charging + if controller.is_button_pressed("charge"): + # Charge up + _power = clampf(_power + delta, 0.0, 1.0) + %PowerParticles.amount_ratio = _power + + # Skip if not charged up + if _power < 0.8: + return + + # Handle casting spell if controller.is_button_pressed("fireball"): - # On rising-edge trigger spell - if not _in_spell: - _in_spell = true - var fireball := FIREBALL.instantiate() - fireball.global_transform = global_transform - fireball.top_level = true - add_child(fireball) - else: - # Clear spell if not active - _in_spell = false + # Spawn fireball + _power = 0.0 + %PowerParticles.amount_ratio = 0.0 + _spawn_fireball() + elif controller.is_button_pressed("lightning"): + # Spawn lightning + _power = 0.0 + %PowerParticles.amount_ratio = 0.0 + _spawn_lightning() + + +func _spawn_fireball() -> void: + # Cast fireball + var fireball := FIREBALL.instantiate() + fireball.global_transform = global_transform + fireball.top_level = true + add_child(fireball) + + +func _spawn_lightning() -> void: + # Cast fireball + var lightning := LIGHTNING.instantiate() + lightning.global_transform = global_transform + lightning.top_level = true + add_child(lightning) diff --git a/ar/spells/spell_caster.tscn b/ar/spells/spell_caster.tscn index 434d649..6948f4c 100644 --- a/ar/spells/spell_caster.tscn +++ b/ar/spells/spell_caster.tscn @@ -1,6 +1,45 @@ -[gd_scene load_steps=2 format=3 uid="uid://b7bens4thja4w"] +[gd_scene load_steps=8 format=3 uid="uid://b7bens4thja4w"] [ext_resource type="Script" path="res://ar/spells/spell_caster.gd" id="1_h50ec"] +[ext_resource type="Texture2D" uid="uid://dveqynfgdfrt3" path="res://addons/kenney_particle_pack/spark_02.png" id="2_vmqyn"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tfvd4"] +transparency = 1 +blend_mode = 1 +vertex_color_use_as_albedo = true +albedo_texture = ExtResource("2_vmqyn") +billboard_mode = 3 +particles_anim_h_frames = 1 +particles_anim_v_frames = 1 +particles_anim_loop = false + +[sub_resource type="Curve" id="Curve_ffbnv"] +_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.126263, 0.905706), 0.0, 0.0, 0, 0, Vector2(0.429293, 0.195358), 0.0, 0.0, 0, 0, Vector2(0.70202, 0.195358), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_urxfo"] +curve = SubResource("Curve_ffbnv") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_tjgtk"] +emission_shape = 1 +emission_sphere_radius = 0.05 +angle_min = 1.07288e-05 +angle_max = 360.0 +gravity = Vector3(0, 0, 0) +color = Color(0.266667, 0.513726, 1, 1) +alpha_curve = SubResource("CurveTexture_urxfo") + +[sub_resource type="QuadMesh" id="QuadMesh_syswe"] +size = Vector2(0.2, 0.2) [node name="SpellCaster" type="Node3D"] script = ExtResource("1_h50ec") + +[node name="PowerParticles" type="GPUParticles3D" parent="."] +unique_name_in_owner = true +material_override = SubResource("StandardMaterial3D_tfvd4") +amount = 40 +amount_ratio = 0.0 +lifetime = 0.3 +process_material = SubResource("ParticleProcessMaterial_tjgtk") +draw_pass_1 = SubResource("QuadMesh_syswe") diff --git a/assets/sounds/244345__willlewis__musket-explosion.txt b/assets/sounds/244345__willlewis__musket-explosion.txt new file mode 100644 index 0000000..2769797 --- /dev/null +++ b/assets/sounds/244345__willlewis__musket-explosion.txt @@ -0,0 +1 @@ +Musket Explosion by Willlewis -- https://freesound.org/s/244345/ -- License: Creative Commons 0 \ No newline at end of file diff --git a/assets/sounds/244345__willlewis__musket-explosion.wav b/assets/sounds/244345__willlewis__musket-explosion.wav new file mode 100644 index 0000000..b280235 Binary files /dev/null and b/assets/sounds/244345__willlewis__musket-explosion.wav differ diff --git a/assets/sounds/244345__willlewis__musket-explosion.wav.import b/assets/sounds/244345__willlewis__musket-explosion.wav.import new file mode 100644 index 0000000..d43c13f --- /dev/null +++ b/assets/sounds/244345__willlewis__musket-explosion.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://dflv2024uk3yh" +path="res://.godot/imported/244345__willlewis__musket-explosion.wav-080683040bda5981965c67ede4169110.sample" + +[deps] + +source_file="res://assets/sounds/244345__willlewis__musket-explosion.wav" +dest_files=["res://.godot/imported/244345__willlewis__musket-explosion.wav-080683040bda5981965c67ede4169110.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/assets/sounds/sparks.wav b/assets/sounds/sparks.wav new file mode 100644 index 0000000..80677be Binary files /dev/null and b/assets/sounds/sparks.wav differ diff --git a/assets/sounds/sparks.wav.import b/assets/sounds/sparks.wav.import new file mode 100644 index 0000000..5a6e986 --- /dev/null +++ b/assets/sounds/sparks.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bx6nrnl7vl0xc" +path="res://.godot/imported/sparks.wav-7618fe0109a1e7bbeffb8aa9747d3f6c.sample" + +[deps] + +source_file="res://assets/sounds/sparks.wav" +dest_files=["res://.godot/imported/sparks.wav-7618fe0109a1e7bbeffb8aa9747d3f6c.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/main.tscn b/main.tscn index 2f6d7fa..099350c 100644 --- a/main.tscn +++ b/main.tscn @@ -64,14 +64,18 @@ hand_tracker_name = "/user/hand_tracker/right" hand_pose_set = ExtResource("5_jaoyk") [node name="LeftVirtualController" type="XRController3D" parent="XROrigin3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.3, 1, 0) tracker = &"/user/hand_pose_controller/left" [node name="SpellCaster" parent="XROrigin3D/LeftVirtualController" instance=ExtResource("7_hx2um")] +transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, -0.035, -0.05, 0.1) [node name="RightVirtualController" type="XRController3D" parent="XROrigin3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3, 1, 0) tracker = &"/user/hand_pose_controller/right" [node name="SpellCaster" parent="XROrigin3D/RightVirtualController" instance=ExtResource("7_hx2um")] +transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0.035, -0.05, 0.1) [node name="SceneManager" type="OpenXRFbSceneManager" parent="XROrigin3D"] default_scene = ExtResource("4_8c7ac")