mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 07:45:33 +00:00
Box models and item drops
This commit is contained in:
parent
cc9c4e5aa1
commit
2fe9618942
132 changed files with 9210 additions and 999 deletions
File diff suppressed because one or more lines are too long
1
3D/BlockbenchModels/Box/Box_Green.gltf
Normal file
1
3D/BlockbenchModels/Box/Box_Green.gltf
Normal file
File diff suppressed because one or more lines are too long
37
3D/BlockbenchModels/Box/Box_Green.gltf.import
Normal file
37
3D/BlockbenchModels/Box/Box_Green.gltf.import
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://c5k6rsawax3gf"
|
||||||
|
path="res://.godot/imported/Box_Green.gltf-d92b6ccf667f98b3f059cab87ca0ae98.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://3D/BlockbenchModels/Box/Box_Green.gltf"
|
||||||
|
dest_files=["res://.godot/imported/Box_Green.gltf-d92b6ccf667f98b3f059cab87ca0ae98.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name=""
|
||||||
|
nodes/apply_root_scale=true
|
||||||
|
nodes/root_scale=1.0
|
||||||
|
nodes/import_as_skeleton_bones=false
|
||||||
|
nodes/use_node_type_suffixes=true
|
||||||
|
meshes/ensure_tangents=true
|
||||||
|
meshes/generate_lods=true
|
||||||
|
meshes/create_shadow_meshes=true
|
||||||
|
meshes/light_baking=1
|
||||||
|
meshes/lightmap_texel_size=0.2
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
animation/import_rest_as_RESET=false
|
||||||
|
import_script/path=""
|
||||||
|
_subresources={}
|
||||||
|
gltf/naming_version=1
|
||||||
|
gltf/embedded_image_handling=1
|
||||||
BIN
3D/BlockbenchModels/Box/Box_Green_0.png
(Stored with Git LFS)
Normal file
BIN
3D/BlockbenchModels/Box/Box_Green_0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
37
3D/BlockbenchModels/Box/Box_Green_0.png.import
Normal file
37
3D/BlockbenchModels/Box/Box_Green_0.png.import
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b0m3l0ukdgfg0"
|
||||||
|
path="res://.godot/imported/Box_Green_0.png-8d2d40e999759ea7db88464a746675a6.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
generator_parameters={
|
||||||
|
"md5": "de052cade031ad270fec328b866bdfbc"
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://3D/BlockbenchModels/Box/Box_Green_0.png"
|
||||||
|
dest_files=["res://.godot/imported/Box_Green_0.png-8d2d40e999759ea7db88464a746675a6.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=3
|
||||||
|
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
|
||||||
BIN
3D/BlockbenchModels/Box/Box_Green_Texture.png
(Stored with Git LFS)
BIN
3D/BlockbenchModels/Box/Box_Green_Texture.png
(Stored with Git LFS)
Binary file not shown.
File diff suppressed because one or more lines are too long
1
3D/BlockbenchModels/Box/Box_Yellow.gltf
Normal file
1
3D/BlockbenchModels/Box/Box_Yellow.gltf
Normal file
File diff suppressed because one or more lines are too long
37
3D/BlockbenchModels/Box/Box_Yellow.gltf.import
Normal file
37
3D/BlockbenchModels/Box/Box_Yellow.gltf.import
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://cpwolnoq46foq"
|
||||||
|
path="res://.godot/imported/Box_Yellow.gltf-d7ebe7269c2aff0af0de300fb848379a.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://3D/BlockbenchModels/Box/Box_Yellow.gltf"
|
||||||
|
dest_files=["res://.godot/imported/Box_Yellow.gltf-d7ebe7269c2aff0af0de300fb848379a.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name=""
|
||||||
|
nodes/apply_root_scale=true
|
||||||
|
nodes/root_scale=1.0
|
||||||
|
nodes/import_as_skeleton_bones=false
|
||||||
|
nodes/use_node_type_suffixes=true
|
||||||
|
meshes/ensure_tangents=true
|
||||||
|
meshes/generate_lods=true
|
||||||
|
meshes/create_shadow_meshes=true
|
||||||
|
meshes/light_baking=1
|
||||||
|
meshes/lightmap_texel_size=0.2
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
animation/import_rest_as_RESET=false
|
||||||
|
import_script/path=""
|
||||||
|
_subresources={}
|
||||||
|
gltf/naming_version=1
|
||||||
|
gltf/embedded_image_handling=1
|
||||||
BIN
3D/BlockbenchModels/Box/Box_Yellow_0.png
(Stored with Git LFS)
Normal file
BIN
3D/BlockbenchModels/Box/Box_Yellow_0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
37
3D/BlockbenchModels/Box/Box_Yellow_0.png.import
Normal file
37
3D/BlockbenchModels/Box/Box_Yellow_0.png.import
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dtbyhw5wi3nye"
|
||||||
|
path="res://.godot/imported/Box_Yellow_0.png-c2156d5abd01ddcba7e136818721444a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
generator_parameters={
|
||||||
|
"md5": "70114eaeee0c2486cf0f584695747bb1"
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://3D/BlockbenchModels/Box/Box_Yellow_0.png"
|
||||||
|
dest_files=["res://.godot/imported/Box_Yellow_0.png-c2156d5abd01ddcba7e136818721444a.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=3
|
||||||
|
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
|
||||||
BIN
3D/BlockbenchModels/Box/Box_Yellow_Texture.png
(Stored with Git LFS)
BIN
3D/BlockbenchModels/Box/Box_Yellow_Texture.png
(Stored with Git LFS)
Binary file not shown.
File diff suppressed because one or more lines are too long
1
3D/BlockbenchModels/Tubes/Tube_Corner_Bad.bbmodel
Normal file
1
3D/BlockbenchModels/Tubes/Tube_Corner_Bad.bbmodel
Normal file
File diff suppressed because one or more lines are too long
BIN
3D/MapModels/Box_Green.glb
Normal file
BIN
3D/MapModels/Box_Green.glb
Normal file
Binary file not shown.
BIN
3D/MapModels/Box_Yellow.glb
Normal file
BIN
3D/MapModels/Box_Yellow.glb
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
2618
3D/Maps/autosave/Level1.7.map
Normal file
2618
3D/Maps/autosave/Level1.7.map
Normal file
File diff suppressed because it is too large
Load diff
14
3D/Scenes/Props/Box_3D_Green.tscn
Normal file
14
3D/Scenes/Props/Box_3D_Green.tscn
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://c8wwioforxms3"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c5k6rsawax3gf" path="res://3D/BlockbenchModels/Box/Box_Green.gltf" id="1_03sp0"]
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_hsg1w"]
|
||||||
|
size = Vector3(0.763428, 0.469452, 0.77832)
|
||||||
|
|
||||||
|
[node name="BoxBlue" type="StaticBody3D"]
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, 0.0253752, -0.000488281)
|
||||||
|
shape = SubResource("BoxShape3D_hsg1w")
|
||||||
|
|
||||||
|
[node name="blockbench_export" parent="." instance=ExtResource("1_03sp0")]
|
||||||
14
3D/Scenes/Props/Box_3D_Yellow.tscn
Normal file
14
3D/Scenes/Props/Box_3D_Yellow.tscn
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://c6cdl3y3i3axl"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cpwolnoq46foq" path="res://3D/BlockbenchModels/Box/Box_Yellow.gltf" id="1_0rxnx"]
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_hsg1w"]
|
||||||
|
size = Vector3(0.763428, 0.469452, 0.77832)
|
||||||
|
|
||||||
|
[node name="BoxBlue" type="StaticBody3D"]
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, 0.0253752, -0.000488281)
|
||||||
|
shape = SubResource("BoxShape3D_hsg1w")
|
||||||
|
|
||||||
|
[node name="blockbench_export" parent="." instance=ExtResource("1_0rxnx")]
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
[gd_resource type="Resource" script_class="FuncGodotFGDPointClass" load_steps=4 format=3 uid="uid://41wnjh6ftght"]
|
||||||
|
|
||||||
|
[ext_resource type="Resource" uid="uid://5bc1qysixhmh" path="res://3D/TrenchBroom/EntityDefinitions/base/actor_base.tres" id="1_tgkjo"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c6cdl3y3i3axl" path="res://3D/Scenes/Props/Box_3D_Yellow.tscn" id="2_tgkjo"]
|
||||||
|
[ext_resource type="Script" uid="uid://c83r7t467hm4m" path="res://addons/func_godot/src/fgd/func_godot_fgd_point_class.gd" id="3_023jf"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("3_023jf")
|
||||||
|
scene_file = ExtResource("2_tgkjo")
|
||||||
|
apply_rotation_on_map_build = true
|
||||||
|
apply_scale_on_map_build = false
|
||||||
|
classname = "actor_box_yellow"
|
||||||
|
description = "Yellow Box"
|
||||||
|
func_godot_internal = false
|
||||||
|
base_classes = Array[Resource]([ExtResource("1_tgkjo")])
|
||||||
|
class_properties = {}
|
||||||
|
class_property_descriptions = {}
|
||||||
|
auto_apply_to_matching_node_properties = false
|
||||||
|
meta_properties = {
|
||||||
|
"model": "\"3D/MapModels/Box_Yellow.glb\"",
|
||||||
|
"size": AABB(-8, -8, -4, 8, 8, 4)
|
||||||
|
}
|
||||||
|
node_class = ""
|
||||||
|
name_property = ""
|
||||||
|
metadata/_custom_type_script = "uid://c83r7t467hm4m"
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
[gd_resource type="Resource" script_class="FuncGodotFGDPointClass" load_steps=4 format=3 uid="uid://dj72os2jpdl4l"]
|
||||||
|
|
||||||
|
[ext_resource type="Resource" uid="uid://5bc1qysixhmh" path="res://3D/TrenchBroom/EntityDefinitions/base/actor_base.tres" id="1_8m0gw"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c8wwioforxms3" path="res://3D/Scenes/Props/Box_3D_Green.tscn" id="2_3do5h"]
|
||||||
|
[ext_resource type="Script" uid="uid://c83r7t467hm4m" path="res://addons/func_godot/src/fgd/func_godot_fgd_point_class.gd" id="3_6f4l5"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("3_6f4l5")
|
||||||
|
scene_file = ExtResource("2_3do5h")
|
||||||
|
apply_rotation_on_map_build = true
|
||||||
|
apply_scale_on_map_build = false
|
||||||
|
classname = "actor_box_green"
|
||||||
|
description = "Green Box"
|
||||||
|
func_godot_internal = false
|
||||||
|
base_classes = Array[Resource]([ExtResource("1_8m0gw")])
|
||||||
|
class_properties = {}
|
||||||
|
class_property_descriptions = {}
|
||||||
|
auto_apply_to_matching_node_properties = false
|
||||||
|
meta_properties = {
|
||||||
|
"model": "\"3D/MapModels/Box_Green.glb\"",
|
||||||
|
"size": AABB(-8, -8, -4, 8, 8, 4)
|
||||||
|
}
|
||||||
|
node_class = ""
|
||||||
|
name_property = ""
|
||||||
|
metadata/_custom_type_script = "uid://c83r7t467hm4m"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=17 format=3 uid="uid://b700sa4be6dfa"]
|
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=19 format=3 uid="uid://b700sa4be6dfa"]
|
||||||
|
|
||||||
[ext_resource type="Resource" uid="uid://ia1t5p4mhom3" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_omni.tres" id="1_7vcj1"]
|
[ext_resource type="Resource" uid="uid://ia1t5p4mhom3" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_omni.tres" id="1_7vcj1"]
|
||||||
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_lykim"]
|
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_lykim"]
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
[ext_resource type="Resource" uid="uid://jn17j3xk5f3m" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/actor_elevator.tres" id="13_f0hti"]
|
[ext_resource type="Resource" uid="uid://jn17j3xk5f3m" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/actor_elevator.tres" id="13_f0hti"]
|
||||||
[ext_resource type="Resource" uid="uid://rpamlolwdoyj" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/Actor_Capacitor.tres" id="14_6ld6e"]
|
[ext_resource type="Resource" uid="uid://rpamlolwdoyj" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/Actor_Capacitor.tres" id="14_6ld6e"]
|
||||||
[ext_resource type="Resource" uid="uid://b2hgfu40nfoe3" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/actor_tube_corner.tres" id="15_g8j5j"]
|
[ext_resource type="Resource" uid="uid://b2hgfu40nfoe3" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/actor_tube_corner.tres" id="15_g8j5j"]
|
||||||
|
[ext_resource type="Resource" uid="uid://41wnjh6ftght" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/actor_box_green.tres" id="16_7h4of"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dj72os2jpdl4l" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/actor_box_yellow.tres" id="17_m3sbm"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_lykim")
|
script = ExtResource("1_lykim")
|
||||||
|
|
@ -23,5 +25,5 @@ export_file = false
|
||||||
target_map_editor = 1
|
target_map_editor = 1
|
||||||
fgd_name = "FuncGodot"
|
fgd_name = "FuncGodot"
|
||||||
base_fgd_files = Array[Resource]([])
|
base_fgd_files = Array[Resource]([])
|
||||||
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb"), ExtResource("3_u7uvb"), ExtResource("4_1nmxk"), ExtResource("5_ljb2x"), ExtResource("6_seuvu"), ExtResource("7_fmwex"), ExtResource("8_c8m8m"), ExtResource("9_14sjf"), ExtResource("10_xik3w"), ExtResource("11_dgiqm"), ExtResource("12_1teik"), ExtResource("13_f0hti"), ExtResource("14_6ld6e"), ExtResource("15_g8j5j")])
|
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb"), ExtResource("3_u7uvb"), ExtResource("4_1nmxk"), ExtResource("5_ljb2x"), ExtResource("6_seuvu"), ExtResource("7_fmwex"), ExtResource("8_c8m8m"), ExtResource("9_14sjf"), ExtResource("10_xik3w"), ExtResource("11_dgiqm"), ExtResource("12_1teik"), ExtResource("13_f0hti"), ExtResource("14_6ld6e"), ExtResource("15_g8j5j"), ExtResource("16_7h4of"), ExtResource("17_m3sbm")])
|
||||||
metadata/_custom_type_script = "uid://cknmd0lgmorx2"
|
metadata/_custom_type_script = "uid://cknmd0lgmorx2"
|
||||||
|
|
|
||||||
|
|
@ -24,3 +24,4 @@ Selectable = false
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = SubResource("AtlasTexture_3y0hf")
|
InventorySprite = SubResource("AtlasTexture_3y0hf")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -25,3 +25,4 @@ Selectable = false
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = SubResource("AtlasTexture_ebbst")
|
InventorySprite = SubResource("AtlasTexture_ebbst")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("2_0vddk")
|
InventorySprite = ExtResource("2_0vddk")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -25,3 +25,4 @@ Selectable = false
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = SubResource("AtlasTexture_munhl")
|
InventorySprite = SubResource("AtlasTexture_munhl")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -25,3 +25,4 @@ Selectable = false
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = SubResource("AtlasTexture_iasoh")
|
InventorySprite = SubResource("AtlasTexture_iasoh")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,5 @@ Selectable = false
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = ExtResource("1_b4fj2")
|
InventorySprite = ExtResource("1_b4fj2")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,5 @@ Selectable = false
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_00obu")
|
InventorySprite = ExtResource("1_00obu")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,5 @@ Selectable = true
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = ExtResource("1_xg75n")
|
InventorySprite = ExtResource("1_xg75n")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("2_4ibag")
|
InventorySprite = ExtResource("2_4ibag")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_hq5ny")
|
InventorySprite = ExtResource("1_hq5ny")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_qo2ul")
|
InventorySprite = ExtResource("1_qo2ul")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_l7ik6")
|
InventorySprite = ExtResource("1_l7ik6")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_wkd5q")
|
InventorySprite = ExtResource("1_wkd5q")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_cr14o")
|
InventorySprite = ExtResource("1_cr14o")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("2_eaoas")
|
InventorySprite = ExtResource("2_eaoas")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("2_3abss")
|
InventorySprite = ExtResource("2_3abss")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_mj87v")
|
InventorySprite = ExtResource("1_mj87v")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_cked8")
|
InventorySprite = ExtResource("1_cked8")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_h548w")
|
InventorySprite = ExtResource("1_h548w")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,5 @@ Selectable = true
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = ExtResource("1_woor7")
|
InventorySprite = ExtResource("1_woor7")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_qxsuv")
|
InventorySprite = ExtResource("1_qxsuv")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -21,3 +21,4 @@ Selectable = false
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = ExtResource("1_nas3h")
|
InventorySprite = ExtResource("1_nas3h")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,5 @@ Selectable = false
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = ExtResource("1_nsfmo")
|
InventorySprite = ExtResource("1_nsfmo")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -21,3 +21,4 @@ Selectable = false
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = ExtResource("1_cang8")
|
InventorySprite = ExtResource("1_cang8")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -21,3 +21,4 @@ Selectable = false
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_glhfu")
|
InventorySprite = ExtResource("1_glhfu")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,5 @@ Selectable = false
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_e61f8")
|
InventorySprite = ExtResource("1_e61f8")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,5 @@ Selectable = true
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = ExtResource("1_0hq6q")
|
InventorySprite = ExtResource("1_0hq6q")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -53,4 +53,5 @@ Selectable = true
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = SubResource("AtlasTexture_gpot4")
|
InventorySprite = SubResource("AtlasTexture_gpot4")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -25,3 +25,4 @@ Selectable = false
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = SubResource("AtlasTexture_ew85h")
|
InventorySprite = SubResource("AtlasTexture_ew85h")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -21,3 +21,4 @@ Selectable = false
|
||||||
AutoPickup = true
|
AutoPickup = true
|
||||||
InventorySprite = ExtResource("1_jt7l8")
|
InventorySprite = ExtResource("1_jt7l8")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,5 @@ Selectable = true
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_2w24o")
|
InventorySprite = ExtResource("1_2w24o")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,5 @@ Selectable = false
|
||||||
AutoPickup = false
|
AutoPickup = false
|
||||||
InventorySprite = ExtResource("1_pival")
|
InventorySprite = ExtResource("1_pival")
|
||||||
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
DropScenePath = &"res://Scenes/Items/GenericItem.tscn"
|
||||||
|
DropScenePath3D = &"uid://cnot7sft7lpf3"
|
||||||
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
metadata/_custom_type_script = "uid://epnwjptvks3t"
|
||||||
|
|
|
||||||
|
|
@ -381,10 +381,9 @@ _animationProvider = NodePath("../../AnimationProvider")
|
||||||
script = ExtResource("6_82vrk")
|
script = ExtResource("6_82vrk")
|
||||||
_animationProvider = NodePath("../../AnimationProvider")
|
_animationProvider = NodePath("../../AnimationProvider")
|
||||||
|
|
||||||
[node name="Dead" type="Node2D" parent="StateMachine" node_paths=PackedStringArray("_animationProvider", "_inputProvider", "_healthProvider", "_motivationProvider")]
|
[node name="Dead" type="Node2D" parent="StateMachine" node_paths=PackedStringArray("_animationProvider", "_healthProvider", "_motivationProvider")]
|
||||||
script = ExtResource("4_0pqs8")
|
script = ExtResource("4_0pqs8")
|
||||||
_animationProvider = NodePath("../../AnimationProvider")
|
_animationProvider = NodePath("../../AnimationProvider")
|
||||||
_inputProvider = NodePath("")
|
|
||||||
_healthProvider = NodePath("../../DamageReceiver/HealthProvider")
|
_healthProvider = NodePath("../../DamageReceiver/HealthProvider")
|
||||||
_motivationProvider = NodePath("../../DamageReceiver/MotivationProvider")
|
_motivationProvider = NodePath("../../DamageReceiver/MotivationProvider")
|
||||||
|
|
||||||
|
|
|
||||||
24
Scenes/Items/GenericItem3D.tscn
Normal file
24
Scenes/Items/GenericItem3D.tscn
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://cnot7sft7lpf3"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cc60s31w2sive" path="res://Scripts/Interactables/ItemPickup3D.cs" id="1_rqfak"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b61po207ggn63" path="res://Sprites/Items/Yin_Ammo.png" id="2_rqfak"]
|
||||||
|
|
||||||
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_f43iq"]
|
||||||
|
height = 0.538086
|
||||||
|
|
||||||
|
[node name="Item" type="Area3D" groups=["Interactable"]]
|
||||||
|
collision_layer = 32
|
||||||
|
collision_mask = 0
|
||||||
|
script = ExtResource("1_rqfak")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0649414, 0)
|
||||||
|
shape = SubResource("CylinderShape3D_f43iq")
|
||||||
|
|
||||||
|
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||||
|
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 0, 0)
|
||||||
|
pixel_size = 0.05
|
||||||
|
texture_filter = 0
|
||||||
|
texture = ExtResource("2_rqfak")
|
||||||
|
|
||||||
|
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||||
|
|
@ -1313,7 +1313,7 @@ position = Vector2(-2000, -736)
|
||||||
[node name="ControlPad8" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Targets") instance=ExtResource("12_hfkf1")]
|
[node name="ControlPad8" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Targets") instance=ExtResource("12_hfkf1")]
|
||||||
position = Vector2(-2027, -735)
|
position = Vector2(-2027, -735)
|
||||||
Targets = [NodePath("../HorizontalForceField")]
|
Targets = [NodePath("../HorizontalForceField")]
|
||||||
Requirements = [ExtResource("84_ma1ta")]
|
Requirements = Array[ExtResource("36_pt47r")]([ExtResource("84_ma1ta")])
|
||||||
|
|
||||||
[node name="Ammo6" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("34_17pjh")]
|
[node name="Ammo6" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("34_17pjh")]
|
||||||
position = Vector2(-872, -220)
|
position = Vector2(-872, -220)
|
||||||
|
|
|
||||||
9
Scripts/Actors/EditorSprite3D.cs
Normal file
9
Scripts/Actors/EditorSprite3D.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Cirno.Scripts.Actors;
|
||||||
|
|
||||||
|
[Tool]
|
||||||
|
public partial class EditorSprite3D : Sprite3D
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
1
Scripts/Actors/EditorSprite3D.cs.uid
Normal file
1
Scripts/Actors/EditorSprite3D.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://iih7baty86xt
|
||||||
118
Scripts/Actors/ItemMarker3D.cs
Normal file
118
Scripts/Actors/ItemMarker3D.cs
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
using Cirno.Scripts.Interactables;
|
||||||
|
using Cirno.Scripts.Resources;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Cirno.Scripts.Actors;
|
||||||
|
|
||||||
|
[Tool]
|
||||||
|
public partial class ItemMarker3D : Marker3D
|
||||||
|
{
|
||||||
|
private LootItem _item;
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public LootItem Item
|
||||||
|
{
|
||||||
|
get => _item;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_item = value;
|
||||||
|
if (Engine.IsEditorHint())
|
||||||
|
{
|
||||||
|
QueueRedraw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Export] public bool AutoSpawn { get; set; } = false;
|
||||||
|
|
||||||
|
[ExportToolButton("Update Icon")] public Callable RedrawButton => Callable.From(Redraw);
|
||||||
|
[ExportToolButton("Clear Children")] public Callable ClearChildrenButton => Callable.From(ClearChildren);
|
||||||
|
|
||||||
|
// public override void _Draw()
|
||||||
|
// {
|
||||||
|
// if (!Engine.IsEditorHint()) return;
|
||||||
|
// if (Item is null) return;
|
||||||
|
// if (Item.InventorySprite is null) return;
|
||||||
|
//
|
||||||
|
// DrawTexture(Item.InventorySprite, - new Vector2(Item.InventorySprite.GetWidth() / 2f, Item.InventorySprite.GetHeight() / 2f));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
private void Redraw()
|
||||||
|
{
|
||||||
|
QueueRedraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ClearChildren()
|
||||||
|
{
|
||||||
|
var children = GetChildren();
|
||||||
|
foreach (var child in children)
|
||||||
|
{
|
||||||
|
if (child is Sprite3D)
|
||||||
|
{
|
||||||
|
child.QueueFree();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_sprite = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void QueueRedraw()
|
||||||
|
{
|
||||||
|
if (!Engine.IsEditorHint()) return;
|
||||||
|
if (Item?.InventorySprite is null) return;
|
||||||
|
|
||||||
|
if (_sprite is null)
|
||||||
|
{
|
||||||
|
GD.Print("Remaking sprite");
|
||||||
|
_sprite = new EditorSprite3D();
|
||||||
|
this.AddChild(_sprite);
|
||||||
|
//_sprite.Owner = GetTree().EditedSceneRoot;
|
||||||
|
}
|
||||||
|
|
||||||
|
_sprite.Texture = Item.InventorySprite;
|
||||||
|
//_sprite.SetRotationDegrees(new Vector3(-45, 45, 0));
|
||||||
|
_sprite.FixedSize = true;
|
||||||
|
_sprite.SetBillboardMode(BaseMaterial3D.BillboardModeEnum.Enabled);
|
||||||
|
_sprite.TextureFilter = BaseMaterial3D.TextureFilterEnum.Nearest;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private Sprite3D _sprite;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
_sprite = GetNodeOrNull<Sprite3D>("Sprite3D");
|
||||||
|
if (Engine.IsEditorHint())
|
||||||
|
{
|
||||||
|
QueueRedraw();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ClearChildren();
|
||||||
|
|
||||||
|
if (AutoSpawn)
|
||||||
|
{
|
||||||
|
Spawn(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// public override void _Process(double delta)
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
public ItemPickup3D Spawn(bool deleteMarker)
|
||||||
|
{
|
||||||
|
if (Engine.IsEditorHint()) return null;
|
||||||
|
if (Item is null) return null;
|
||||||
|
|
||||||
|
if (deleteMarker)
|
||||||
|
{
|
||||||
|
this.QueueFree();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Item.Spawn3D(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Scripts/Actors/ItemMarker3D.cs.uid
Normal file
1
Scripts/Actors/ItemMarker3D.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b88cmj87g78mx
|
||||||
68
Scripts/Interactables/ItemPickup3D.cs
Normal file
68
Scripts/Interactables/ItemPickup3D.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
using System.Linq;
|
||||||
|
using Cirno.Scripts.Resources;
|
||||||
|
using Godot;
|
||||||
|
using Godot.Collections;
|
||||||
|
|
||||||
|
namespace Cirno.Scripts.Interactables;
|
||||||
|
|
||||||
|
public partial class ItemPickup3D : Interactable3D
|
||||||
|
{
|
||||||
|
[Export] public Array<LootItem> LootTable = [];
|
||||||
|
|
||||||
|
private bool _autoPickup = false;
|
||||||
|
|
||||||
|
public bool AutoPickup => _autoPickup;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
_autoPickup = LootTable.Any(x => x.AutoPickup);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Activate(ActivationType activationType = ActivationType.Toggle)
|
||||||
|
{
|
||||||
|
if (!MeetsRequirements()) return false;
|
||||||
|
Collect();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddItemsToInventory()
|
||||||
|
{
|
||||||
|
var failedItems = new Array<LootItem>();
|
||||||
|
foreach (var item in LootTable)
|
||||||
|
{
|
||||||
|
if (!InventoryManager.Instance.AddItem(item))
|
||||||
|
{
|
||||||
|
failedItems.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (failedItems.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var failedItem in failedItems)
|
||||||
|
{
|
||||||
|
var dup = this.Duplicate() as ItemPickup;
|
||||||
|
this.AddSibling(dup);
|
||||||
|
dup.LootTable = [failedItem];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delet This
|
||||||
|
|
||||||
|
QueueFree();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Collect()
|
||||||
|
{
|
||||||
|
AddItemsToInventory();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetSprite(Texture2D sprite)
|
||||||
|
{
|
||||||
|
var spriteNode = GetNodeOrNull<Sprite3D>("Sprite3D");
|
||||||
|
if (spriteNode is null) return;
|
||||||
|
spriteNode.Texture = sprite;
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Scripts/Interactables/ItemPickup3D.cs.uid
Normal file
1
Scripts/Interactables/ItemPickup3D.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cc60s31w2sive
|
||||||
|
|
@ -24,24 +24,67 @@ public partial class LootItem : Resource
|
||||||
|
|
||||||
[Export(PropertyHint.Flags, "Icon,Count,Ammo,Energy")]
|
[Export(PropertyHint.Flags, "Icon,Count,Ammo,Energy")]
|
||||||
public UiItemType UiType { get; set; } = 0;
|
public UiItemType UiType { get; set; } = 0;
|
||||||
|
|
||||||
[Export] public bool Selectable;
|
[Export] public bool Selectable;
|
||||||
[Export] public bool AutoPickup { get; private set; } = false;
|
[Export] public bool AutoPickup { get; private set; } = false;
|
||||||
|
|
||||||
[Export] public Texture2D InventorySprite;
|
[Export] public Texture2D InventorySprite;
|
||||||
|
|
||||||
//[Export] public SpriteFrames WorldSprite;
|
//[Export] public SpriteFrames WorldSprite;
|
||||||
//[Export] public PackedScene HudItemScene;
|
//[Export] public PackedScene HudItemScene;
|
||||||
[Export(PropertyHint.File)] public StringName DropScenePath { get; private set; } // Has to be a string path to avoid recursion issues
|
[Export(PropertyHint.File)]
|
||||||
|
public StringName DropScenePath { get; private set; } // Has to be a string path to avoid recursion issues
|
||||||
|
|
||||||
|
[Export(PropertyHint.File)]
|
||||||
|
public StringName DropScenePath3D { get; private set; } // Has to be a string path to avoid recursion issues
|
||||||
|
|
||||||
public ItemPickup Spawn(Node2D sibling, bool dropAsChild = false)
|
public ItemPickup Spawn(Node2D sibling, bool dropAsChild = false)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(DropScenePath)) return null;
|
if (string.IsNullOrWhiteSpace(DropScenePath)) return null;
|
||||||
var itemScene = GD.Load<PackedScene>(DropScenePath);
|
var itemScene = GD.Load<PackedScene>(DropScenePath);
|
||||||
var spawnedItem = dropAsChild ? sibling.CreateChild<ItemPickup>(itemScene) : sibling.CreateSibling<ItemPickup>(itemScene);
|
var spawnedItem = dropAsChild
|
||||||
|
? sibling.CreateChild<ItemPickup>(itemScene)
|
||||||
|
: sibling.CreateSibling<ItemPickup>(itemScene);
|
||||||
|
|
||||||
spawnedItem.Name = this.ItemKey;
|
spawnedItem.Name = this.ItemKey;
|
||||||
|
|
||||||
spawnedItem.LootTable.Add(this);
|
spawnedItem.LootTable.Add(this);
|
||||||
spawnedItem.SetSprite(InventorySprite);
|
spawnedItem.SetSprite(InventorySprite);
|
||||||
|
|
||||||
return spawnedItem;
|
return spawnedItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ItemPickup3D Spawn3D(Node3D sibling, bool dropAsChild = false)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(DropScenePath3D)) return null;
|
||||||
|
var itemScene = GD.Load<PackedScene>(DropScenePath3D);
|
||||||
|
|
||||||
|
var spawnedItem = itemScene.Instantiate<ItemPickup3D>();
|
||||||
|
spawnedItem.Name = this.ItemKey;
|
||||||
|
if (dropAsChild)
|
||||||
|
{
|
||||||
|
CallDeferred(MethodName.DeferredSpawn3D, sibling, spawnedItem, sibling.GlobalPosition);
|
||||||
|
//sibling.CallDeferred(Node.MethodName.AddChild, spawnedItem);
|
||||||
|
//sibling.AddChild(spawnedItem);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CallDeferred(MethodName.DeferredSpawn3D, sibling.GetParentNode3D(), spawnedItem, sibling.GlobalPosition);
|
||||||
|
//sibling.GetParent().CallDeferred(Node.MethodName.AddChild, spawnedItem);
|
||||||
|
//sibling.GetParent().AddChild(spawnedItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
//spawnedItem.GlobalPosition = sibling.GlobalPosition;
|
||||||
|
|
||||||
|
spawnedItem.LootTable.Add(this);
|
||||||
|
spawnedItem.SetSprite(InventorySprite);
|
||||||
|
|
||||||
|
return spawnedItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DeferredSpawn3D(Node3D parent, Node3D instance, Vector3 position)
|
||||||
|
{
|
||||||
|
parent.AddChild(instance);
|
||||||
|
instance.GlobalPosition = position;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3,25 +3,26 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://c5g0qg6u2gm6f"
|
uid="uid://c5g0qg6u2gm6f"
|
||||||
path="res://.godot/imported/Ammo1.png-05d86b462dc0f5b4fb8cd16192981dcd.ctex"
|
path.s3tc="res://.godot/imported/Ammo1.png-05d86b462dc0f5b4fb8cd16192981dcd.s3tc.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Sprites/Items/Ammo1.png"
|
source_file="res://Sprites/Items/Ammo1.png"
|
||||||
dest_files=["res://.godot/imported/Ammo1.png-05d86b462dc0f5b4fb8cd16192981dcd.ctex"]
|
dest_files=["res://.godot/imported/Ammo1.png-05d86b462dc0f5b4fb8cd16192981dcd.s3tc.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
compress/mode=0
|
compress/mode=2
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
|
|
@ -31,4 +32,4 @@ process/normal_map_invert_y=false
|
||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=0
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,26 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://4x3ouxyxjqjc"
|
uid="uid://4x3ouxyxjqjc"
|
||||||
path="res://.godot/imported/Credits_Pickup.png-3f222edf3f4332d8f948db40f0ef4d98.ctex"
|
path.s3tc="res://.godot/imported/Credits_Pickup.png-3f222edf3f4332d8f948db40f0ef4d98.s3tc.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Sprites/Items/Credits_Pickup.png"
|
source_file="res://Sprites/Items/Credits_Pickup.png"
|
||||||
dest_files=["res://.godot/imported/Credits_Pickup.png-3f222edf3f4332d8f948db40f0ef4d98.ctex"]
|
dest_files=["res://.godot/imported/Credits_Pickup.png-3f222edf3f4332d8f948db40f0ef4d98.s3tc.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
compress/mode=0
|
compress/mode=2
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
|
|
@ -31,4 +32,4 @@ process/normal_map_invert_y=false
|
||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=0
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,26 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://duwiasewxvcb5"
|
uid="uid://duwiasewxvcb5"
|
||||||
path="res://.godot/imported/Icicle_Gun.png-9b35e9376441b673558b1800d9bc4b4e.ctex"
|
path.s3tc="res://.godot/imported/Icicle_Gun.png-9b35e9376441b673558b1800d9bc4b4e.s3tc.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Sprites/Items/Icicle_Gun.png"
|
source_file="res://Sprites/Items/Icicle_Gun.png"
|
||||||
dest_files=["res://.godot/imported/Icicle_Gun.png-9b35e9376441b673558b1800d9bc4b4e.ctex"]
|
dest_files=["res://.godot/imported/Icicle_Gun.png-9b35e9376441b673558b1800d9bc4b4e.s3tc.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
compress/mode=0
|
compress/mode=2
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
|
|
@ -31,4 +32,4 @@ process/normal_map_invert_y=false
|
||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=0
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,26 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://d2vmocquikjia"
|
uid="uid://d2vmocquikjia"
|
||||||
path="res://.godot/imported/Point_Pickup.png-d9c59802b179b94be552554e096bb625.ctex"
|
path.s3tc="res://.godot/imported/Point_Pickup.png-d9c59802b179b94be552554e096bb625.s3tc.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Sprites/Items/Point_Pickup.png"
|
source_file="res://Sprites/Items/Point_Pickup.png"
|
||||||
dest_files=["res://.godot/imported/Point_Pickup.png-d9c59802b179b94be552554e096bb625.ctex"]
|
dest_files=["res://.godot/imported/Point_Pickup.png-d9c59802b179b94be552554e096bb625.s3tc.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
compress/mode=0
|
compress/mode=2
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
|
|
@ -31,4 +32,4 @@ process/normal_map_invert_y=false
|
||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=0
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,26 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://bjdsi4x8m42ky"
|
uid="uid://bjdsi4x8m42ky"
|
||||||
path="res://.godot/imported/Power_Pickup.png-8e0997413eb4330ea358e3ad4c0679f8.ctex"
|
path.s3tc="res://.godot/imported/Power_Pickup.png-8e0997413eb4330ea358e3ad4c0679f8.s3tc.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Sprites/Items/Power_Pickup.png"
|
source_file="res://Sprites/Items/Power_Pickup.png"
|
||||||
dest_files=["res://.godot/imported/Power_Pickup.png-8e0997413eb4330ea358e3ad4c0679f8.ctex"]
|
dest_files=["res://.godot/imported/Power_Pickup.png-8e0997413eb4330ea358e3ad4c0679f8.s3tc.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
compress/mode=0
|
compress/mode=2
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
|
|
@ -31,4 +32,4 @@ process/normal_map_invert_y=false
|
||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=0
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,26 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://b61po207ggn63"
|
uid="uid://b61po207ggn63"
|
||||||
path="res://.godot/imported/Yin_Ammo.png-a006a21b0965b3c91c2670f3e4ece755.ctex"
|
path.s3tc="res://.godot/imported/Yin_Ammo.png-a006a21b0965b3c91c2670f3e4ece755.s3tc.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Sprites/Items/Yin_Ammo.png"
|
source_file="res://Sprites/Items/Yin_Ammo.png"
|
||||||
dest_files=["res://.godot/imported/Yin_Ammo.png-a006a21b0965b3c91c2670f3e4ece755.ctex"]
|
dest_files=["res://.godot/imported/Yin_Ammo.png-a006a21b0965b3c91c2670f3e4ece755.s3tc.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
compress/mode=0
|
compress/mode=2
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
|
|
@ -31,4 +32,4 @@ process/normal_map_invert_y=false
|
||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=0
|
||||||
|
|
|
||||||
21
addons/debug_draw_3d/LICENSE
Normal file
21
addons/debug_draw_3d/LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 DmitriySalnikov
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the Software), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, andor sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
157
addons/debug_draw_3d/README.md
Normal file
157
addons/debug_draw_3d/README.md
Normal file
|
|
@ -0,0 +1,157 @@
|
||||||
|

|
||||||
|
|
||||||
|
# Debug drawing utility for Godot
|
||||||
|
|
||||||
|
This is an add-on for debug drawing in 3D and for some 2D overlays, which is written in `C++` and can be used with `GDScript` or `C#`.
|
||||||
|
|
||||||
|
Based on my previous addon, which was developed [only for C#](https://github.com/DmitriySalnikov/godot_debug_draw_cs), and which was inspired by [Zylann's GDScript addon](https://github.com/Zylann/godot_debug_draw)
|
||||||
|
|
||||||
|
## [Documentation](https://dd3d.dmitriysalnikov.ru/docs/)
|
||||||
|
|
||||||
|
## [Godot 3 version](https://github.com/DmitriySalnikov/godot_debug_draw_3d/tree/godot_3)
|
||||||
|
|
||||||
|
## Support me
|
||||||
|
|
||||||
|
Your support adds motivation to develop my public projects.
|
||||||
|
|
||||||
|
<a href="https://boosty.to/dmitriysalnikov/donate"><img src="/docs/images/boosty.png" alt="Boosty" width=150px/></a>
|
||||||
|
|
||||||
|
<a href="#"><img src="/docs/images/USDT-TRC20.png" alt="USDT-TRC20" width=150px/></a>
|
||||||
|
|
||||||
|
<b>USDT-TRC20 TEw934PrsffHsAn5M63SoHYRuZo984EF6v</b>
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
3D:
|
||||||
|
|
||||||
|
* Arrow
|
||||||
|
* Billboard opaque square
|
||||||
|
* Box
|
||||||
|
* Camera Frustum
|
||||||
|
* Cylinder
|
||||||
|
* Gizmo
|
||||||
|
* Grid
|
||||||
|
* Line
|
||||||
|
* Line Path
|
||||||
|
* Line with Arrow
|
||||||
|
* Plane
|
||||||
|
* Points
|
||||||
|
* Position 3D (3 crossing axes)
|
||||||
|
* Sphere
|
||||||
|
* 3D Text
|
||||||
|
|
||||||
|
2D:
|
||||||
|
|
||||||
|
* **[Work in progress]**
|
||||||
|
|
||||||
|
Overlay:
|
||||||
|
|
||||||
|
* Text (with grouping and coloring)
|
||||||
|
|
||||||
|
Precompiled for:
|
||||||
|
|
||||||
|
* Windows
|
||||||
|
* Linux (built on Ubuntu 22.04)
|
||||||
|
* macOS (10.15+)
|
||||||
|
* Android (5.0+)
|
||||||
|
* iOS
|
||||||
|
* Web (Firefox is supported by Godot 4.3+)
|
||||||
|
|
||||||
|
This addon supports working with several World3D and different Viewports.
|
||||||
|
There is also a no depth test mode and other settings that can be changed for each instance.
|
||||||
|
|
||||||
|
This library supports double-precision builds, for more information, [see the documentation](https://dd3d.dmitriysalnikov.ru/docs/?page=md_docs_2DoublePrecision.html).
|
||||||
|
|
||||||
|
## [Interactive Web Demo](https://dd3d.dmitriysalnikov.ru/demo/)
|
||||||
|
|
||||||
|
[](https://dd3d.dmitriysalnikov.ru/demo/)
|
||||||
|
|
||||||
|
## Download
|
||||||
|
|
||||||
|
To download, use the [Godot Asset Library](https://godotengine.org/asset-library/asset/1766) or use one of the stable versions from the [GitHub Releases](https://github.com/DmitriySalnikov/godot_debug_draw_3d/releases) page.
|
||||||
|
|
||||||
|
For versions prior to `1.4.5`, just download one of the `source codes` in the assets. For newer versions, download `debug-draw-3d_[version].zip`.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
* Close editor
|
||||||
|
* Copy `addons/debug_draw_3d` to your `addons` folder, create it if the folder doesn't exist
|
||||||
|
* Launch editor
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
More examples can be found in the `examples_dd3d/` folder.
|
||||||
|
|
||||||
|
Simple test:
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
var _time = Time.get_ticks_msec() / 1000.0
|
||||||
|
var box_pos = Vector3(0, sin(_time * 4), 0)
|
||||||
|
var line_begin = Vector3(-1, sin(_time * 4), 0)
|
||||||
|
var line_end = Vector3(1, cos(_time * 4), 0)
|
||||||
|
|
||||||
|
DebugDraw3D.draw_box(box_pos, Quaternion.IDENTITY, Vector3(1, 2, 1), Color(0, 1, 0))
|
||||||
|
DebugDraw3D.draw_line(line_begin, line_end, Color(1, 1, 0))
|
||||||
|
DebugDraw2D.set_text("Time", _time)
|
||||||
|
DebugDraw2D.set_text("Frames drawn", Engine.get_frames_drawn())
|
||||||
|
DebugDraw2D.set_text("FPS", Engine.get_frames_per_second())
|
||||||
|
DebugDraw2D.set_text("delta", delta)
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
An example of using scoped configs:
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
@tool
|
||||||
|
extends Node3D
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
# Set the base scoped_config.
|
||||||
|
# Each frame will be reset to these scoped values.
|
||||||
|
DebugDraw3D.scoped_config().set_thickness(0.1).set_center_brightness(0.6)
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
# Draw using the base scoped config.
|
||||||
|
DebugDraw3D.draw_box(Vector3.ZERO, Quaternion.IDENTITY, Vector3.ONE * 2, Color.CORNFLOWER_BLUE)
|
||||||
|
if true:
|
||||||
|
# Create a scoped config that will exist until exiting this if.
|
||||||
|
var _s = DebugDraw3D.new_scoped_config().set_thickness(0).set_center_brightness(0.1)
|
||||||
|
# Draw with a thickness of 0
|
||||||
|
DebugDraw3D.draw_box(Vector3.ZERO, Quaternion.IDENTITY, Vector3.ONE, Color.RED)
|
||||||
|
# If necessary, the values inside this scope can be changed
|
||||||
|
# even before each call to draw_*.
|
||||||
|
_s.set_thickness(0.05)
|
||||||
|
DebugDraw3D.draw_box(Vector3(1,0,1), Quaternion.IDENTITY, Vector3.ONE * 1, Color.BLUE_VIOLET)
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
>
|
||||||
|
> If you want to use a non-standard Viewport for rendering a 3d scene, then do not forget to specify it in the scoped config!
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
This project has a separate [documentation](https://dd3d.dmitriysalnikov.ru/docs/) page.
|
||||||
|
|
||||||
|
Also, a list of all functions is available in the documentation inside the editor (see `DebugDraw3D` and `DebugDraw2D`).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Known issues and limitations
|
||||||
|
|
||||||
|
The text in the keys and values of a text group cannot contain multi-line strings.
|
||||||
|
|
||||||
|
The entire text overlay can only be placed in one corner.
|
||||||
|
|
||||||
|
[Frustum of Camera3D does not take into account the window size from ProjectSettings](https://github.com/godotengine/godot/issues/70362).
|
||||||
|
|
||||||
|
## More screenshots
|
||||||
|
|
||||||
|
`DebugDrawDemoScene.tscn` in editor
|
||||||
|

|
||||||
|
|
||||||
|
`DebugDrawDemoScene.tscn` in play mode
|
||||||
|

|
||||||
153
addons/debug_draw_3d/debug_draw_3d.gdextension
Normal file
153
addons/debug_draw_3d/debug_draw_3d.gdextension
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
[configuration]
|
||||||
|
|
||||||
|
entry_symbol = "debug_draw_3d_library_init"
|
||||||
|
compatibility_minimum = "4.2.2"
|
||||||
|
reloadable = false
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
|
||||||
|
; example.x86_64 = { "relative or absolute path to the dependency" : "the path relative to the exported project", }
|
||||||
|
; -------------------------------------
|
||||||
|
; debug
|
||||||
|
|
||||||
|
macos = { }
|
||||||
|
windows.x86_64 = { }
|
||||||
|
linux.x86_64 = { }
|
||||||
|
|
||||||
|
; by default godot is using threads
|
||||||
|
web.wasm32.nothreads = {}
|
||||||
|
web.wasm32 = {}
|
||||||
|
|
||||||
|
android.arm32 = { }
|
||||||
|
android.arm64 = { }
|
||||||
|
android.x86_32 = { }
|
||||||
|
android.x86_64 = { }
|
||||||
|
|
||||||
|
ios = {}
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
; release no debug draw
|
||||||
|
|
||||||
|
macos.template_release = { }
|
||||||
|
windows.template_release.x86_64 = { }
|
||||||
|
linux.template_release.x86_64 = { }
|
||||||
|
|
||||||
|
web.template_release.wasm32.nothreads = { }
|
||||||
|
web.template_release.wasm32 = { }
|
||||||
|
|
||||||
|
android.template_release.arm32 = { }
|
||||||
|
android.template_release.arm64 = { }
|
||||||
|
android.template_release.x86_32 = { }
|
||||||
|
android.template_release.x86_64 = { }
|
||||||
|
|
||||||
|
ios.template_release = {}
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
; release forced debug draw
|
||||||
|
|
||||||
|
macos.template_release.forced_dd3d = { }
|
||||||
|
windows.template_release.x86_64.forced_dd3d = { }
|
||||||
|
linux.template_release.x86_64.forced_dd3d = { }
|
||||||
|
|
||||||
|
web.template_release.wasm32.nothreads.forced_dd3d = { }
|
||||||
|
web.template_release.wasm32.forced_dd3d = { }
|
||||||
|
|
||||||
|
ios.template_release.forced_dd3d = {}
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
; debug
|
||||||
|
|
||||||
|
macos = "libs/libdd3d.macos.editor.universal.framework"
|
||||||
|
windows.x86_64 = "libs/libdd3d.windows.editor.x86_64.dll"
|
||||||
|
linux.x86_64 = "libs/libdd3d.linux.editor.x86_64.so"
|
||||||
|
|
||||||
|
web.wasm32.nothreads = "libs/libdd3d.web.template_debug.wasm32.wasm"
|
||||||
|
web.wasm32 = "libs/libdd3d.web.template_debug.wasm32.threads.wasm"
|
||||||
|
|
||||||
|
android.arm32 = "libs/libdd3d.android.template_debug.arm32.so"
|
||||||
|
android.arm64 = "libs/libdd3d.android.template_debug.arm64.so"
|
||||||
|
android.x86_32 = "libs/libdd3d.android.template_debug.x86_32.so"
|
||||||
|
android.x86_64 = "libs/libdd3d.android.template_debug.x86_64.so"
|
||||||
|
|
||||||
|
ios = "libs/libdd3d.ios.template_debug.universal.dylib"
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
; release no debug draw
|
||||||
|
|
||||||
|
macos.template_release = "libs/libdd3d.macos.template_release.universal.framework"
|
||||||
|
windows.template_release.x86_64 = "libs/libdd3d.windows.template_release.x86_64.dll"
|
||||||
|
linux.template_release.x86_64 = "libs/libdd3d.linux.template_release.x86_64.so"
|
||||||
|
|
||||||
|
web.template_release.wasm32.nothreads = "libs/libdd3d.web.template_release.wasm32.wasm"
|
||||||
|
web.template_release.wasm32 = "libs/libdd3d.web.template_release.wasm32.threads.wasm"
|
||||||
|
|
||||||
|
android.template_release.arm32 = "libs/libdd3d.android.template_release.arm32.so"
|
||||||
|
android.template_release.arm64 = "libs/libdd3d.android.template_release.arm64.so"
|
||||||
|
android.template_release.x86_32 = "libs/libdd3d.android.template_release.x86_32.so"
|
||||||
|
android.template_release.x86_64 = "libs/libdd3d.android.template_release.x86_64.so"
|
||||||
|
|
||||||
|
ios.template_release = "libs/libdd3d.ios.template_release.universal.dylib"
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
; release forced debug draw
|
||||||
|
|
||||||
|
macos.template_release.forced_dd3d = "libs/libdd3d.macos.template_release.universal.enabled.framework"
|
||||||
|
windows.template_release.x86_64.forced_dd3d = "libs/libdd3d.windows.template_release.x86_64.enabled.dll"
|
||||||
|
linux.template_release.x86_64.forced_dd3d = "libs/libdd3d.linux.template_release.x86_64.enabled.so"
|
||||||
|
|
||||||
|
web.template_release.wasm32.nothreads.forced_dd3d = "libs/libdd3d.web.template_release.wasm32.enabled.wasm"
|
||||||
|
web.template_release.wasm32.forced_dd3d = "libs/libdd3d.web.template_release.wasm32.threads.enabled.wasm"
|
||||||
|
|
||||||
|
ios.template_release.forced_dd3d = "libs/libdd3d.ios.template_release.universal.enabled.dylib"
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
; DOUBLE PRECISION
|
||||||
|
; -------------------------------------
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
; debug
|
||||||
|
|
||||||
|
macos.double = "libs/libdd3d.macos.editor.universal.double.framework"
|
||||||
|
windows.x86_64.double = "libs/libdd3d.windows.editor.x86_64.double.dll"
|
||||||
|
linux.x86_64.double = "libs/libdd3d.linux.editor.x86_64.double.so"
|
||||||
|
|
||||||
|
web.wasm32.nothreads.double = "libs/libdd3d.web.template_debug.wasm32.double.wasm"
|
||||||
|
web.wasm32.double = "libs/libdd3d.web.template_debug.wasm32.threads.double.wasm"
|
||||||
|
|
||||||
|
android.arm32.double = "libs/libdd3d.android.template_debug.arm32.double.so"
|
||||||
|
android.arm64.double = "libs/libdd3d.android.template_debug.arm64.double.so"
|
||||||
|
android.x86_32.double = "libs/libdd3d.android.template_debug.x86_32.double.so"
|
||||||
|
android.x86_64.double = "libs/libdd3d.android.template_debug.x86_64.double.so"
|
||||||
|
|
||||||
|
ios.double = "libs/libdd3d.ios.template_debug.universal.dylib"
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
; release no debug draw
|
||||||
|
|
||||||
|
macos.template_release.double = "libs/libdd3d.macos.template_release.universal.double.framework"
|
||||||
|
windows.template_release.x86_64.double = "libs/libdd3d.windows.template_release.x86_64.double.dll"
|
||||||
|
linux.template_release.x86_64.double = "libs/libdd3d.linux.template_release.x86_64.double.so"
|
||||||
|
|
||||||
|
web.template_release.wasm32.nothreads.double = "libs/libdd3d.web.template_release.wasm32.double.wasm"
|
||||||
|
web.template_release.wasm32.double = "libs/libdd3d.web.template_release.wasm32.threads.double.wasm"
|
||||||
|
|
||||||
|
android.template_release.arm32.double = "libs/libdd3d.android.template_release.arm32.double.so"
|
||||||
|
android.template_release.arm64.double = "libs/libdd3d.android.template_release.arm64.double.so"
|
||||||
|
android.template_release.x86_32.double = "libs/libdd3d.android.template_release.x86_32.double.so"
|
||||||
|
android.template_release.x86_64.double = "libs/libdd3d.android.template_release.x86_64.double.so"
|
||||||
|
|
||||||
|
ios.template_release.double = "libs/libdd3d.ios.template_release.universal.double.dylib"
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
; release forced debug draw
|
||||||
|
|
||||||
|
macos.template_release.forced_dd3d.double = "libs/libdd3d.macos.template_release.universal.enabled.double.framework"
|
||||||
|
windows.template_release.x86_64.forced_dd3d.double = "libs/libdd3d.windows.template_release.x86_64.enabled.double.dll"
|
||||||
|
linux.template_release.x86_64.forced_dd3d.double = "libs/libdd3d.linux.template_release.x86_64.enabled.double.so"
|
||||||
|
|
||||||
|
web.template_release.wasm32.nothreads.forced_dd3d.double = "libs/libdd3d.web.template_release.wasm32.enabled.double.wasm"
|
||||||
|
web.template_release.wasm32.forced_dd3d.double = "libs/libdd3d.web.template_release.wasm32.threads.enabled.double.wasm"
|
||||||
|
|
||||||
|
ios.template_release.forced_dd3d.double = "libs/libdd3d.ios.template_release.universal.enabled.double.dylib"
|
||||||
1
addons/debug_draw_3d/debug_draw_3d.gdextension.uid
Normal file
1
addons/debug_draw_3d/debug_draw_3d.gdextension.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://svqaxfp5kyrl
|
||||||
1610
addons/debug_draw_3d/gen/csharp/DebugDrawGeneratedAPI.generated.cs
Normal file
1610
addons/debug_draw_3d/gen/csharp/DebugDrawGeneratedAPI.generated.cs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1 @@
|
||||||
|
uid://coi5puqbv40v1
|
||||||
203
addons/debug_draw_3d/gen/csharp/log.txt
Normal file
203
addons/debug_draw_3d/gen/csharp/log.txt
Normal file
|
|
@ -0,0 +1,203 @@
|
||||||
|
Generation of bindings started, output file: res://addons/debug_draw_3d/gen/csharp/DebugDrawGeneratedAPI.generated.cs
|
||||||
|
Log file: res://addons/debug_draw_3d/gen/csharp/log.txt
|
||||||
|
Hold Shift to print information on the Output panel when manually starting generation via the 'Project - Tools - Debug Draw' menu
|
||||||
|
Class: DebugDraw2D
|
||||||
|
Wrapper...
|
||||||
|
Constants...
|
||||||
|
Enums...
|
||||||
|
Methods...
|
||||||
|
clear_all
|
||||||
|
begin_text_group
|
||||||
|
end_text_group
|
||||||
|
set_text
|
||||||
|
clear_texts
|
||||||
|
get_render_stats
|
||||||
|
Properties...
|
||||||
|
empty_color
|
||||||
|
debug_enabled
|
||||||
|
config
|
||||||
|
custom_canvas
|
||||||
|
Class: DebugDraw2DStats
|
||||||
|
Wrapper...
|
||||||
|
Constants...
|
||||||
|
Enums...
|
||||||
|
Methods...
|
||||||
|
Properties...
|
||||||
|
overlay_text_groups
|
||||||
|
overlay_text_lines
|
||||||
|
Class: DebugDraw2DConfig
|
||||||
|
Wrapper...
|
||||||
|
Constants...
|
||||||
|
Enums...
|
||||||
|
BlockPosition
|
||||||
|
Methods...
|
||||||
|
Properties...
|
||||||
|
text_block_position
|
||||||
|
text_block_offset
|
||||||
|
text_padding
|
||||||
|
text_default_duration
|
||||||
|
text_default_size
|
||||||
|
text_foreground_color
|
||||||
|
text_background_color
|
||||||
|
text_custom_font
|
||||||
|
Class: DebugDraw3D
|
||||||
|
Wrapper...
|
||||||
|
Constants...
|
||||||
|
Enums...
|
||||||
|
PointType
|
||||||
|
Methods...
|
||||||
|
regenerate_geometry_meshes
|
||||||
|
clear_all
|
||||||
|
draw_sphere
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_sphere_xf
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_cylinder
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_cylinder_ab
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_box
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_box_ab
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_box_xf
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_aabb
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_aabb_ab
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_line_hit
|
||||||
|
hit_color will be remapped to arg_2
|
||||||
|
after_hit_color will be remapped to arg_2
|
||||||
|
draw_line_hit_offset
|
||||||
|
hit_color will be remapped to arg_2
|
||||||
|
after_hit_color will be remapped to arg_2
|
||||||
|
draw_line
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_lines
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_ray
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_line_path
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_arrowhead
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_arrow
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_arrow_ray
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_arrow_path
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_point_path
|
||||||
|
points_color will be remapped to arg_2
|
||||||
|
lines_color will be remapped to arg_2
|
||||||
|
draw_square
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_plane
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_points
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_camera_frustum
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_camera_frustum_planes
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_position
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_gizmo
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_grid
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_grid_xf
|
||||||
|
color will be remapped to arg_2
|
||||||
|
draw_text
|
||||||
|
color will be remapped to arg_2
|
||||||
|
get_render_stats
|
||||||
|
get_render_stats_for_world
|
||||||
|
new_scoped_config
|
||||||
|
scoped_config
|
||||||
|
Properties...
|
||||||
|
empty_color
|
||||||
|
debug_enabled
|
||||||
|
config
|
||||||
|
Class: DebugDraw3DStats
|
||||||
|
Wrapper...
|
||||||
|
Constants...
|
||||||
|
Enums...
|
||||||
|
Methods...
|
||||||
|
Properties...
|
||||||
|
instances
|
||||||
|
lines
|
||||||
|
instances_physics
|
||||||
|
lines_physics
|
||||||
|
total_geometry
|
||||||
|
visible_instances
|
||||||
|
visible_lines
|
||||||
|
total_visible
|
||||||
|
time_filling_buffers_instances_usec
|
||||||
|
time_filling_buffers_lines_usec
|
||||||
|
time_filling_buffers_instances_physics_usec
|
||||||
|
time_filling_buffers_lines_physics_usec
|
||||||
|
total_time_filling_buffers_usec
|
||||||
|
time_culling_instances_usec
|
||||||
|
time_culling_lines_usec
|
||||||
|
total_time_culling_usec
|
||||||
|
total_time_spent_usec
|
||||||
|
created_scoped_configs
|
||||||
|
orphan_scoped_configs
|
||||||
|
nodes_label3d_visible
|
||||||
|
nodes_label3d_visible_physics
|
||||||
|
nodes_label3d_exists
|
||||||
|
nodes_label3d_exists_physics
|
||||||
|
nodes_label3d_exists_total
|
||||||
|
Class: DebugDraw3DConfig
|
||||||
|
Wrapper...
|
||||||
|
Constants...
|
||||||
|
Enums...
|
||||||
|
Methods...
|
||||||
|
Properties...
|
||||||
|
freeze_3d_render
|
||||||
|
visible_instance_bounds
|
||||||
|
use_frustum_culling
|
||||||
|
frustum_length_scale
|
||||||
|
force_use_camera_from_scene
|
||||||
|
geometry_render_layers
|
||||||
|
line_hit_color
|
||||||
|
line_after_hit_color
|
||||||
|
Class: DebugDraw3DScopeConfig
|
||||||
|
Wrapper...
|
||||||
|
Constants...
|
||||||
|
Enums...
|
||||||
|
Methods...
|
||||||
|
set_thickness
|
||||||
|
get_thickness
|
||||||
|
set_center_brightness
|
||||||
|
get_center_brightness
|
||||||
|
set_hd_sphere
|
||||||
|
is_hd_sphere
|
||||||
|
set_plane_size
|
||||||
|
get_plane_size
|
||||||
|
set_transform
|
||||||
|
get_transform
|
||||||
|
set_viewport
|
||||||
|
get_viewport
|
||||||
|
set_no_depth_test
|
||||||
|
is_no_depth_test
|
||||||
|
set_text_outline_color
|
||||||
|
get_text_outline_color
|
||||||
|
set_text_outline_size
|
||||||
|
get_text_outline_size
|
||||||
|
set_text_font
|
||||||
|
get_text_font
|
||||||
|
Properties...
|
||||||
|
Class: DebugDrawManager
|
||||||
|
Wrapper...
|
||||||
|
Constants...
|
||||||
|
Enums...
|
||||||
|
Methods...
|
||||||
|
clear_all
|
||||||
|
Properties...
|
||||||
|
debug_enabled
|
||||||
|
DebugDraw utilities:
|
||||||
|
Arguments remap...
|
||||||
|
Class factory...
|
||||||
|
The generation process is completed!
|
||||||
0
addons/debug_draw_3d/libs/.gdignore
Normal file
0
addons/debug_draw_3d/libs/.gdignore
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
addons/debug_draw_3d/libs/libdd3d.linux.editor.x86_64.so
Normal file
BIN
addons/debug_draw_3d/libs/libdd3d.linux.editor.x86_64.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>libdd3d.macos.editor.universal.dylib</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Debug Draw 3D</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>Debug Draw 3D</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>ru.dmitriysalnikov.dd3d</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright (c) Dmitriy Salnikov.</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.5.1</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.5.1</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CSResourcesFileMapped</key>
|
||||||
|
<true/>
|
||||||
|
<key>DTPlatformName</key>
|
||||||
|
<string>macosx</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.14</string>
|
||||||
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
|
<array>
|
||||||
|
<string>MacOSX</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>libdd3d.macos.template_release.universal.enabled.dylib</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Debug Draw 3D</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>Debug Draw 3D</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>ru.dmitriysalnikov.dd3d</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright (c) Dmitriy Salnikov.</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.5.1</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.5.1</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CSResourcesFileMapped</key>
|
||||||
|
<true/>
|
||||||
|
<key>DTPlatformName</key>
|
||||||
|
<string>macosx</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.14</string>
|
||||||
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
|
<array>
|
||||||
|
<string>MacOSX</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>libdd3d.macos.template_release.universal.dylib</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Debug Draw 3D</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>Debug Draw 3D</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>ru.dmitriysalnikov.dd3d</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright (c) Dmitriy Salnikov.</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.5.1</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.5.1</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CSResourcesFileMapped</key>
|
||||||
|
<true/>
|
||||||
|
<key>DTPlatformName</key>
|
||||||
|
<string>macosx</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.14</string>
|
||||||
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
|
<array>
|
||||||
|
<string>MacOSX</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
||||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue