diff --git a/.gitignore b/.gitignore index 44f84be..68bc274 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /DungeonShooting_Godot/android /DungeonShooting_Godot/.idea +/DungeonShooting_Godot/.godot /Script_Vscode_Plugin/node_modules /DScript/.idea /DScript/DScript_Compiler/obj @@ -13,4 +14,4 @@ /DScript/DScript_Compiler_Test/bin /DScript/DScript_Compiler_Test/obj /DScript/DScript_Runtime/Backups -/DScript/DScript.sln.DotSettings.user \ No newline at end of file +/DScript/DScript.sln.DotSettings.user diff --git a/DungeonShooting_Godot/.gitignore b/DungeonShooting_Godot/.gitignore index 6347901..5459f07 100644 --- a/DungeonShooting_Godot/.gitignore +++ b/DungeonShooting_Godot/.gitignore @@ -2,3 +2,4 @@ /.import /.mono /.vs +/.godot \ No newline at end of file diff --git a/DungeonShooting_Godot/DungeonShooting.csproj b/DungeonShooting_Godot/DungeonShooting.csproj index cdcc424..dd1e7a3 100644 --- a/DungeonShooting_Godot/DungeonShooting.csproj +++ b/DungeonShooting_Godot/DungeonShooting.csproj @@ -1,14 +1,6 @@ - + - net472 + net6.0 + true - - - - - - - - - \ No newline at end of file diff --git a/DungeonShooting_Godot/DungeonShooting.csproj.old b/DungeonShooting_Godot/DungeonShooting.csproj.old new file mode 100644 index 0000000..cdcc424 --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old @@ -0,0 +1,14 @@ + + + net472 + + + + + + + + + + + \ No newline at end of file diff --git a/DungeonShooting_Godot/DungeonShooting.sln b/DungeonShooting_Godot/DungeonShooting.sln index 746d57c..759fe2f 100644 --- a/DungeonShooting_Godot/DungeonShooting.sln +++ b/DungeonShooting_Godot/DungeonShooting.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DungeonShooting", "DungeonShooting.csproj", "{1C7B20F3-5430-47C7-988D-0A360C4E9CDB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DungeonShooting", "DungeonShooting.csproj", "{5FEA73C5-32E3-43C4-839F-A1485EAC91BC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,11 +9,11 @@ ExportRelease|Any CPU = ExportRelease|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1C7B20F3-5430-47C7-988D-0A360C4E9CDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C7B20F3-5430-47C7-988D-0A360C4E9CDB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C7B20F3-5430-47C7-988D-0A360C4E9CDB}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU - {1C7B20F3-5430-47C7-988D-0A360C4E9CDB}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU - {1C7B20F3-5430-47C7-988D-0A360C4E9CDB}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU - {1C7B20F3-5430-47C7-988D-0A360C4E9CDB}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + {5FEA73C5-32E3-43C4-839F-A1485EAC91BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FEA73C5-32E3-43C4-839F-A1485EAC91BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FEA73C5-32E3-43C4-839F-A1485EAC91BC}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {5FEA73C5-32E3-43C4-839F-A1485EAC91BC}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {5FEA73C5-32E3-43C4-839F-A1485EAC91BC}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {5FEA73C5-32E3-43C4-839F-A1485EAC91BC}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU EndGlobalSection EndGlobal diff --git a/DungeonShooting_Godot/DungeonShooting.sln.DotSettings.user b/DungeonShooting_Godot/DungeonShooting.sln.DotSettings.user index 66f7988..5ef2d60 100644 --- a/DungeonShooting_Godot/DungeonShooting.sln.DotSettings.user +++ b/DungeonShooting_Godot/DungeonShooting.sln.DotSettings.user @@ -1,5 +1,2 @@  - WARNING - <AssemblyExplorer> - <Assembly Path="D:\GameProject\DungeonShooting\DungeonShooting_Godot\.mono\assemblies\Debug\GodotSharp.dll" /> -</AssemblyExplorer> \ No newline at end of file + WARNING \ No newline at end of file diff --git a/DungeonShooting_Godot/Silver.ttf.import b/DungeonShooting_Godot/Silver.ttf.import new file mode 100644 index 0000000..0cb40e8 --- /dev/null +++ b/DungeonShooting_Godot/Silver.ttf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://byrf43x8my2ym" +path="res://.godot/imported/Silver.ttf-acf985a494ec9501dbab5d460c1c1e21.fontdata" + +[deps] + +source_file="res://Silver.ttf" +dest_files=["res://.godot/imported/Silver.ttf-acf985a494ec9501dbab5d460c1c1e21.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/DungeonShooting_Godot/SourceHanSerifCN-SemiBold.otf.import b/DungeonShooting_Godot/SourceHanSerifCN-SemiBold.otf.import new file mode 100644 index 0000000..3aed657 --- /dev/null +++ b/DungeonShooting_Godot/SourceHanSerifCN-SemiBold.otf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://cxje5ycy236ds" +path="res://.godot/imported/SourceHanSerifCN-SemiBold.otf-8dcf564a1a7bde5d3a872366b8020586.fontdata" + +[deps] + +source_file="res://SourceHanSerifCN-SemiBold.otf" +dest_files=["res://.godot/imported/SourceHanSerifCN-SemiBold.otf-8dcf564a1a7bde5d3a872366b8020586.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/ActivityObject.svg.import b/DungeonShooting_Godot/addons/dungeonShooting_plugin/ActivityObject.svg.import index 6ad57a1..22e256f 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/ActivityObject.svg.import +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/ActivityObject.svg.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/ActivityObject.svg-991005c73263a96e250ef83836b7394e.stex" +type="CompressedTexture2D" +uid="uid://bxg2m4wo5vtyd" +path="res://.godot/imported/ActivityObject.svg-991005c73263a96e250ef83836b7394e.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,27 @@ [deps] source_file="res://addons/dungeonShooting_plugin/ActivityObject.svg" -dest_files=[ "res://.import/ActivityObject.svg-991005c73263a96e250ef83836b7394e.stex" ] +dest_files=["res://.godot/imported/ActivityObject.svg-991005c73263a96e250ef83836b7394e.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=false -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" process/fix_alpha_border=true process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/ActivityObjectTemplate.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/ActivityObjectTemplate.cs index afbc008..16fcbb8 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/ActivityObjectTemplate.cs +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/ActivityObjectTemplate.cs @@ -1,4 +1,4 @@ -using Godot; +using Godot; namespace Plugin { @@ -6,7 +6,7 @@ /// ActivityObject 节点模板对象 /// [Tool] - public class ActivityObjectTemplate : Node + public partial class ActivityObjectTemplate : Node { /// /// 是否放入 ySort 节点下 @@ -21,12 +21,12 @@ /// /// 当前物体所属物理层 /// - [Export(PropertyHint.Layers2dPhysics)] public uint collision_layer; + [Export(PropertyHint.Layers2DPhysics)] public uint collision_layer; /// /// 当前物体扫描的物理层 /// - [Export(PropertyHint.Layers2dPhysics)] public uint collision_mask; + [Export(PropertyHint.Layers2DPhysics)] public uint collision_mask; /// /// 显示状态 @@ -42,7 +42,7 @@ { #if TOOLS // 在工具模式下创建的 template 节点自动创建对应的必要子节点 - if (Engine.EditorHint) + if (Engine.IsEditorHint()) { var parent = GetParent(); if (parent != null) @@ -62,17 +62,17 @@ owner = parent; } - var sprite = GetNodeOrNull("ShadowSprite"); + var sprite = GetNodeOrNull("ShadowSprite"); //创建Shadow if (sprite == null) { - sprite = new Sprite(); + sprite = new Sprite2D(); sprite.Name = "ShadowSprite"; sprite.ZIndex = -5; var material = ResourceManager.Load(ResourcePath.resource_materlal_Blend_tres, false); - material.SetShaderParam("blend", new Color(0, 0, 0, 0.47058824F)); - material.SetShaderParam("schedule", 1); + material.SetShaderParameter("blend", new Color(0, 0, 0, 0.47058824F)); + material.SetShaderParameter("schedule", 1); sprite.Material = material; AddChild(sprite); sprite.Owner = owner; @@ -81,21 +81,21 @@ { var material = ResourceManager.Load(ResourcePath.resource_materlal_Blend_tres, false); - material.SetShaderParam("blend", new Color(0, 0, 0, 0.47058824F)); - material.SetShaderParam("schedule", 1); + material.SetShaderParameter("blend", new Color(0, 0, 0, 0.47058824F)); + material.SetShaderParameter("schedule", 1); sprite.Material = material; } - var animatedSprite = GetNodeOrNull("AnimatedSprite"); - //创建 Sprite + var animatedSprite = GetNodeOrNull("AnimatedSprite2D"); + //创建 Sprite2D if (animatedSprite == null) { - animatedSprite = new AnimatedSprite(); - animatedSprite.Name = "AnimatedSprite"; + animatedSprite = new AnimatedSprite2D(); + animatedSprite.Name = "AnimatedSprite2D"; var material = ResourceManager.Load(ResourcePath.resource_materlal_Blend_tres, false); - material.SetShaderParam("blend", new Color(1, 1, 1, 1)); - material.SetShaderParam("schedule", 0); + material.SetShaderParameter("blend", new Color(1, 1, 1, 1)); + material.SetShaderParameter("schedule", 0); animatedSprite.Material = material; AddChild(animatedSprite); animatedSprite.Owner = owner; @@ -104,8 +104,8 @@ { var material = ResourceManager.Load(ResourcePath.resource_materlal_Blend_tres, false); - material.SetShaderParam("blend", new Color(1, 1, 1, 1)); - material.SetShaderParam("schedule", 0); + material.SetShaderParameter("blend", new Color(1, 1, 1, 1)); + material.SetShaderParameter("schedule", 0); animatedSprite.Material = material; } diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Automation.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Automation.cs index 47f8b10..c98af3c 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Automation.cs +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Automation.cs @@ -6,7 +6,7 @@ using File = System.IO.File; [Tool] -public class Automation : Control +public partial class Automation : Control { //支持后缀 private string[] suffix = @@ -16,7 +16,7 @@ //排除第一层的文件夹 private string[] exclude = { - ".vscode", ".idea", ".git", ".import", ".mono", "android", "addons" + ".vscode", ".idea", ".git", ".import", ".mono", "android", "addons", ".godot" }; private string currDir = System.Environment.CurrentDirectory; @@ -30,8 +30,7 @@ "/// \n" + "public class ResourcePath\n" + "{\n"; - //输出路径 - var path = "src/game/manager/ResourcePath1.cs"; + GD.Print("更新 ResourcePath..."); var directoryInfo = new DirectoryInfo(currDir); diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Automation.tscn b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Automation.tscn index 3e3a557..89e7ef5 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Automation.tscn +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Automation.tscn @@ -12,23 +12,23 @@ anchor_bottom = 1.0 [node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"] -margin_right = 1920.0 -margin_bottom = 35.0 +offset_right = 1920.0 +offset_bottom = 35.0 size_flags_horizontal = 3 [node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer"] -margin_right = 1920.0 -margin_bottom = 35.0 +offset_right = 1920.0 +offset_bottom = 35.0 [node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/HBoxContainer"] -margin_right = 158.0 -margin_bottom = 35.0 +offset_right = 158.0 +offset_bottom = 35.0 text = "ResourcePath.cs" [node name="Button" type="Button" parent="ScrollContainer/VBoxContainer/HBoxContainer"] -margin_left = 162.0 -margin_right = 246.0 -margin_bottom = 35.0 +offset_left = 162.0 +offset_right = 246.0 +offset_bottom = 35.0 text = "重新生成" [connection signal="pressed" from="ScrollContainer/VBoxContainer/HBoxContainer/Button" to="." method="_on_Button_pressed"] diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs index 1ebb968..b077d46 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs @@ -4,14 +4,14 @@ namespace Plugin { [Tool] - public class Plugin : EditorPlugin + public partial class Plugin : EditorPlugin { public static Plugin Instance => _instance; private static Plugin _instance; private Control dock; - public override void _Process(float delta) + public override void _Process(double delta) { _instance = this; } @@ -20,10 +20,10 @@ { _instance = this; var script = GD.Load