diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/BuffGenerator.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/BuffGenerator.cs new file mode 100644 index 0000000..b55a29a --- /dev/null +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/BuffGenerator.cs @@ -0,0 +1,134 @@ +#if TOOLS +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using Godot; + +namespace Generator; + +/// +/// 生成 Buff 属性表 +/// +public static class BuffGenerator +{ + private const string SavePath = "src/game/manager/BuffRegister.cs"; + + public static bool Generate() + { + try + { + var str = ""; + var buffInfos = new Dictionary(); + var types = typeof(BuffGenerator).Assembly.GetTypes(); + //包含[BuffAttribute]特性 + var enumerable = types.Where(type => + type.IsClass && !type.IsAbstract && type.IsAssignableTo(typeof(BuffFragment))); + foreach (var type in enumerable) + { + var attribute = (BuffAttribute)type.GetCustomAttribute(typeof(BuffAttribute), false); + if (attribute != null) + { + if (buffInfos.ContainsKey(attribute.BuffName)) + { + GD.PrintErr($"Buff '{attribute.BuffName}' 重名!"); + return false; + } + var buffInfo = new BuffInfo(attribute.BuffName, attribute.Description, type); + str += $"{buffInfo.Name}: {buffInfo.Description}\n"; + buffInfos.Add(attribute.BuffName, buffInfo); + //判断重写参数情况 + //1参数 + var methodInfo1 = type.GetMethod(nameof(BuffFragment.InitParam), + BindingFlags.Instance | BindingFlags.Public, new Type[] { typeof(float) }); + if (methodInfo1 != null && + methodInfo1.GetBaseDefinition().DeclaringType != methodInfo1.DeclaringType) + { + buffInfo.Params.Add(1); + } + + //2参数 + var methodInfo2 = type.GetMethod(nameof(BuffFragment.InitParam), + BindingFlags.Instance | BindingFlags.Public, new Type[] { typeof(float), typeof(float) }); + if (methodInfo2 != null && + methodInfo2.GetBaseDefinition().DeclaringType != methodInfo2.DeclaringType) + { + buffInfo.Params.Add(2); + } + + //3参数 + var methodInfo3 = type.GetMethod(nameof(BuffFragment.InitParam), + BindingFlags.Instance | BindingFlags.Public, + new Type[] { typeof(float), typeof(float), typeof(float) }); + if (methodInfo3 != null && + methodInfo3.GetBaseDefinition().DeclaringType != methodInfo3.DeclaringType) + { + buffInfo.Params.Add(3); + } + + //4参数 + var methodInfo4 = type.GetMethod(nameof(BuffFragment.InitParam), + BindingFlags.Instance | BindingFlags.Public, + new Type[] { typeof(float), typeof(float), typeof(float), typeof(float) }); + if (methodInfo4 != null && + methodInfo4.GetBaseDefinition().DeclaringType != methodInfo4.DeclaringType) + { + buffInfo.Params.Add(4); + } + } + } + + GenerateCode(buffInfos); + GD.Print("-----------------------------"); + GD.Print(str); + } + catch (Exception e) + { + GD.PrintErr(e.Message + "\n" + e.StackTrace); + return false; + } + + return true; + } + + private static void GenerateCode(Dictionary buffInfo) + { + var str = ""; + foreach (var kv in buffInfo) + { + var info = kv.Value; + var s = ""; + for (var i = 0; i < info.Params.Count; i++) + { + if (i > 0) s += ", "; + s += info.Params[i]; + } + + str += $" BuffInfos.Add(\"{info.Name}\", new BuffInfo(\"{info.Name}\", null, new List() {{ {s} }}, typeof({info.Type.FullName})));\n"; + } + + var code = $"using System.Collections.Generic;\n" + + $"/// \n" + + $"/// buff 注册类, 调用 Init() 函数初始化数据\n" + + $"/// 注意: 该类为 Tools 面板下自动生成的, 请不要手动编辑!\n" + + $"/// \n" + + $"public class BuffRegister\n" + + $"{{\n" + + $" /// \n" + + $" /// 所有 buff 信息\n" + + $" /// \n" + + $" public static Dictionary BuffInfos {{ get; private set; }}\n" + + $" /// \n" + + $" /// 初始化 buff\n" + + $" /// \n" + + $" public static void Init()\n" + + $" {{\n" + + $" BuffInfos = new Dictionary();\n" + + str + + $" }}\n" + + $"}}"; + File.WriteAllText(SavePath, code); + } +} +#endif diff --git a/DungeonShooting_Godot/excel/ActivePropBase.xlsx b/DungeonShooting_Godot/excel/ActivePropBase.xlsx new file mode 100644 index 0000000..260a154 --- /dev/null +++ b/DungeonShooting_Godot/excel/ActivePropBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/ActivityBase.xlsx b/DungeonShooting_Godot/excel/ActivityBase.xlsx index 0eec9a2..22fe5c6 100644 --- a/DungeonShooting_Godot/excel/ActivityBase.xlsx +++ b/DungeonShooting_Godot/excel/ActivityBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/BuffPropBase.xlsx b/DungeonShooting_Godot/excel/BuffPropBase.xlsx new file mode 100644 index 0000000..66bfbee --- /dev/null +++ b/DungeonShooting_Godot/excel/BuffPropBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excelTool/ExcelGenerator.cs b/DungeonShooting_Godot/excelTool/ExcelGenerator.cs index 8a60a7c..baa592d 100644 --- a/DungeonShooting_Godot/excelTool/ExcelGenerator.cs +++ b/DungeonShooting_Godot/excelTool/ExcelGenerator.cs @@ -20,6 +20,7 @@ public string TypeStr; public string TypeName; public CollectionsType CollectionsType; + public bool AutoParentheses = false; public bool IsRefExcel; public string RefTypeStr; @@ -392,7 +393,15 @@ MappingData mappingData; try { + var autoParentheses = false; + if (typeString.EndsWith('*')) + { + autoParentheses = true; + typeString = typeString.TrimEnd('*'); + } + mappingData = ConvertToType(typeString.Replace(" ", "")); + mappingData.AutoParentheses = autoParentheses; } catch (Exception e) { @@ -545,6 +554,17 @@ } else { + if (mappingData.AutoParentheses) + { + if (mappingData.CollectionsType == CollectionsType.Array) + { + cellStringValue = "[" + cellStringValue.TrimEnd(',') + "]"; + } + if (mappingData.CollectionsType == CollectionsType.Map) + { + cellStringValue = "{" + cellStringValue.TrimEnd(',') + "}"; + } + } data.Add(field, JsonSerializer.Deserialize(cellStringValue, excelData.ColumnType[fieldName])); } } diff --git a/DungeonShooting_Godot/excelTool/version b/DungeonShooting_Godot/excelTool/version index 7813681..62f9457 100644 --- a/DungeonShooting_Godot/excelTool/version +++ b/DungeonShooting_Godot/excelTool/version @@ -1 +1 @@ -5 \ No newline at end of file +6 \ No newline at end of file diff --git a/DungeonShooting_Godot/prefab/prop/BuffProp.tscn b/DungeonShooting_Godot/prefab/prop/BuffProp.tscn new file mode 100644 index 0000000..34aa0c4 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/BuffProp.tscn @@ -0,0 +1,52 @@ +[gd_scene load_steps=7 format=3 uid="uid://dfpic4nubu7cf"] + +[ext_resource type="Script" path="res://src/game/activity/prop/BuffProp.cs" id="1_nlcp6"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_imicp"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_imicp") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true +shader_parameter/grey = 0.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_imicp") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true +shader_parameter/grey = 0.0 + +[sub_resource type="SpriteFrames" id="SpriteFrames_y5dlc"] +resource_local_to_scene = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="BuffProp" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_nlcp6") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = SubResource("SpriteFrames_y5dlc") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0001.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0001.tscn deleted file mode 100644 index 5a224de..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0001.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://tdc6flkvlfbd"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0001.cs" id="1_exxhd"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_x6ey2"] -[ext_resource type="SpriteFrames" uid="uid://wtvfyprel72y" path="res://resource/spriteFrames/prop/buff/BuffProp0001.tres" id="3_hfyao"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("2_x6ey2") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("2_x6ey2") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0001" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_exxhd") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_hfyao") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0002.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0002.tscn deleted file mode 100644 index eb82ff2..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0002.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://da131v16ct8c4"] - -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_2qy1s"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0002.cs" id="1_5ouvd"] -[ext_resource type="SpriteFrames" uid="uid://7t57gsyff470" path="res://resource/spriteFrames/prop/buff/BuffProp0002.tres" id="3_v4alm"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("1_2qy1s") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("1_2qy1s") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0002" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_5ouvd") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_v4alm") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0003.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0003.tscn deleted file mode 100644 index f58be9f..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0003.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://ds21gbw4wyvn6"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0003.cs" id="1_h8d6p"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_udh4b"] -[ext_resource type="SpriteFrames" uid="uid://nqoieett75t3" path="res://resource/spriteFrames/prop/buff/BuffProp0003.tres" id="3_h72sh"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("1_udh4b") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("1_udh4b") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0003" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_h8d6p") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_h72sh") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0004.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0004.tscn deleted file mode 100644 index 4e86fe2..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0004.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://cq8edil51uccc"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0004.cs" id="1_7bt71"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_j7hva"] -[ext_resource type="SpriteFrames" uid="uid://bj0k3pipwp46x" path="res://resource/spriteFrames/prop/buff/BuffProp0004.tres" id="3_pdaqp"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("1_j7hva") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("1_j7hva") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0004" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_7bt71") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_pdaqp") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0005.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0005.tscn deleted file mode 100644 index b970cc9..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0005.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://3xtqrx17y14p"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0005.cs" id="1_6dlc2"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_qa4yg"] -[ext_resource type="SpriteFrames" uid="uid://bvqp46degt1rg" path="res://resource/spriteFrames/prop/buff/BuffProp0005.tres" id="3_1mcnn"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("1_qa4yg") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("1_qa4yg") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0005" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_6dlc2") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_1mcnn") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0006.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0006.tscn deleted file mode 100644 index bc71428..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0006.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://bfc03e4aftg21"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0006.cs" id="1_2cooj"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_c1mo1"] -[ext_resource type="SpriteFrames" uid="uid://bxn65oovekw6k" path="res://resource/spriteFrames/prop/buff/BuffProp0006.tres" id="3_nd6lq"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("1_c1mo1") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("1_c1mo1") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0006" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_2cooj") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_nd6lq") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0007.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0007.tscn deleted file mode 100644 index b8bcd90..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0007.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://cwfuv68ijkmfg"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0007.cs" id="1_71c3m"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_ofs5v"] -[ext_resource type="SpriteFrames" uid="uid://et840sb4d1g3" path="res://resource/spriteFrames/prop/buff/BuffProp0007.tres" id="3_xxla0"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("1_ofs5v") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("1_ofs5v") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0007" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_71c3m") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_xxla0") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0008.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0008.tscn deleted file mode 100644 index 7de7463..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0008.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://cn1tmegrfgr8h"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0008.cs" id="1_b5ys1"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_tdrqb"] -[ext_resource type="SpriteFrames" uid="uid://bs41p1hpkpucb" path="res://resource/spriteFrames/prop/buff/BuffProp0008.tres" id="3_5noil"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("1_tdrqb") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("1_tdrqb") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0008" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_b5ys1") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_5noil") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0009.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0009.tscn deleted file mode 100644 index a5167ba..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0009.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://gh0dxgvshwpm"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0009.cs" id="1_e1yrg"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_eq0bc"] -[ext_resource type="SpriteFrames" uid="uid://sqcibio78nwc" path="res://resource/spriteFrames/prop/buff/BuffProp0009.tres" id="3_qrjbu"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("1_eq0bc") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("1_eq0bc") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0009" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_e1yrg") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_qrjbu") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0010.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0010.tscn deleted file mode 100644 index b203391..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0010.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://do5mmmapnyxg4"] - -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_5yy3i"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0010.cs" id="1_q6g7l"] -[ext_resource type="SpriteFrames" uid="uid://dxqtm7xgn2wms" path="res://resource/spriteFrames/prop/buff/BuffProp0010.tres" id="3_i5q7j"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("1_5yy3i") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("1_5yy3i") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0010" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_q6g7l") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_i5q7j") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0011.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0011.tscn deleted file mode 100644 index f1e2562..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0011.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://bs3ysp1587xqe"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0011.cs" id="1_dnyh3"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_d5gcm"] -[ext_resource type="SpriteFrames" uid="uid://bq7t8ruav5g41" path="res://resource/spriteFrames/prop/buff/BuffProp0011.tres" id="3_hrxu3"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("2_d5gcm") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("2_d5gcm") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0011" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_dnyh3") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_hrxu3") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0012.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0012.tscn deleted file mode 100644 index 7692be7..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0012.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://ph6x3vmkp11j"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0012.cs" id="1_w2r3p"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_kwnd5"] -[ext_resource type="SpriteFrames" uid="uid://rksmm8jwex7l" path="res://resource/spriteFrames/prop/buff/BuffProp0012.tres" id="3_fijh4"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("2_kwnd5") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("2_kwnd5") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0012" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_w2r3p") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_fijh4") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0013.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0013.tscn deleted file mode 100644 index bd04f52..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0013.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://di6874mbwbpkd"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0013.cs" id="1_iy1yu"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_n5bm6"] -[ext_resource type="SpriteFrames" uid="uid://cdnrqfy0vfyu5" path="res://resource/spriteFrames/prop/buff/BuffProp0013.tres" id="3_4qjjr"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("2_n5bm6") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("2_n5bm6") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0013" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_iy1yu") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_4qjjr") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0014.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0014.tscn deleted file mode 100644 index dc86fa5..0000000 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0014.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://dw2tt5urcxtxe"] - -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0014.cs" id="1_3n5b4"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_ts4j6"] -[ext_resource type="SpriteFrames" uid="uid://ux70kddi6wwy" path="res://resource/spriteFrames/prop/buff/BuffProp0014.tres" id="3_byb1t"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] -resource_local_to_scene = true -shader = ExtResource("2_ts4j6") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] -resource_local_to_scene = true -shader = ExtResource("2_ts4j6") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true -shader_parameter/grey = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] -size = Vector2(12, 10) - -[node name="BuffProp0014" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 -script = ExtResource("1_3n5b4") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_mrkt4") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_b6ii6") -sprite_frames = ExtResource("3_byb1t") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/ui/EditorTools.tscn b/DungeonShooting_Godot/prefab/ui/EditorTools.tscn index 9817a68..b8857a4 100644 --- a/DungeonShooting_Godot/prefab/ui/EditorTools.tscn +++ b/DungeonShooting_Godot/prefab/ui/EditorTools.tscn @@ -88,6 +88,18 @@ layout_mode = 2 text = "运行" +[node name="HBoxContainer6" type="HBoxContainer" parent="ScrollContainer/MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/separation = 5 + +[node name="Label" type="Label" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer6"] +layout_mode = 2 +text = "生成Buff属性表" + +[node name="Button" type="Button" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer6"] +layout_mode = 2 +text = "运行" + [node name="HBoxContainer7" type="HBoxContainer" parent="ScrollContainer/MarginContainer/VBoxContainer"] layout_mode = 2 theme_override_constants/separation = 5 diff --git a/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn b/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn index dc706af..1a028c7 100644 --- a/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn +++ b/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn @@ -1,9 +1,16 @@ -[gd_scene load_steps=6 format=3 uid="uid://b2xq02i3vxct"] +[gd_scene load_steps=14 format=3 uid="uid://b2xq02i3vxct"] [ext_resource type="Script" path="res://src/game/ui/encyclopedia/EncyclopediaPanel.cs" id="1_hd86y"] -[ext_resource type="Texture2D" uid="uid://blfvsup876agh" path="res://resource/sprite/ui/commonIcon/Search.png" id="2_3ln1u"] +[ext_resource type="Texture2D" uid="uid://c0st2iiql8igg" path="res://resource/sprite/ui/encyclopedia/TitleBg.png" id="3_gdtik"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_o1xl7"] -[ext_resource type="Texture2D" uid="uid://bn47bmilcw4x0" path="res://resource/sprite/ui/commonIcon/Select2.png" id="4_gtlqd"] +[ext_resource type="Texture2D" uid="uid://dahib4qcevboo" path="res://resource/sprite/ui/encyclopedia/Panel2.png" id="4_21546"] +[ext_resource type="Texture2D" uid="uid://jb73i5q1dv2a" path="res://resource/sprite/ui/encyclopedia/Tab.png" id="4_nm64b"] +[ext_resource type="Texture2D" uid="uid://brevrlfdtllmk" path="res://resource/sprite/ui/encyclopedia/Select.png" id="5_f0anf"] +[ext_resource type="Texture2D" uid="uid://cu5y32wfai4pn" path="res://resource/sprite/ui/encyclopedia/Item.png" id="5_niceh"] +[ext_resource type="Texture2D" uid="uid://conjg6fw6670x" path="res://resource/sprite/ui/encyclopedia/Panel.png" id="7_hfdat"] +[ext_resource type="Shader" path="res://resource/material/Outline.gdshader" id="9_mmpq6"] +[ext_resource type="Texture2D" uid="uid://cuas0bdjlpmwb" path="res://resource/sprite/ui/encyclopedia/Close.png" id="10_jgsfw"] +[ext_resource type="Texture2D" uid="uid://7x5b5ed7hk7w" path="res://resource/sprite/ui/encyclopedia/CloseSelect.png" id="11_247gy"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_gm0bl"] resource_local_to_scene = true @@ -17,118 +24,266 @@ shader_parameter/outline_use_blend = true shader_parameter/grey = 0.0 +[sub_resource type="ShaderMaterial" id="ShaderMaterial_qdxtu"] +resource_local_to_scene = true +shader = ExtResource("9_mmpq6") +shader_parameter/outline_color = Color(1, 1, 1, 1) + [node name="Encyclopedia" type="Control"] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 script = ExtResource("1_hd86y") -[node name="Panel2" type="Panel" parent="."] +[node name="ColorRect" type="ColorRect" parent="."] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -size_flags_horizontal = 3 -size_flags_stretch_ratio = 75.0 +color = Color(0, 0, 0, 0.705882) -[node name="MarginContainer" type="MarginContainer" parent="Panel2"] +[node name="NinePatchRect" type="NinePatchRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 3.0 +offset_top = 54.0 +offset_right = -3.0 +offset_bottom = -3.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("7_hfdat") +region_rect = Rect2(0, 0, 128, 128) +patch_margin_left = 56 +patch_margin_top = 56 +patch_margin_right = 56 +patch_margin_bottom = 56 + +[node name="TextureRect" type="TextureRect" parent="NinePatchRect"] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_left = -3.0 +offset_top = -35.0 +offset_right = -3.0 +offset_bottom = 69.0 +grow_horizontal = 2 +texture = ExtResource("3_gdtik") +stretch_mode = 3 + +[node name="Label" type="Label" parent="NinePatchRect/TextureRect"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -3.0 +offset_bottom = -15.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "图鉴" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="MarginContainer" type="MarginContainer" parent="NinePatchRect"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_constants/margin_left = 2 -theme_override_constants/margin_top = 2 -theme_override_constants/margin_right = 2 -theme_override_constants/margin_bottom = 2 +theme_override_constants/margin_left = 40 +theme_override_constants/margin_top = 80 +theme_override_constants/margin_right = 40 +theme_override_constants/margin_bottom = 40 -[node name="VBoxContainer2" type="VBoxContainer" parent="Panel2/MarginContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="NinePatchRect/MarginContainer"] +layout_mode = 2 + +[node name="VBoxContainer2" type="VBoxContainer" parent="NinePatchRect/MarginContainer/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 +size_flags_stretch_ratio = 3.0 +theme_override_constants/separation = 0 -[node name="MarginContainer" type="MarginContainer" parent="Panel2/MarginContainer/VBoxContainer2"] +[node name="Control" type="Control" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2"] +custom_minimum_size = Vector2(2.08165e-12, 48) layout_mode = 2 -theme_override_constants/margin_left = 2 -theme_override_constants/margin_top = 2 -theme_override_constants/margin_right = 2 -theme_override_constants/margin_bottom = 2 -[node name="HBoxContainer" type="HBoxContainer" parent="Panel2/MarginContainer/VBoxContainer2/MarginContainer"] -custom_minimum_size = Vector2(0, 100) +[node name="TabButton" type="TextureButton" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/Control"] +layout_mode = 1 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_left = 16.0 +offset_top = -68.0 +offset_right = 96.0 +offset_bottom = 4.0 +grow_vertical = 0 +texture_normal = ExtResource("4_nm64b") + +[node name="Icon" type="TextureRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/Control/TabButton"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 8.0 +offset_top = 24.0 +offset_right = -8.0 +grow_horizontal = 2 +grow_vertical = 2 +stretch_mode = 3 + +[node name="NinePatchRect" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2"] layout_mode = 2 size_flags_vertical = 3 +texture = ExtResource("4_21546") +region_rect = Rect2(0, 0, 128, 128) +patch_margin_left = 56 +patch_margin_top = 56 +patch_margin_right = 56 +patch_margin_bottom = 56 -[node name="LineEdit" type="LineEdit" parent="Panel2/MarginContainer/VBoxContainer2/MarginContainer/HBoxContainer"] -custom_minimum_size = Vector2(500, 44) -layout_mode = 2 -size_flags_vertical = 4 -placeholder_text = "搜索名称" - -[node name="Search" type="Button" parent="Panel2/MarginContainer/VBoxContainer2/MarginContainer/HBoxContainer"] -custom_minimum_size = Vector2(44, 44) -layout_mode = 2 -size_flags_vertical = 4 -icon = ExtResource("2_3ln1u") - -[node name="ScrollContainer" type="ScrollContainer" parent="Panel2/MarginContainer/VBoxContainer2"] -layout_mode = 2 +[node name="ScrollContainer" type="ScrollContainer" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/NinePatchRect"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 24.0 +offset_top = 24.0 +offset_right = -24.0 +offset_bottom = -24.0 +grow_horizontal = 2 +grow_vertical = 2 size_flags_horizontal = 3 size_flags_vertical = 3 size_flags_stretch_ratio = 75.0 -[node name="ObjectButton" type="Button" parent="Panel2/MarginContainer/VBoxContainer2/ScrollContainer"] -custom_minimum_size = Vector2(124, 160) +[node name="ObjectButton" type="TextureButton" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/NinePatchRect/ScrollContainer"] +custom_minimum_size = Vector2(200, 120) layout_mode = 2 -[node name="PreviewImage" type="TextureRect" parent="Panel2/MarginContainer/VBoxContainer2/ScrollContainer/ObjectButton"] +[node name="Bg" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/NinePatchRect/ScrollContainer/ObjectButton"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("5_niceh") +region_rect = Rect2(0, 0, 56, 56) +patch_margin_left = 24 +patch_margin_top = 24 +patch_margin_right = 24 +patch_margin_bottom = 24 + +[node name="PreviewImage" type="TextureRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/NinePatchRect/ScrollContainer/ObjectButton"] material = SubResource("ShaderMaterial_gm0bl") layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = 2.0 -offset_top = 2.0 -offset_right = -2.0 -offset_bottom = -38.0 +offset_right = -150.0 +offset_bottom = -90.0 grow_horizontal = 2 grow_vertical = 2 +scale = Vector2(4, 4) mouse_filter = 2 -expand_mode = 2 -stretch_mode = 5 +stretch_mode = 3 -[node name="ObjectName" type="Label" parent="Panel2/MarginContainer/VBoxContainer2/ScrollContainer/ObjectButton"] -layout_mode = 1 -anchors_preset = 12 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_top = -43.0 -offset_right = 124.0 -offset_bottom = 43.0 -grow_horizontal = 2 -grow_vertical = 0 -scale = Vector2(0.5, 0.5) -text = "武器" -horizontal_alignment = 1 -vertical_alignment = 1 -autowrap_mode = 3 -clip_text = true -text_overrun_behavior = 3 - -[node name="Select" type="NinePatchRect" parent="Panel2/MarginContainer/VBoxContainer2/ScrollContainer/ObjectButton"] +[node name="Select" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/NinePatchRect/ScrollContainer/ObjectButton"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -texture = ExtResource("4_gtlqd") -region_rect = Rect2(0, 0, 36, 36) -patch_margin_left = 8 -patch_margin_top = 8 -patch_margin_right = 8 -patch_margin_bottom = 8 +texture = ExtResource("5_f0anf") +region_rect = Rect2(0, 0, 16, 16) +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 + +[node name="VBoxContainer3" type="VBoxContainer" parent="NinePatchRect/MarginContainer/HBoxContainer"] +custom_minimum_size = Vector2(452, 2.08165e-12) +layout_mode = 2 + +[node name="NinePatchRect" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3"] +layout_mode = 2 +size_flags_vertical = 3 +texture = ExtResource("4_21546") +patch_margin_left = 56 +patch_margin_top = 56 +patch_margin_right = 56 +patch_margin_bottom = 56 + +[node name="ItemInfoBg" type="VBoxContainer" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 28.0 +offset_top = 28.0 +offset_right = -28.0 +offset_bottom = -28.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 16 + +[node name="ItemName" type="Label" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/ItemInfoBg"] +layout_mode = 2 +text = "名称" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="NinePatchRect" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/ItemInfoBg"] +custom_minimum_size = Vector2(396, 300) +layout_mode = 2 +texture = ExtResource("4_21546") +patch_margin_left = 56 +patch_margin_top = 56 +patch_margin_right = 56 +patch_margin_bottom = 56 + +[node name="ItemTexture" type="TextureRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/ItemInfoBg/NinePatchRect"] +material = SubResource("ShaderMaterial_qdxtu") +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 20.0 +offset_top = 20.0 +offset_right = -287.0 +offset_bottom = -215.0 +grow_horizontal = 2 +grow_vertical = 2 +scale = Vector2(4, 4) +size_flags_vertical = 3 +stretch_mode = 3 + +[node name="ItemDes" type="RichTextLabel" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/ItemInfoBg"] +layout_mode = 2 +size_flags_vertical = 3 +text = "文本描述" + +[node name="CloseButton" type="TextureButton" parent="NinePatchRect"] +layout_mode = 1 +anchors_preset = 1 +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -88.0 +offset_top = -20.0 +offset_right = -24.0 +offset_bottom = 44.0 +grow_horizontal = 0 +texture_normal = ExtResource("10_jgsfw") +texture_pressed = ExtResource("11_247gy") +texture_hover = ExtResource("11_247gy") diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorMapLayer.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorMapLayer.tscn index 64daa22..3945ef4 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorMapLayer.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorMapLayer.tscn @@ -54,10 +54,11 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("3_k8b5h") -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +region_rect = Rect2(0, 0, 36, 36) +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="VisibleButton" type="TextureButton" parent="VBoxContainer/ScrollContainer/LayerButton"] layout_mode = 1 diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn index cfac2e0..6f07965 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn @@ -136,10 +136,10 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("6_jpt3y") -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="WaveVisibleButton" type="Button" parent="VBoxContainer/ScrollContainer/VBoxContainer/WaveItem/WaveContainer"] custom_minimum_size = Vector2(36, 36) @@ -192,7 +192,7 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("6_jpt3y") -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorMapTile.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorMapTile.tscn index 49c7fd0..1f4e300 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorMapTile.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorMapTile.tscn @@ -157,10 +157,10 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("5_f4thw") -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="TerrainName" type="Label" parent="VBoxContainer/Panel/MarginContainer/Tab2/ScrollContainer/TerrainItem"] layout_mode = 1 @@ -260,10 +260,10 @@ grow_vertical = 2 texture = ExtResource("5_f4thw") region_rect = Rect2(0, 0, 36, 36) -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="MaskBg" type="ColorRect" parent="."] layout_mode = 1 diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorProject.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorProject.tscn index 183f7b3..e250984 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorProject.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorProject.tscn @@ -98,10 +98,10 @@ grow_vertical = 2 texture = ExtResource("5_rcbyx") region_rect = Rect2(0, 0, 36, 36) -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="Panel2" type="Panel" parent="HBoxContainer"] layout_mode = 2 @@ -212,10 +212,10 @@ grow_vertical = 2 texture = ExtResource("5_rcbyx") region_rect = Rect2(0, 0, 36, 36) -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="ErrorTexture" type="TextureRect" parent="HBoxContainer/Panel2/MarginContainer/VBoxContainer/ScrollContainer/RoomButton"] layout_mode = 0 diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorSelectObject.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorSelectObject.tscn index 041820f..0460256 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorSelectObject.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorSelectObject.tscn @@ -73,10 +73,11 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("3_4nhjm") -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +region_rect = Rect2(0, 0, 36, 36) +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="Panel2" type="Panel" parent="HBoxContainer"] layout_mode = 2 diff --git a/DungeonShooting_Godot/prefab/ui/TileSetEditor.tscn b/DungeonShooting_Godot/prefab/ui/TileSetEditor.tscn index d602c57..acaf335 100644 --- a/DungeonShooting_Godot/prefab/ui/TileSetEditor.tscn +++ b/DungeonShooting_Godot/prefab/ui/TileSetEditor.tscn @@ -152,10 +152,10 @@ grow_vertical = 2 texture = ExtResource("4_t8bqb") region_rect = Rect2(0, 0, 36, 36) -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="RightRoot" type="Panel" parent="Bg/VBoxContainer/HBoxContainer"] clip_children = 2 diff --git a/DungeonShooting_Godot/prefab/ui/TileSetEditorCombination.tscn b/DungeonShooting_Godot/prefab/ui/TileSetEditorCombination.tscn index 4a4806a..44a597c 100644 --- a/DungeonShooting_Godot/prefab/ui/TileSetEditorCombination.tscn +++ b/DungeonShooting_Godot/prefab/ui/TileSetEditorCombination.tscn @@ -299,7 +299,7 @@ grow_vertical = 2 texture = ExtResource("6_g5ey6") region_rect = Rect2(0, 0, 36, 36) -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 diff --git a/DungeonShooting_Godot/prefab/ui/TileSetEditorProject.tscn b/DungeonShooting_Godot/prefab/ui/TileSetEditorProject.tscn index 2ab1e70..c94d564 100644 --- a/DungeonShooting_Godot/prefab/ui/TileSetEditorProject.tscn +++ b/DungeonShooting_Godot/prefab/ui/TileSetEditorProject.tscn @@ -119,10 +119,10 @@ grow_vertical = 2 texture = ExtResource("5_l4lwx") region_rect = Rect2(0, 0, 36, 36) -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="Panel" type="Panel" parent="Panel/MarginContainer/HBoxContainer2"] layout_mode = 2 diff --git a/DungeonShooting_Godot/prefab/ui/TileSetEditorTerrain.tscn b/DungeonShooting_Godot/prefab/ui/TileSetEditorTerrain.tscn index 9bb5cd2..924a7c8 100644 --- a/DungeonShooting_Godot/prefab/ui/TileSetEditorTerrain.tscn +++ b/DungeonShooting_Godot/prefab/ui/TileSetEditorTerrain.tscn @@ -124,10 +124,10 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("4_ka47m") -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="TopBg" type="ColorRect" parent="VSplitContainer/PanelTop/HSplitContainer"] clip_children = 2 diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn index 9450803..5fe50df 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn @@ -46,7 +46,7 @@ [node name="AnimatedSprite" parent="." index="1"] material = SubResource("ShaderMaterial_rtliw") -position = Vector2(10, 1) +position = Vector2(10, 0) sprite_frames = ExtResource("4_uymcs") [node name="ShellPoint" parent="AnimatedSprite" index="0"] diff --git a/DungeonShooting_Godot/resource/config/ActivePropBase.json b/DungeonShooting_Godot/resource/config/ActivePropBase.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/DungeonShooting_Godot/resource/config/ActivePropBase.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/ActivityBase.json b/DungeonShooting_Godot/resource/config/ActivityBase.json index 864f66b..d3b4456 100644 --- a/DungeonShooting_Godot/resource/config/ActivityBase.json +++ b/DungeonShooting_Godot/resource/config/ActivityBase.json @@ -1,8 +1,8 @@ [ { "Id": "role0001", - "Type": 3, "Name": "\u73A9\u5BB6", + "Type": 3, "Quality": 0, "Price": 0, "Intro": "\u73A9\u5BB6", @@ -15,8 +15,8 @@ }, { "Id": "enemy0001", - "Type": 4, "Name": "\u654C\u4EBA", + "Type": 4, "Quality": 0, "Price": 0, "Intro": "\u654C\u4EBA", @@ -29,8 +29,8 @@ }, { "Id": "enemy0002", - "Type": 4, "Name": "\u654C\u4EBA2", + "Type": 4, "Quality": 0, "Price": 0, "Intro": "\u654C\u4EBA2", @@ -43,8 +43,8 @@ }, { "Id": "weapon0001", - "Type": 5, "Name": "\u6B65\u67AA", + "Type": 5, "Quality": 3, "Price": 0, "Intro": "", @@ -57,8 +57,8 @@ }, { "Id": "weapon0002", - "Type": 5, "Name": "\u9730\u5F39\u67AA", + "Type": 5, "Quality": 3, "Price": 0, "Intro": "", @@ -71,8 +71,8 @@ }, { "Id": "weapon0003", - "Type": 5, "Name": "\u624B\u67AA", + "Type": 5, "Quality": 2, "Price": 0, "Intro": "", @@ -85,8 +85,8 @@ }, { "Id": "weapon0004", - "Type": 5, "Name": "\u5200", + "Type": 5, "Quality": 4, "Price": 0, "Intro": "", @@ -99,8 +99,8 @@ }, { "Id": "weapon0005", - "Type": 5, "Name": "\u72D9\u51FB\u67AA", + "Type": 5, "Quality": 4, "Price": 0, "Intro": "", @@ -113,8 +113,8 @@ }, { "Id": "weapon0006", - "Type": 5, "Name": "\u51B2\u950B\u67AA", + "Type": 5, "Quality": 2, "Price": 0, "Intro": "", @@ -127,8 +127,8 @@ }, { "Id": "weapon0007", - "Type": 5, "Name": "\u6C64\u59C6\u900A\u51B2\u950B\u67AA", + "Type": 5, "Quality": 4, "Price": 0, "Intro": "", @@ -141,8 +141,8 @@ }, { "Id": "weapon0008", - "Type": 5, "Name": "\u6FC0\u5149\u624B\u67AA", + "Type": 5, "Quality": 3, "Price": 0, "Intro": "", @@ -155,8 +155,8 @@ }, { "Id": "weapon0009", - "Type": 5, "Name": "\u69B4\u5F39\u53D1\u5C04\u5668", + "Type": 5, "Quality": 4, "Price": 0, "Intro": "", @@ -169,8 +169,8 @@ }, { "Id": "weapon0010", - "Type": 5, "Name": "M1\u578B\u70ED\u80FD\u72D9\u51FB\u67AA", + "Type": 5, "Quality": 5, "Price": 0, "Intro": "", @@ -183,8 +183,8 @@ }, { "Id": "weapon0011", - "Type": 5, "Name": "weapon0011", + "Type": 5, "Quality": 5, "Price": 0, "Intro": "", @@ -197,8 +197,8 @@ }, { "Id": "weapon0013", - "Type": 5, "Name": "P90", + "Type": 5, "Quality": 4, "Price": 0, "Intro": "", @@ -211,8 +211,8 @@ }, { "Id": "weapon0014", - "Type": 5, "Name": "\u5DE6\u8F6E", + "Type": 5, "Quality": 2, "Price": 0, "Intro": "", @@ -225,8 +225,8 @@ }, { "Id": "weapon0016", - "Type": 5, "Name": "\u6728\u8D28\u77ED\u5F13", + "Type": 5, "Quality": 2, "Price": 0, "Intro": "", @@ -239,8 +239,8 @@ }, { "Id": "bullet0001", - "Type": 6, "Name": "", + "Type": 6, "Quality": 0, "Price": 0, "Intro": "", @@ -253,8 +253,8 @@ }, { "Id": "bullet0002", - "Type": 6, "Name": "", + "Type": 6, "Quality": 0, "Price": 0, "Intro": "", @@ -267,8 +267,8 @@ }, { "Id": "bullet0003", - "Type": 6, "Name": "", + "Type": 6, "Quality": 0, "Price": 0, "Intro": "", @@ -281,8 +281,8 @@ }, { "Id": "bullet0004", - "Type": 6, "Name": "\u69B4\u5F39\u70AE", + "Type": 6, "Quality": 0, "Price": 0, "Intro": "", @@ -295,8 +295,8 @@ }, { "Id": "bullet0005", - "Type": 6, "Name": "\u629B\u7269\u7EBF\u7C98\u6DB2\u5B50\u5F39", + "Type": 6, "Quality": 0, "Price": 0, "Intro": "", @@ -309,8 +309,8 @@ }, { "Id": "bullet0006", - "Type": 6, "Name": "\u62D6\u5C3E\u5B50\u5F39", + "Type": 6, "Quality": 0, "Price": 0, "Intro": "", @@ -323,8 +323,8 @@ }, { "Id": "bullet0007", - "Type": 6, "Name": "", + "Type": 6, "Quality": 0, "Price": 0, "Intro": "", @@ -337,8 +337,8 @@ }, { "Id": "bullet0008", - "Type": 6, "Name": "", + "Type": 6, "Quality": 0, "Price": 0, "Intro": "", @@ -351,8 +351,8 @@ }, { "Id": "bullet0009", - "Type": 6, "Name": "\u5F13\u7BAD", + "Type": 6, "Quality": 0, "Price": 0, "Intro": "", @@ -365,8 +365,8 @@ }, { "Id": "shell0001", - "Type": 7, "Name": "", + "Type": 7, "Quality": 0, "Price": 0, "Intro": "", @@ -379,8 +379,8 @@ }, { "Id": "shell0002", - "Type": 7, "Name": "", + "Type": 7, "Quality": 0, "Price": 0, "Intro": "", @@ -393,8 +393,8 @@ }, { "Id": "shell0003", - "Type": 7, "Name": "", + "Type": 7, "Quality": 0, "Price": 0, "Intro": "", @@ -407,8 +407,8 @@ }, { "Id": "shell0004", - "Type": 7, "Name": "", + "Type": 7, "Quality": 0, "Price": 0, "Intro": "", @@ -421,8 +421,8 @@ }, { "Id": "enemy_dead0001", - "Type": 8, "Name": "", + "Type": 8, "Quality": 0, "Price": 0, "Intro": "\u654C\u4EBA1\u6B7B\u4EA1\u788E\u7247", @@ -435,8 +435,8 @@ }, { "Id": "enemy_dead0002", - "Type": 8, "Name": "", + "Type": 8, "Quality": 0, "Price": 0, "Intro": "\u654C\u4EBA2\u6B7B\u4EA1", @@ -449,204 +449,204 @@ }, { "Id": "prop0001", - "Type": 9, "Name": "\u978B\u5B50", + "Type": 9, "Quality": 4, "Price": 0, "Intro": "\u63D0\u9AD8\u79FB\u52A8\u901F\u5EA6", - "Details": "", + "Details": "\u63D0\u9AD8\u89D2\u8272\u7684\u57FA\u7840\u79FB\u52A8\u901F\u5EA6", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0001.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0001.png", "ShowInMapEditor": true }, { "Id": "prop0002", - "Type": 9, "Name": "\u5FC3\u4E4B\u5BB9\u5668", + "Type": 9, "Quality": 3, "Price": 0, "Intro": "\u63D0\u9AD8\u8840\u91CF\u4E0A\u9650", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0002.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0002.png", "ShowInMapEditor": true }, { "Id": "prop0003", - "Type": 9, "Name": "\u62A4\u76FE", + "Type": 9, "Quality": 3, "Price": 0, "Intro": "\u53EF\u4EE5\u62B5\u6321\u5B50\u5F39\uFF0C\u968F\u65F6\u95F4\u63A8\u79FB\u81EA\u52A8\u6062\u590D", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0003.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0003.png", "ShowInMapEditor": true }, { "Id": "prop0004", - "Type": 9, "Name": "\u62A4\u76FE\u8BA1\u65F6\u5668", + "Type": 9, "Quality": 4, "Price": 0, "Intro": "\u63D0\u9AD8\u62A4\u76FE\u6062\u590D\u901F\u5EA6", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0004.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0004.png", "ShowInMapEditor": true }, { "Id": "prop0005", - "Type": 9, "Name": "\u6740\u4F24\u5F39", + "Type": 9, "Quality": 4, "Price": 0, "Intro": "\u63D0\u9AD8\u5B50\u5F39\u4F24\u5BB3", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0005.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0005.png", "ShowInMapEditor": true }, { "Id": "prop0006", - "Type": 9, "Name": "\u7EA2\u5B9D\u77F3\u6212\u6307", + "Type": 9, "Quality": 4, "Price": 0, "Intro": "\u53D7\u4F24\u540E\u5EF6\u957F\u65E0\u654C\u65F6\u95F4", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0006.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0006.png", "ShowInMapEditor": true }, { "Id": "prop0007", - "Type": 9, "Name": "\u5907\u7528\u62A4\u76FE", + "Type": 9, "Quality": 3, "Price": 0, "Intro": "\u53D7\u4F24\u65F6\u6709\u4E00\u5B9A\u6982\u7387\u62B5\u6D88\u4F24\u5BB3", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0007.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0007.png", "ShowInMapEditor": true }, { "Id": "prop0008", - "Type": 9, "Name": "\u773C\u955C", + "Type": 9, "Quality": 3, "Price": 0, "Intro": "\u63D0\u9AD8\u6B66\u5668\u7CBE\u51C6\u5EA6", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0008.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0008.png", "ShowInMapEditor": true }, { "Id": "prop0009", - "Type": 9, "Name": "\u9AD8\u901F\u5B50\u5F39", + "Type": 9, "Quality": 3, "Price": 0, "Intro": "\u63D0\u9AD8\u5B50\u5F39\u901F\u5EA6\u548C\u5C04\u7A0B", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0009.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0009.png", "ShowInMapEditor": true }, { "Id": "prop0010", - "Type": 9, "Name": "\u5206\u88C2\u5B50\u5F39", + "Type": 9, "Quality": 4, "Price": 0, "Intro": "\u5B50\u5F39\u6570\u91CF\u7FFB\u500D, \u4F46\u662F\u7CBE\u51C6\u5EA6, \u51FB\u9000\u548C\u4F24\u5BB3\u964D\u4F4E", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0010.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0010.png", "ShowInMapEditor": true }, { "Id": "prop0011", - "Type": 9, "Name": "\u5F39\u5C04\u5B50\u5F39", + "Type": 9, "Quality": 4, "Price": 0, "Intro": "\u5B50\u5F39\u53CD\u5F39\u6B21\u6570\u002B2", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0011.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0011.png", "ShowInMapEditor": true }, { "Id": "prop0012", - "Type": 9, "Name": "\u7A7F\u900F\u5B50\u5F39", + "Type": 9, "Quality": 4, "Price": 0, "Intro": "\u5B50\u5F39\u7A7F\u900F\u002B1", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0012.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0012.png", "ShowInMapEditor": true }, { "Id": "prop0013", - "Type": 9, "Name": "\u6B66\u5668\u80CC\u5305", + "Type": 9, "Quality": 2, "Price": 0, "Intro": "\u6B66\u5668\u5BB9\u91CF\u002B1", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0013.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0013.png", "ShowInMapEditor": true }, { "Id": "prop0014", - "Type": 9, "Name": "\u9053\u5177\u80CC\u5305", + "Type": 9, "Quality": 2, "Price": 0, "Intro": "\u9053\u5177\u5BB9\u91CF\u002B1", "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0014.tscn", + "Prefab": "res://prefab/prop/BuffProp.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0014.png", "ShowInMapEditor": true }, { "Id": "prop5000", - "Type": 9, "Name": "\u533B\u836F\u7BB1", + "Type": 9, "Quality": 1, "Price": 0, "Intro": "\u4F7F\u7528\u540E\u56DE\u590D\u4E00\u9897\u7EA2\u5FC3", @@ -659,8 +659,8 @@ }, { "Id": "prop5001", - "Type": 9, "Name": "\u5F39\u836F\u7BB1", + "Type": 9, "Quality": 1, "Price": 0, "Intro": "\u4F7F\u7528\u540E\u8865\u5145\u5F53\u524D\u6B66\u5668\u5907\u7528\u5F39\u836F", @@ -673,8 +673,8 @@ }, { "Id": "treasure_box0001", - "Type": 10, "Name": "\u6728\u8D28\u5B9D\u7BB1", + "Type": 10, "Quality": 0, "Price": 0, "Intro": "\u6728\u8D28\u5B9D\u7BB1", @@ -687,8 +687,8 @@ }, { "Id": "other_door_e", - "Type": 99, "Name": "", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u4E1C\u4FA7)", @@ -701,8 +701,8 @@ }, { "Id": "other_door_w", - "Type": 99, "Name": "", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u897F\u4FA7)", @@ -715,8 +715,8 @@ }, { "Id": "other_door_s", - "Type": 99, "Name": "", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5357\u4FA7)", @@ -729,8 +729,8 @@ }, { "Id": "other_door_n", - "Type": 99, "Name": "", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5317\u4FA7)", @@ -743,8 +743,8 @@ }, { "Id": "gold_10", - "Type": 99, "Name": "\u91D1\u5E01", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "\u83B7\u5F9710\u91D1\u5E01", @@ -757,8 +757,8 @@ }, { "Id": "gold_5", - "Type": 99, "Name": "\u94F6\u5E01", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "\u83B7\u5F975\u91D1\u5E01", @@ -771,8 +771,8 @@ }, { "Id": "gold_1", - "Type": 99, "Name": "\u94DC\u5E01", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "\u83B7\u5F971\u91D1\u5E01", @@ -785,8 +785,8 @@ }, { "Id": "item_0001", - "Type": 99, "Name": "\u7535\u8111\u684C", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -799,8 +799,8 @@ }, { "Id": "item_0002", - "Type": 99, "Name": "", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -813,8 +813,8 @@ }, { "Id": "item_0003", - "Type": 99, "Name": "", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -827,8 +827,8 @@ }, { "Id": "item_0004", - "Type": 99, "Name": "", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -841,8 +841,8 @@ }, { "Id": "item_0005", - "Type": 99, "Name": "", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -855,8 +855,8 @@ }, { "Id": "item_0006", - "Type": 99, "Name": "\u7535\u89C6\u684C", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -869,8 +869,8 @@ }, { "Id": "item_0007", - "Type": 99, "Name": "\u9152\u67DC", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -883,8 +883,8 @@ }, { "Id": "item_0008", - "Type": 99, "Name": "\u6C99\u53D1\u65C1\u67DC\u5B50", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -897,8 +897,8 @@ }, { "Id": "item_0009", - "Type": 99, "Name": "\u5427\u53F0", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -911,8 +911,8 @@ }, { "Id": "item_0010", - "Type": 99, "Name": "\u544A\u793A\u724C", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -925,8 +925,8 @@ }, { "Id": "item_0011", - "Type": 99, "Name": "\u7EFF\u6728\u51F3", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -939,8 +939,8 @@ }, { "Id": "item_0012", - "Type": 99, "Name": "\u6C99\u53D1\u7AD6", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -953,8 +953,8 @@ }, { "Id": "item_0013", - "Type": 99, "Name": "\u6C99\u53D1\u6A2A\u7740", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -967,8 +967,8 @@ }, { "Id": "item_0014", - "Type": 99, "Name": "\u61D2\u4EBA\u6C99\u53D1", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -981,8 +981,8 @@ }, { "Id": "item_0015", - "Type": 99, "Name": "\u5DE6\u4E0B\u89D2\u684C\u5B50", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -995,8 +995,8 @@ }, { "Id": "item_0016", - "Type": 99, "Name": "\u5DE6\u4E0B\u89D2\u77ED\u6C99\u53D1", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1009,8 +1009,8 @@ }, { "Id": "item_0017", - "Type": 99, "Name": "\u4E2D\u95F4\u684C\u5B50", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1023,8 +1023,8 @@ }, { "Id": "item_0018", - "Type": 99, "Name": "\u5DE6\u4E0B\u89D2\u957F\u6C99\u53D1", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1037,8 +1037,8 @@ }, { "Id": "item_0019", - "Type": 99, "Name": "\u53F3\u4E0B\u89D2\u684C\u5B50", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1051,8 +1051,8 @@ }, { "Id": "item_0020", - "Type": 99, "Name": "\u8F6C\u6905", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1065,8 +1065,8 @@ }, { "Id": "item_0021", - "Type": 99, "Name": "\u53F3\u4E0B\u89D2\u957F\u6C99\u53D1", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1079,8 +1079,8 @@ }, { "Id": "item_0022", - "Type": 99, "Name": "\u8863\u67B6", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1093,8 +1093,8 @@ }, { "Id": "item_0023", - "Type": 99, "Name": "\u7EFF\u690D", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1107,8 +1107,8 @@ }, { "Id": "item_0024", - "Type": 99, "Name": "\u65B0\u624B\u6559\u5B66\u5173\u5361", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1121,8 +1121,8 @@ }, { "Id": "item_0025", - "Type": 99, "Name": "\u8302\u76DB\u82B1\u76C6", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1135,8 +1135,8 @@ }, { "Id": "item_0026", - "Type": 99, "Name": "\u544A\u793A\u7248", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1149,8 +1149,8 @@ }, { "Id": "item_0031", - "Type": 99, "Name": "\u53F0\u706F", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1163,8 +1163,8 @@ }, { "Id": "item_0033", - "Type": 99, "Name": "\u5427\u53F0", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1177,8 +1177,8 @@ }, { "Id": "item_0036", - "Type": 99, "Name": "\u53F0\u7403\u684C", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1191,8 +1191,8 @@ }, { "Id": "item_0054", - "Type": 99, "Name": "\u8D29\u5356\u673A", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1205,8 +1205,8 @@ }, { "Id": "item_0056", - "Type": 99, "Name": "\u957F\u51F3\u5B50", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", @@ -1219,8 +1219,8 @@ }, { "Id": "item_0057", - "Type": 99, "Name": "\u5361\u5E26\u76D2\u5B50", + "Type": 99, "Quality": 0, "Price": 0, "Intro": "", diff --git a/DungeonShooting_Godot/resource/config/BuffPropBase.json b/DungeonShooting_Godot/resource/config/BuffPropBase.json new file mode 100644 index 0000000..c3373a0 --- /dev/null +++ b/DungeonShooting_Godot/resource/config/BuffPropBase.json @@ -0,0 +1,165 @@ +[ + { + "Id": "0001", + "Remark": "\u978B\u5B50", + "__Activity": "prop0001", + "Buff": { + "MoveSpeed": [ + 30 + ] + } + }, + { + "Id": "0002", + "Remark": "\u5FC3\u4E4B\u5BB9\u5668", + "__Activity": "prop0002", + "Buff": { + "MaxHp": [ + 2 + ] + } + }, + { + "Id": "0003", + "Remark": "\u62A4\u76FE", + "__Activity": "prop0003", + "Buff": { + "MaxShield": [ + 1 + ] + } + }, + { + "Id": "0004", + "Remark": "\u62A4\u76FE\u8BA1\u65F6\u5668", + "__Activity": "prop0004", + "Buff": { + "ShieldRecoveryTime": [ + 2.5 + ] + } + }, + { + "Id": "0005", + "Remark": "\u6740\u4F24\u5F39", + "__Activity": "prop0005", + "Buff": { + "Damage": [ + 2, + 0.2 + ] + } + }, + { + "Id": "0006", + "Remark": "\u7EA2\u5B9D\u77F3\u6212\u6307", + "__Activity": "prop0006", + "Buff": { + "WoundedInvincibleTime": [ + 2 + ] + } + }, + { + "Id": "0007", + "Remark": "\u5907\u7528\u62A4\u76FE", + "__Activity": "prop0007", + "Buff": { + "OffsetInjury": [ + 0.15 + ] + } + }, + { + "Id": "0008", + "Remark": "\u773C\u955C", + "__Activity": "prop0008", + "Buff": { + "Scattering": [ + 0.5 + ] + } + }, + { + "Id": "0009", + "Remark": "\u9AD8\u901F\u5B50\u5F39", + "__Activity": "prop0009", + "Buff": { + "BulletSpeed": [ + 2, + 0.25 + ], + "BulletDistance": [ + 2, + 0.25 + ] + } + }, + { + "Id": "0010", + "Remark": "\u5206\u88C2\u5B50\u5F39", + "__Activity": "prop0010", + "Buff": { + "BulletCount": [ + 2, + 1 + ], + "BulletDeviationAngle": [ + -8, + 8 + ], + "Damage": [ + 2, + -0.35 + ], + "BulletRepel": [ + 2, + -0.35 + ], + "RandomBulletSpeed": [ + -0.05, + 0.05 + ] + } + }, + { + "Id": "0011", + "Remark": "\u5F39\u5C04\u5B50\u5F39", + "__Activity": "prop0011", + "Buff": { + "BulletBounceCount": [ + 2 + ] + } + }, + { + "Id": "0012", + "Remark": "\u7A7F\u900F\u5B50\u5F39", + "__Activity": "prop0012", + "Buff": { + "BulletPenetration": [ + 1 + ] + } + }, + { + "Id": "0013", + "Remark": "\u6B66\u5668\u80CC\u5305", + "__Activity": "prop0013", + "Buff": { + "WeaponCapacity": [ + 1 + ] + } + }, + { + "Id": "0014", + "Remark": "\u9053\u5177\u80CC\u5305", + "__Activity": "prop0014", + "Buff": { + "ActivePropsCapacity": [ + 1 + ] + } + } +] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/font/VonwaonBitmap-12px.ttf.import b/DungeonShooting_Godot/resource/font/VonwaonBitmap-12px.ttf.import index 5bf5d21..c3c5a68 100644 --- a/DungeonShooting_Godot/resource/font/VonwaonBitmap-12px.ttf.import +++ b/DungeonShooting_Godot/resource/font/VonwaonBitmap-12px.ttf.import @@ -13,7 +13,7 @@ [params] Rendering=null -antialiasing=1 +antialiasing=0 generate_mipmaps=false multichannel_signed_distance_field=false msdf_pixel_range=8 @@ -27,7 +27,12 @@ fallbacks=[] Compress=null compress=true -preload=[] +preload=[{ +"chars": [], +"glyphs": [], +"name": "新建配置", +"size": Vector2i(16, 0) +}] language_support={} script_support={} opentype_features={} diff --git a/DungeonShooting_Godot/resource/font/VonwaonBitmap-16px.ttf.import b/DungeonShooting_Godot/resource/font/VonwaonBitmap-16px.ttf.import index 4c35ce8..edce16b 100644 --- a/DungeonShooting_Godot/resource/font/VonwaonBitmap-16px.ttf.import +++ b/DungeonShooting_Godot/resource/font/VonwaonBitmap-16px.ttf.import @@ -13,7 +13,7 @@ [params] Rendering=null -antialiasing=1 +antialiasing=0 generate_mipmaps=false multichannel_signed_distance_field=false msdf_pixel_range=8 @@ -27,7 +27,12 @@ fallbacks=[] Compress=null compress=true -preload=[] +preload=[{ +"chars": [], +"glyphs": [], +"name": "新建配置", +"size": Vector2i(16, 0) +}] language_support={} script_support={} opentype_features={} diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json index 30bf56e..fc094ec 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json @@ -1 +1 @@ -[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":false,"WaveList":[[{"Position":{"X":39,"Y":8},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-16,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":6},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0009","Weight":100,"Attr":{"CurrAmmon":"1","ResidueAmmo":"25"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0010","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":47,"Y":-32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0008","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":23,"Y":37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0005","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":24,"Y":-30},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":40,"Y":-10},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":-37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-2,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":29,"Y":63},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0013","Weight":100,"Attr":{"CurrAmmon":"50","ResidueAmmo":"250"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-30,"Y":39},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-19,"Y":71},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":48,"Y":29},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0004","Weight":100,"Attr":{"CurrAmmon":"180","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":20,"Y":94},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0014","Weight":100,"Attr":{"CurrAmmon":"5","ResidueAmmo":"60"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-14,"Y":97},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0011","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":9,"Y":-7},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0011","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-41,"Y":61},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0016","Weight":100,"Attr":{"CurrAmmon":"5","ResidueAmmo":"60"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":73,"Y":-19},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":5.551115E-14}]}]]}] \ No newline at end of file +[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":false,"WaveList":[[{"Position":{"X":39,"Y":8},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-16,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":6},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0009","Weight":100,"Attr":{"CurrAmmon":"1","ResidueAmmo":"25"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0010","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":47,"Y":-32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0008","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":23,"Y":37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0005","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":24,"Y":-30},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":40,"Y":-10},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":-37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-2,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":29,"Y":63},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0013","Weight":100,"Attr":{"CurrAmmon":"50","ResidueAmmo":"250"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-30,"Y":39},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-19,"Y":71},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":48,"Y":29},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0004","Weight":100,"Attr":{"CurrAmmon":"180","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":20,"Y":94},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0014","Weight":100,"Attr":{"CurrAmmon":"5","ResidueAmmo":"60"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-14,"Y":97},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0011","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":9,"Y":-7},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0011","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-41,"Y":61},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0016","Weight":100,"Attr":{"CurrAmmon":"5","ResidueAmmo":"60"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":73,"Y":-19},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":5.551115E-14}]},{"Position":{"X":-72,"Y":71},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":5.551115E-14}]},{"Position":{"X":-67,"Y":50},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":5.551115E-14}]},{"Position":{"X":-91,"Y":46},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":5.551115E-14}]},{"Position":{"X":-92,"Y":74},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":5.551115E-14}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/sprite/ui/GUI.png b/DungeonShooting_Godot/resource/sprite/ui/GUI.png index 56475ca..92c14e0 100644 --- a/DungeonShooting_Godot/resource/sprite/ui/GUI.png +++ b/DungeonShooting_Godot/resource/sprite/ui/GUI.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Select2.png b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Select2.png index b38861f..6a70568 100644 --- a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Select2.png +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Select2.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png new file mode 100644 index 0000000..fc80262 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png.import new file mode 100644 index 0000000..cd331fb --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cuas0bdjlpmwb" +path="res://.godot/imported/Close.png-3fada0779c1a516124741b6f9a05cf93.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/Close.png" +dest_files=["res://.godot/imported/Close.png-3fada0779c1a516124741b6f9a05cf93.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png new file mode 100644 index 0000000..1315207 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png.import new file mode 100644 index 0000000..6daed77 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://7x5b5ed7hk7w" +path="res://.godot/imported/CloseSelect.png-63b474fe46efaecaa35172d820b3b06d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/CloseSelect.png" +dest_files=["res://.godot/imported/CloseSelect.png-63b474fe46efaecaa35172d820b3b06d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png new file mode 100644 index 0000000..cc63c50 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png.import new file mode 100644 index 0000000..7f02a18 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cu5y32wfai4pn" +path="res://.godot/imported/Item.png-58bd34d7709452cf6ae6a4fd164bc305.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/Item.png" +dest_files=["res://.godot/imported/Item.png-58bd34d7709452cf6ae6a4fd164bc305.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png new file mode 100644 index 0000000..2ac81c0 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png.import new file mode 100644 index 0000000..0134426 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://conjg6fw6670x" +path="res://.godot/imported/Panel.png-08c85561f9ba92cb98c43d7cf676dc7b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/Panel.png" +dest_files=["res://.godot/imported/Panel.png-08c85561f9ba92cb98c43d7cf676dc7b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel2.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel2.png new file mode 100644 index 0000000..ba3d483 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel2.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel2.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel2.png.import new file mode 100644 index 0000000..f296aec --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dahib4qcevboo" +path="res://.godot/imported/Panel2.png-1945b16de121d7dd89f800804a09b2e8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/Panel2.png" +dest_files=["res://.godot/imported/Panel2.png-1945b16de121d7dd89f800804a09b2e8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png new file mode 100644 index 0000000..f915722 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png.import new file mode 100644 index 0000000..e5ffdeb --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://brevrlfdtllmk" +path="res://.godot/imported/Select.png-ff59a06a7a05be5c95bf722fa4889a19.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/Select.png" +dest_files=["res://.godot/imported/Select.png-ff59a06a7a05be5c95bf722fa4889a19.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Tab.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Tab.png new file mode 100644 index 0000000..b59decf --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Tab.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Tab.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Tab.png.import new file mode 100644 index 0000000..ea23bba --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Tab.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://jb73i5q1dv2a" +path="res://.godot/imported/Tab.png-6caaacadacb5a595ff3de32a94dcc375.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/Tab.png" +dest_files=["res://.godot/imported/Tab.png-6caaacadacb5a595ff3de32a94dcc375.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabIcon1.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabIcon1.png new file mode 100644 index 0000000..66be38c --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabIcon1.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabIcon1.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabIcon1.png.import new file mode 100644 index 0000000..e81cd0c --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabIcon1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b3cyuhkpk5jc0" +path="res://.godot/imported/TabIcon1.png-959d0384e8e61550e56702a962ae1355.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/TabIcon1.png" +dest_files=["res://.godot/imported/TabIcon1.png-959d0384e8e61550e56702a962ae1355.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabSelect.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabSelect.png new file mode 100644 index 0000000..0abc873 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabSelect.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabSelect.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabSelect.png.import new file mode 100644 index 0000000..2f15299 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TabSelect.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://vpm33qtm7w" +path="res://.godot/imported/TabSelect.png-d8a3ea74ef504abc15dab702abedc9bc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/TabSelect.png" +dest_files=["res://.godot/imported/TabSelect.png-d8a3ea74ef504abc15dab702abedc9bc.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png new file mode 100644 index 0000000..c2eefd5 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png.import new file mode 100644 index 0000000..0dc7a2f --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c0st2iiql8igg" +path="res://.godot/imported/TitleBg.png-d91e021730751da9f4cb4810f02a912b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/encyclopedia/TitleBg.png" +dest_files=["res://.godot/imported/TitleBg.png-d91e021730751da9f4cb4810f02a912b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/weapon/weapon0004/Weapon0004.png b/DungeonShooting_Godot/resource/sprite/weapon/weapon0004/Weapon0004.png index cf38cf3..fcce780 100644 --- a/DungeonShooting_Godot/resource/sprite/weapon/weapon0004/Weapon0004.png +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0004/Weapon0004.png Binary files differ diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0001.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0001.tres deleted file mode 100644 index 2aa87fd..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0001.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://wtvfyprel72y"] - -[ext_resource type="Texture2D" uid="uid://bls55gj8h3mgv" path="res://resource/sprite/prop/buff/BuffProp0001.png" id="1_scm06"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_scm06") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0002.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0002.tres deleted file mode 100644 index 330307d..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0002.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://7t57gsyff470"] - -[ext_resource type="Texture2D" uid="uid://cv2joc07ymofw" path="res://resource/sprite/prop/buff/BuffProp0002.png" id="1_8nnhb"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_8nnhb") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0003.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0003.tres deleted file mode 100644 index ae7484c..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0003.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://nqoieett75t3"] - -[ext_resource type="Texture2D" uid="uid://osr0v1c6l8ly" path="res://resource/sprite/prop/buff/BuffProp0003.png" id="1_p16yr"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_p16yr") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0004.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0004.tres deleted file mode 100644 index d1948b0..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0004.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bj0k3pipwp46x"] - -[ext_resource type="Texture2D" uid="uid://c0c25nihdcgt1" path="res://resource/sprite/prop/buff/BuffProp0004.png" id="1_a2o8b"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_a2o8b") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0005.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0005.tres deleted file mode 100644 index 89844f2..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0005.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bvqp46degt1rg"] - -[ext_resource type="Texture2D" uid="uid://dse0mbg06ngya" path="res://resource/sprite/prop/buff/BuffProp0005.png" id="1_en8jo"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_en8jo") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0006.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0006.tres deleted file mode 100644 index ec1f5a5..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0006.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bxn65oovekw6k"] - -[ext_resource type="Texture2D" uid="uid://do8blk3xm5uy1" path="res://resource/sprite/prop/buff/BuffProp0006.png" id="1_ugsdc"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_ugsdc") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0007.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0007.tres deleted file mode 100644 index cea9375..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0007.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://et840sb4d1g3"] - -[ext_resource type="Texture2D" uid="uid://fql5q452jqo0" path="res://resource/sprite/prop/buff/BuffProp0007.png" id="1_p5fwh"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_p5fwh") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0008.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0008.tres deleted file mode 100644 index 3022e83..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0008.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bs41p1hpkpucb"] - -[ext_resource type="Texture2D" uid="uid://cn8f56vjb02u2" path="res://resource/sprite/prop/buff/BuffProp0008.png" id="1_7efyb"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_7efyb") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0009.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0009.tres deleted file mode 100644 index 53977ec..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0009.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://sqcibio78nwc"] - -[ext_resource type="Texture2D" uid="uid://csak48bvrnws" path="res://resource/sprite/prop/buff/BuffProp0009.png" id="1_78egk"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_78egk") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0010.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0010.tres deleted file mode 100644 index b15cc45..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0010.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://dxqtm7xgn2wms"] - -[ext_resource type="Texture2D" uid="uid://dlsfun6svqfmm" path="res://resource/sprite/prop/buff/BuffProp0010.png" id="1_w8rnu"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_w8rnu") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0011.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0011.tres deleted file mode 100644 index 6a95208..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0011.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bq7t8ruav5g41"] - -[ext_resource type="Texture2D" uid="uid://b3lemqkwfnufw" path="res://resource/sprite/prop/buff/BuffProp0011.png" id="1_abwtt"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_abwtt") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0012.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0012.tres deleted file mode 100644 index 8416d7a..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0012.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://rksmm8jwex7l"] - -[ext_resource type="Texture2D" uid="uid://djhhig4ct8fgo" path="res://resource/sprite/prop/buff/BuffProp0012.png" id="1_kl6x5"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_kl6x5") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0013.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0013.tres deleted file mode 100644 index ae3883a..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0013.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://cdnrqfy0vfyu5"] - -[ext_resource type="Texture2D" uid="uid://8ykm3jbhjpxh" path="res://resource/sprite/prop/buff/BuffProp0013.png" id="1_sshn3"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_sshn3") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0014.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0014.tres deleted file mode 100644 index 141074b..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0014.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://ux70kddi6wwy"] - -[ext_resource type="Texture2D" uid="uid://ddkno2rlclys0" path="res://resource/sprite/prop/buff/BuffProp0014.png" id="1_0n30r"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_0n30r") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/scene/Hall.tscn b/DungeonShooting_Godot/scene/Hall.tscn index 32cc53f..6cf71a4 100644 --- a/DungeonShooting_Godot/scene/Hall.tscn +++ b/DungeonShooting_Godot/scene/Hall.tscn @@ -123,7 +123,7 @@ ShowOffset = Vector2(2.08165e-12, 2) CollisionVisible = false -[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0006" index="1"] +[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0006" index="0"] position = Vector2(-10, -3) texture = ExtResource("7_30qwa") @@ -135,7 +135,7 @@ ShowOffset = Vector2(2.08165e-12, 2) CollisionVisible = false -[node name="ActivityInstance" type="Node2D" parent="ItemRoot/Item0008" index="1"] +[node name="ActivityInstance" type="Node2D" parent="ItemRoot/Item0008" index="0"] position = Vector2(2.5, -12) script = ExtResource("5_lowqi") Id = "item_0031" @@ -151,7 +151,7 @@ ShowOffset = Vector2(2.08165e-12, 2) CollisionVisible = false -[node name="Item26" type="Sprite2D" parent="ItemRoot/Item0013" index="1"] +[node name="Item26" type="Sprite2D" parent="ItemRoot/Item0013" index="0"] position = Vector2(18, -2) texture = ExtResource("8_61dkg") @@ -163,19 +163,19 @@ ShowOffset = Vector2(2.08165e-12, 2) CollisionVisible = false -[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0017" index="1"] +[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0017" index="0"] position = Vector2(-2, -13) texture = ExtResource("8_u3vry") -[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0017" index="2"] +[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0017" index="1"] position = Vector2(18, -11) texture = ExtResource("9_lhdr8") -[node name="Sprite2D3" type="Sprite2D" parent="ItemRoot/Item0017" index="3"] +[node name="Sprite2D3" type="Sprite2D" parent="ItemRoot/Item0017" index="2"] position = Vector2(-16, -2) texture = ExtResource("10_4eqn0") -[node name="Sprite2D4" type="Sprite2D" parent="ItemRoot/Item0017" index="4"] +[node name="Sprite2D4" type="Sprite2D" parent="ItemRoot/Item0017" index="3"] position = Vector2(10, -1) texture = ExtResource("11_tg3jo") @@ -201,11 +201,11 @@ DefaultLayer = 1 CollisionVisible = false -[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0002" index="1"] +[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0002" index="0"] position = Vector2(32, -2) texture = ExtResource("12_agfji") -[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0002" index="2"] +[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0002" index="1"] material = SubResource("ShaderMaterial_i7git") position = Vector2(0, -15) scale = Vector2(1, -1) @@ -223,7 +223,7 @@ Id = "item_0004" DefaultLayer = 1 -[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0004" index="1"] +[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0004" index="0"] position = Vector2(0, -17) texture = ExtResource("13_unnpl") @@ -258,15 +258,15 @@ Id = "item_0009" DefaultLayer = 1 -[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0009" index="1"] +[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0009" index="0"] position = Vector2(-24, -10) texture = ExtResource("15_h7524") -[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0009" index="2"] +[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0009" index="1"] position = Vector2(1, -10) texture = ExtResource("15_h7524") -[node name="Sprite2D3" type="Sprite2D" parent="ItemRoot/Item0009" index="3"] +[node name="Sprite2D3" type="Sprite2D" parent="ItemRoot/Item0009" index="2"] position = Vector2(37, -10) texture = ExtResource("15_h7524") @@ -300,7 +300,7 @@ Id = "item_0015" DefaultLayer = 1 -[node name="Slice04" type="Sprite2D" parent="ItemRoot/Item0015" index="1"] +[node name="Slice04" type="Sprite2D" parent="ItemRoot/Item0015" index="0"] position = Vector2(16, -9) texture = ExtResource("15_h7524") @@ -322,11 +322,11 @@ Id = "item_0019" DefaultLayer = 1 -[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0019" index="1"] +[node name="Sprite2D" type="Sprite2D" parent="ItemRoot/Item0019" index="0"] position = Vector2(-23, -7) texture = ExtResource("16_xj0e1") -[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0019" index="2"] +[node name="Sprite2D2" type="Sprite2D" parent="ItemRoot/Item0019" index="1"] position = Vector2(24, -8) texture = ExtResource("17_gwwce") diff --git a/DungeonShooting_Godot/src/config/ExcelConfig.cs b/DungeonShooting_Godot/src/config/ExcelConfig.cs index 8bb7fd3..42d5e0a 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig.cs @@ -8,6 +8,15 @@ public static partial class ExcelConfig { /// + /// BuffPropBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// + public static List BuffPropBase_List { get; private set; } + /// + /// BuffPropBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// + public static Dictionary BuffPropBase_Map { get; private set; } + + /// /// Sound.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// public static List Sound_List { get; private set; } @@ -53,6 +62,15 @@ public static Dictionary BulletBase_Map { get; private set; } /// + /// ActivePropBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// + public static List ActivePropBase_List { get; private set; } + /// + /// ActivePropBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// + public static Dictionary ActivePropBase_Map { get; private set; } + + /// /// EnemyBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// public static List EnemyBase_List { get; private set; } @@ -89,19 +107,41 @@ if (_init) return; _init = true; + _InitBuffPropBaseConfig(); _InitSoundConfig(); _InitWeaponBaseConfig(); _InitActivityMaterialConfig(); _InitAiAttackAttrConfig(); _InitBulletBaseConfig(); + _InitActivePropBaseConfig(); _InitEnemyBaseConfig(); _InitActivityBaseConfig(); _InitLiquidMaterialConfig(); + _InitBuffPropBaseRef(); _InitWeaponBaseRef(); + _InitActivePropBaseRef(); _InitEnemyBaseRef(); _InitActivityBaseRef(); } + private static void _InitBuffPropBaseConfig() + { + try + { + var text = _ReadConfigAsText("res://resource/config/BuffPropBase.json"); + BuffPropBase_List = new List(JsonSerializer.Deserialize>(text)); + BuffPropBase_Map = new Dictionary(); + foreach (var item in BuffPropBase_List) + { + BuffPropBase_Map.Add(item.Id, item); + } + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化表'BuffPropBase'失败!"); + } + } private static void _InitSoundConfig() { try @@ -192,6 +232,24 @@ throw new Exception("初始化表'BulletBase'失败!"); } } + private static void _InitActivePropBaseConfig() + { + try + { + var text = _ReadConfigAsText("res://resource/config/ActivePropBase.json"); + ActivePropBase_List = new List(JsonSerializer.Deserialize>(text)); + ActivePropBase_Map = new Dictionary(); + foreach (var item in ActivePropBase_List) + { + ActivePropBase_Map.Add(item.Id, item); + } + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化表'ActivePropBase'失败!"); + } + } private static void _InitEnemyBaseConfig() { try @@ -247,6 +305,25 @@ } } + private static void _InitBuffPropBaseRef() + { + foreach (Ref_BuffPropBase item in BuffPropBase_List) + { + try + { + if (!string.IsNullOrEmpty(item.__Activity)) + { + item.Activity = ActivityBase_Map[item.__Activity]; + } + + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化'BuffPropBase'引用其他表数据失败, 当前行id: " + item.Id); + } + } + } private static void _InitWeaponBaseRef() { foreach (Ref_WeaponBase item in WeaponBase_List) @@ -315,6 +392,25 @@ } } } + private static void _InitActivePropBaseRef() + { + foreach (Ref_ActivePropBase item in ActivePropBase_List) + { + try + { + if (!string.IsNullOrEmpty(item.__Activity)) + { + item.Activity = ActivityBase_Map[item.__Activity]; + } + + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化'ActivePropBase'引用其他表数据失败, 当前行id: " + item.Id); + } + } + } private static void _InitEnemyBaseRef() { foreach (Ref_EnemyBase item in EnemyBase_List) diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_ActivePropBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_ActivePropBase.cs new file mode 100644 index 0000000..0de39eb --- /dev/null +++ b/DungeonShooting_Godot/src/config/ExcelConfig_ActivePropBase.cs @@ -0,0 +1,69 @@ +using System.Text.Json.Serialization; +using System.Collections.Generic; + +namespace Config; + +public static partial class ExcelConfig +{ + public class ActivePropBase + { + /// + /// Buff Id + /// + [JsonInclude] + public string Id; + + /// + /// 备注 + /// + [JsonInclude] + public string Remark; + + /// + /// 属性绑定Buff实体的Id,这个id时ActivityBase表Id + /// + public ActivityBase Activity; + + /// + /// 被动Buff效果
+ /// 也就是当前buff道具所有挂载的被动属性集合, 具体属性名称请参阅buff属性表
+ /// key为buff属性名称
+ /// value为buff初始化参数 + ///
+ [JsonInclude] + public Dictionary Buff; + + /// + /// 使用完成后是否自动销毁 + /// + [JsonInclude] + public bool AutoDestroy; + + /// + /// 最大叠加次数 + /// + [JsonInclude] + public uint MaxCount; + + /// + /// 返回浅拷贝出的新对象 + /// + public ActivePropBase Clone() + { + var inst = new ActivePropBase(); + inst.Id = Id; + inst.Remark = Remark; + inst.Activity = Activity; + inst.Buff = Buff; + inst.AutoDestroy = AutoDestroy; + inst.MaxCount = MaxCount; + return inst; + } + } + private class Ref_ActivePropBase : ActivePropBase + { + [JsonInclude] + public string __Activity; + + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs index d19cfa0..3e86482 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs @@ -15,6 +15,12 @@ public string Id; /// + /// 物体名称 + /// + [JsonInclude] + public string Name; + + /// /// Test(测试对象): 2
/// Role(角色): 3
/// Enemy(敌人): 4
@@ -30,12 +36,6 @@ public ActivityType Type; /// - /// 物体名称 - /// - [JsonInclude] - public string Name; - - /// /// 物体品质, 用于武器和道具
/// 通用物品: 1
/// 基础: 2
@@ -106,8 +106,8 @@ { var inst = new ActivityBase(); inst.Id = Id; - inst.Type = Type; inst.Name = Name; + inst.Type = Type; inst.Quality = Quality; inst.Price = Price; inst.Intro = Intro; diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_BuffPropBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_BuffPropBase.cs new file mode 100644 index 0000000..24f0e66 --- /dev/null +++ b/DungeonShooting_Godot/src/config/ExcelConfig_BuffPropBase.cs @@ -0,0 +1,55 @@ +using System.Text.Json.Serialization; +using System.Collections.Generic; + +namespace Config; + +public static partial class ExcelConfig +{ + public class BuffPropBase + { + /// + /// Buff Id + /// + [JsonInclude] + public string Id; + + /// + /// 备注 + /// + [JsonInclude] + public string Remark; + + /// + /// 属性绑定Buff实体的Id,这个id时ActivityBase表Id + /// + public ActivityBase Activity; + + /// + /// 被动Buff效果
+ /// 也就是当前buff道具所有挂载的被动属性集合, 具体属性名称请参阅buff属性表
+ /// key为buff属性名称
+ /// value为buff初始化参数 + ///
+ [JsonInclude] + public Dictionary Buff; + + /// + /// 返回浅拷贝出的新对象 + /// + public BuffPropBase Clone() + { + var inst = new BuffPropBase(); + inst.Id = Id; + inst.Remark = Remark; + inst.Activity = Activity; + inst.Buff = Buff; + return inst; + } + } + private class Ref_BuffPropBase : BuffPropBase + { + [JsonInclude] + public string __Activity; + + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs index 7b4d69c..9b341a7 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs @@ -477,7 +477,14 @@ else { SpriteFrames spriteFrames = AnimatedSprite.SpriteFrames; - spriteFrames.SetFrame("default", 0, texture); + if (spriteFrames.GetFrameCount("default") > 0) + { + spriteFrames.SetFrame("default", 0, texture); + } + else + { + spriteFrames.AddFrame("default", texture); + } } AnimatedSprite.Play("default"); @@ -628,6 +635,20 @@ } /// + /// 添加组件时调用 + /// + public virtual void OnAddComponent(Component component) + { + } + + /// + /// 移除组件时调用 + /// + public virtual void OnRemoveComponent(Component component) + { + } + + /// /// 返回当物体 CollisionLayer 是否能与 mask 层碰撞 /// public bool CollisionWithMask(uint mask) @@ -773,6 +794,7 @@ component.Master = this; component.Ready(); component.OnEnable(); + OnAddComponent(component); return component; } @@ -794,6 +816,7 @@ component.Master = this; component.Ready(); component.OnEnable(); + OnAddComponent(component); return component; } @@ -811,6 +834,7 @@ if (_updatingComp) { _changeComponents.Add(new KeyValuePair(component, false)); + OnRemoveComponent(component); component.Destroy(); } else @@ -820,6 +844,7 @@ if (_components[i].Value == component) { _components.RemoveAt(i); + OnRemoveComponent(component); component.Destroy(); return; } @@ -1933,7 +1958,7 @@ } /// - /// 设置是否启用碰撞层, 该函数是设置下载状态下原碰撞层 + /// 设置是否启用碰撞层, 该函数是设置下坠状态下原碰撞层 /// public void SetOriginCollisionLayerValue(uint layer, bool vale) { diff --git a/DungeonShooting_Godot/src/framework/common/Utils.cs b/DungeonShooting_Godot/src/framework/common/Utils.cs index 07b4751..416b796 100644 --- a/DungeonShooting_Godot/src/framework/common/Utils.cs +++ b/DungeonShooting_Godot/src/framework/common/Utils.cs @@ -343,9 +343,9 @@ /// /// 计算Vector2点所占用的区域 /// - public static Rect2I CalcRect(IEnumerable cells) + public static Rect2I CalcRect(ICollection cells) { - var count = cells.Count(); + var count = cells.Count; if (count == 0) { return new Rect2I(); diff --git a/DungeonShooting_Godot/src/framework/ui/grid/UiCell.cs b/DungeonShooting_Godot/src/framework/ui/grid/UiCell.cs index 3a1e5fc..7cbb2d5 100644 --- a/DungeonShooting_Godot/src/framework/ui/grid/UiCell.cs +++ b/DungeonShooting_Godot/src/framework/ui/grid/UiCell.cs @@ -1,5 +1,6 @@  using System; +using System.Collections; using Godot; /// @@ -50,6 +51,13 @@ { } + /// + /// 当前cell被分配值时调用,该函数为协程函数,当仅在 Grid 中调研 SetDataListCoroutine() 函数时才会被调用 + /// + public virtual IEnumerator OnSetDataCoroutine(T data) + { + yield break; + } public virtual void Process(float delta) { @@ -126,12 +134,20 @@ } /// - /// 设置当前 Cell 的值, 该函数由 UiGrid 调用 + /// 更新当前 Cell 的值, 该函数由 UiGrid 调用 + /// + public void UpdateData(T data) + { + Data = data; + OnSetData(data); + } + + /// + /// 设置当前 Cell 的值, 该函数由 UiGrid 调用,该函数为协程函数 /// public void SetData(T data) { Data = data; - OnSetData(data); } /// diff --git a/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs b/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs index 092102b..15ba72b 100644 --- a/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs +++ b/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs @@ -1,6 +1,7 @@  using System; +using System.Collections; using System.Collections.Generic; using Godot; @@ -342,7 +343,22 @@ for (var i = 0; i < _cellList.Count; i++) { var data = array[i]; - _cellList[i].SetData(data); + _cellList[i].UpdateData(data); + } + } + + /// + /// 设置当前网格组件中的所有 Cell 数据, 该函数为协程函数,可用于分帧处理大量数据 + /// + public IEnumerator SetDataListCoroutine(ICollection array) + { + RemoveAll(); + foreach (var data in array) + { + var cell = GetCellInstance(); + GridContainer.AddChild(cell.CellNode.GetUiInstance()); + cell.SetData(data); + yield return cell.OnSetDataCoroutine(data); } } @@ -353,7 +369,7 @@ { var cell = GetCellInstance(); GridContainer.AddChild(cell.CellNode.GetUiInstance()); - cell.SetData(data); + cell.UpdateData(data); if (select) { SelectIndex = Count - 1; @@ -368,7 +384,7 @@ var uiCell = GetCell(index); if (uiCell != null) { - uiCell.SetData(data); + uiCell.UpdateData(data); } } diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index 5670489..a176256 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -91,6 +91,7 @@ //初始化配置表 ExcelConfig.Init(); PreinstallMarkManager.Init(); + BuffRegister.Init(); //初始化房间配置数据 InitRoomConfig(); //初始化TileSet配置数据 @@ -99,6 +100,8 @@ Weapon.InitWeaponAttribute(); //初始化敌人数据 Enemy.InitEnemyAttribute(); + //初始化buff数据 + BuffProp.InitBuffAttribute(); DungeonConfig = new DungeonConfig(); DungeonConfig.GroupName = "Test1"; diff --git a/DungeonShooting_Godot/src/game/World.cs b/DungeonShooting_Godot/src/game/World.cs index 421110e..23d5b30 100644 --- a/DungeonShooting_Godot/src/game/World.cs +++ b/DungeonShooting_Godot/src/game/World.cs @@ -1,3 +1,4 @@ +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -75,6 +76,11 @@ /// 随机对象池 /// public RandomPool RandomPool { get; private set; } + + /// + /// 角色死亡事件 + /// + public event Action OnRoleDieEvent; private bool _pause = false; private List _coroutineList; @@ -166,4 +172,15 @@ Random = random; RandomPool = new RandomPool(this); } + + /// + /// 角色死亡 + /// + public void OnRoleDie(Role role) + { + if (OnRoleDieEvent != null) + { + OnRoleDieEvent(role); + } + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/ActiveProp.cs b/DungeonShooting_Godot/src/game/activity/prop/ActiveProp.cs new file mode 100644 index 0000000..fdc1b9d --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/ActiveProp.cs @@ -0,0 +1,330 @@ + +using System.Collections.Generic; +using Godot; + +/// +/// 主动使用道具 +/// +[Tool] +public partial class ActiveProp : PropActivity, IPackageItem +{ + public int PackageIndex { get; set; } + + /// + /// 道具可使用次数 + /// + public int Count + { + get => _count; + set + { + var temp = _count; + _count = Mathf.Clamp(value, 0, _maxCount); + if (temp != _count) + { + OnChangeCount(); + } + } + } + + private int _count = 1; + + /// + /// 道具最大叠加用次数 + /// + public int MaxCount + { + get => _maxCount; + set + { + var temp = _maxCount; + _maxCount = Mathf.Max(1, value); + if (temp != _maxCount) + { + OnChangeMaxCount(); + } + + if (Count > _maxCount) + { + Count = _maxCount; + } + } + } + + private int _maxCount = 1; + + /// + /// 使用一次后的冷却时间, 单位: 秒 + /// + public float CooldownTime { get; set; } = 2f; + + /// + /// 当道具使用完后是否自动销毁 + /// + public bool AutoDestroy { get; set; } = false; + + /// + /// 道具充能进度, 必须要充能完成才能使用, 值范围: 0 - 1 + /// + public float ChargeProgress + { + get => _chargeProgress; + set + { + var temp = _chargeProgress; + _chargeProgress = Mathf.Clamp(value, 0, 1); + if (temp != _chargeProgress) + { + OnChangeChargeProgress(); + } + } + } + + private float _chargeProgress = 1; + + /// + /// 自动充能速度, 也就是每秒充能进度, 如果为0则表示不就行自动充能 + /// + public float AutoChargeSpeed { get; set; } + + //冷却计时器 + private float _cooldownTimer = 0; + + /// + /// 当检测是否可以使用时调用 + /// + public virtual bool OnCheckUse() + { + return true; + } + + /// + /// 当道具被使用时调用, 函数返回值为消耗数量 + /// + protected virtual int OnUse() + { + return 1; + } + + /// + /// 道具数量改变时调用 + /// + protected virtual void OnChangeCount() + { + } + + /// + /// 道具最大数量改变时调用 + /// + protected virtual void OnChangeMaxCount() + { + } + + /// + /// 道具充能进度改变时调用 + /// + protected virtual void OnChangeChargeProgress() + { + } + + /// + /// 冷却完成时调用 + /// + protected virtual void OnCooldownFinish() + { + } + + protected override void Process(float delta) + { + RunUpdate(delta); + } + + public override void PackProcess(float delta) + { + RunUpdate(delta); + } + + private void RunUpdate(float delta) + { + if (CheckAutoDestroy()) + { + return; + } + //冷却 + if (_cooldownTimer > 0) + { + _cooldownTimer -= delta; + + //冷却完成 + if (_cooldownTimer <= 0) + { + _cooldownTimer = 0; + OnCooldownFinish(); + } + } + + //自动充能 + if (AutoChargeSpeed > 0 && ChargeProgress < 1) + { + ChargeProgress += AutoChargeSpeed * delta; + } + } + + //检测是否达到自动销毁的条件 + private bool CheckAutoDestroy() + { + if (Count == 0 && AutoDestroy) //用光了, 自动销毁 + { + if (Master != null) + { + Master.ActivePropsPack.RemoveItem(this); + } + Destroy(); + return true; + } + + return false; + } + + /// + /// 检测是否可以使用当前道具 + /// + public bool CheckUse() + { + return ChargeProgress >= 1 && _cooldownTimer <= 0 && Count > 0 && OnCheckUse(); + } + + /// + /// 触发使用道具 + /// + public void Use() + { + if (Master == null) + { + return; + } + if (CheckUse()) //可以使用道具 + { + var num = OnUse(); + if (num != 0) + { + Count -= num; + } + + //冷却计时器 + _cooldownTimer = CooldownTime; + } + } + + /// + /// 获取冷却进度 0 - 1 + /// + public float GetCooldownProgress() + { + if (_cooldownTimer <= 0) + { + return 1; + } + + return (CooldownTime - _cooldownTimer) / CooldownTime; + } + + public override void Interactive(ActivityObject master) + { + if (master is Player player) + { + if (player.ActivePropsPack.Capacity == 0) + { + //容量为0 + return; + } + var item = player.ActivePropsPack.GetItemById(ActivityBase.Id); + if (item == null) //没有同类型物体 + { + if (!player.ActivePropsPack.HasVacancy()) //没有空位置, 扔掉当前道具 + { + player.ThrowActiveProp(player.ActivePropsPack.ActiveIndex); + } + //替换手中的道具 + if (player.PickUpActiveProp(this)) + { + Pickup(); + } + } + else + { + //处理同类型道具 + if (item.Count < item.MaxCount) //允许叠加 + { + if (item.Count + Count > item.MaxCount) + { + Count -= item.MaxCount - item.Count; + item.Count = item.MaxCount; + } + else + { + item.Count += Count; + Count = 0; + } + Destroy(); + } + } + } + } + + public override CheckInteractiveResult CheckInteractive(ActivityObject master) + { + if (master is Player player) + { + if (player.ActivePropsPack.Capacity == 0) + { + //容量为0 + return new CheckInteractiveResult(this); + } + //查找相同类型的道具 + var item = player.ActivePropsPack.GetItemById(ActivityBase.Id); + if (item == null) //没有同类型物体 + { + if (player.ActivePropsPack.HasVacancy()) //还有空位, 拾起道具 + { + return new CheckInteractiveResult(this, true, CheckInteractiveResult.InteractiveType.PickUp); + } + + //替换手中的道具 + return new CheckInteractiveResult(this, true, CheckInteractiveResult.InteractiveType.Replace); + } + + //处理同类型道具 + if (item.Count < item.MaxCount) //允许叠加 + { + return new CheckInteractiveResult(this, true, CheckInteractiveResult.InteractiveType.Bullet); + } + + //该道具不能拾起 + return new CheckInteractiveResult(this); + } + + return new CheckInteractiveResult(this); + } + + public override void OnPickUpItem() + { + } + + public override void OnRemoveItem() + { + } + + public virtual void OnActiveItem() + { + } + + public virtual void OnConcealItem() + { + } + + public virtual void OnOverflowItem() + { + Master.ThrowActiveProp(PackageIndex); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/BuffProp.cs b/DungeonShooting_Godot/src/game/activity/prop/BuffProp.cs new file mode 100644 index 0000000..5ed7bd9 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/BuffProp.cs @@ -0,0 +1,220 @@ + +using System; +using System.Collections.Generic; +using Config; +using Godot; + +/// +/// 通用被动道具实体类 +/// +[Tool] +public partial class BuffProp : PropActivity +{ + //被动属性 + private readonly List _buffFragment = new List(); + + public override void OnInit() + { + base.OnInit(); + var buffAttribute = GetBuffAttribute(ActivityBase.Id); + if (buffAttribute != null) + { + //初始化buff属性 + foreach (var keyValuePair in buffAttribute.Buff) + { + var buffInfo = BuffRegister.BuffInfos[keyValuePair.Key]; + var item = keyValuePair.Value; + switch (item.Length) + { + case 0: + { + var buff = (BuffFragment)AddComponent(buffInfo.Type); + _buffFragment.Add(buff); + } + break; + case 1: + { + var buff = (BuffFragment)AddComponent(buffInfo.Type); + buff.InitParam(item[0]); + _buffFragment.Add(buff); + } + break; + case 2: + { + var buff = (BuffFragment)AddComponent(buffInfo.Type); + buff.InitParam(item[0], item[1]); + _buffFragment.Add(buff); + } + break; + case 3: + { + var buff = (BuffFragment)AddComponent(buffInfo.Type); + buff.InitParam(item[0], item[1], item[2]); + _buffFragment.Add(buff); + } + break; + case 4: + { + var buff = (BuffFragment)AddComponent(buffInfo.Type); + buff.InitParam(item[0], item[1], item[2], item[3]); + _buffFragment.Add(buff); + } + break; + } + } + //显示纹理 + if (!string.IsNullOrEmpty(ActivityBase.Icon)) + { + SetDefaultTexture(ResourceManager.LoadTexture2D(ActivityBase.Icon)); + } + } + } + + public override void OnPickUpItem() + { + foreach (var buffFragment in _buffFragment) + { + buffFragment.OnPickUpItem(); + } + } + + public override void OnRemoveItem() + { + foreach (var buffFragment in _buffFragment) + { + buffFragment.OnRemoveItem(); + } + } + + /// + /// 添加被动属性 + /// + public void AddBuffFragment() where T : BuffFragment, new() + { + var fragment = AddComponent(); + _buffFragment.Add(fragment); + if (Master != null) + { + fragment.OnPickUpItem(); + } + } + + /// + /// 添加被动属性 + /// + public void AddBuffFragment(float arg1) where T : BuffFragment, new() + { + var fragment = AddComponent(); + _buffFragment.Add(fragment); + fragment.InitParam(arg1); + if (Master != null) + { + fragment.OnPickUpItem(); + } + } + + /// + /// 添加被动属性 + /// + public void AddBuffFragment(float arg1, float arg2) where T : BuffFragment, new() + { + var fragment = AddComponent(); + _buffFragment.Add(fragment); + fragment.InitParam(arg1, arg2); + if (Master != null) + { + fragment.OnPickUpItem(); + } + } + + /// + /// 添加被动属性 + /// + public void AddBuffFragment(float arg1, float arg2, float arg3) where T : BuffFragment, new() + { + var fragment = AddComponent(); + _buffFragment.Add(fragment); + fragment.InitParam(arg1, arg2, arg3); + if (Master != null) + { + fragment.OnPickUpItem(); + } + } + + /// + /// 添加被动属性 + /// + public void AddBuffFragment(float arg1, float arg2, float arg3, float arg4) where T : BuffFragment, new() + { + var fragment = AddComponent(); + _buffFragment.Add(fragment); + fragment.InitParam(arg1, arg2, arg3, arg4); + if (Master != null) + { + fragment.OnPickUpItem(); + } + } + + public override void Interactive(ActivityObject master) + { + if (master is Player role) + { + Pickup(); + role.PickUpBuffProp(this); + } + } + + public override CheckInteractiveResult CheckInteractive(ActivityObject master) + { + if (master is Player) + { + return new CheckInteractiveResult(this, true, CheckInteractiveResult.InteractiveType.PickUp); + } + return base.CheckInteractive(master); + } + + + private static bool _init = false; + private static Dictionary _buffAttributeMap = + new Dictionary(); + + /// + /// 初始化 buff 属性数据 + /// + public static void InitBuffAttribute() + { + if (_init) + { + return; + } + + _init = true; + foreach (var buffAttr in ExcelConfig.BuffPropBase_List) + { + if (buffAttr.Activity != null) + { + if (!_buffAttributeMap.TryAdd(buffAttr.Activity.Id, buffAttr)) + { + Debug.LogError("发现重复注册的 buff 属性: " + buffAttr.Id); + } + } + } + } + + /// + /// 根据 ActivityBase.Id 获取对应 buff 的属性数据 + /// + public static ExcelConfig.BuffPropBase GetBuffAttribute(string itemId) + { + if (itemId == null) + { + return null; + } + if (_buffAttributeMap.TryGetValue(itemId, out var attr)) + { + return attr; + } + + throw new Exception($"buff'{itemId}'没有在 BuffBase 表中配置属性数据!"); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/Prop.cs b/DungeonShooting_Godot/src/game/activity/prop/Prop.cs deleted file mode 100644 index 90fb6e7..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/Prop.cs +++ /dev/null @@ -1,61 +0,0 @@ - -using Godot; - -/// -/// 道具基类 -/// -public abstract partial class Prop : ActivityObject -{ - /// - /// 道具所属角色 - /// - public Role Master { get; set; } - - /// - /// 当道具被拾起时调用 (在 Master 赋值之后调用) - /// - public abstract void OnPickUpItem(); - - /// - /// 当道具被移除时调用 (在 Master 置为 null 之前调用) - /// - public abstract void OnRemoveItem(); - - public override void OnInit() - { - ThrowCollisionMask = PhysicsLayer.Wall; - } - - /// - /// 如果道具放入了角色背包中, 则每帧调用 - /// - public virtual void PackProcess(float delta) - { - } - - /// - /// 触发扔掉道具效果, 并不会管道具是否在道具背包中 - /// - /// 触发扔掉该道具的的角色 - public void ThrowProp(Role master) - { - ThrowProp(master, master.GlobalPosition); - } - - /// - /// 触发扔掉道具效果, 并不会管道具是否在道具背包中 - /// - /// 触发扔掉该道具的的角色 - /// 投抛起始位置 - public void ThrowProp(Role master, Vector2 startPosition) - { - //阴影偏移 - ShadowOffset = new Vector2(0, 2); - GlobalRotation = 0; - var startHeight = 8; - Throw(startPosition, startHeight, 0, Vector2.Zero, 0); - - //继承role的移动速度 - InheritVelocity(master); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/PropActivity.cs b/DungeonShooting_Godot/src/game/activity/prop/PropActivity.cs new file mode 100644 index 0000000..d9ff654 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/PropActivity.cs @@ -0,0 +1,61 @@ + +using Godot; + +/// +/// 道具基类 +/// +public abstract partial class PropActivity : ActivityObject +{ + /// + /// 道具所属角色 + /// + public Role Master { get; set; } + + /// + /// 当道具被拾起时调用 (在 Master 赋值之后调用) + /// + public abstract void OnPickUpItem(); + + /// + /// 当道具被移除时调用 (在 Master 置为 null 之前调用) + /// + public abstract void OnRemoveItem(); + + public override void OnInit() + { + ThrowCollisionMask = PhysicsLayer.Wall; + } + + /// + /// 如果道具放入了角色背包中, 则每帧调用 + /// + public virtual void PackProcess(float delta) + { + } + + /// + /// 触发扔掉道具效果, 并不会管道具是否在道具背包中 + /// + /// 触发扔掉该道具的的角色 + public void ThrowProp(Role master) + { + ThrowProp(master, master.GlobalPosition); + } + + /// + /// 触发扔掉道具效果, 并不会管道具是否在道具背包中 + /// + /// 触发扔掉该道具的的角色 + /// 投抛起始位置 + public void ThrowProp(Role master, Vector2 startPosition) + { + //阴影偏移 + ShadowOffset = new Vector2(0, 2); + GlobalRotation = 0; + var startHeight = 8; + Throw(startPosition, startHeight, 0, Vector2.Zero, 0); + + //继承role的移动速度 + InheritVelocity(master); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs deleted file mode 100644 index 93d7df6..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs +++ /dev/null @@ -1,327 +0,0 @@ - -using Godot; - -/// -/// 主动使用道具 -/// -public abstract partial class ActiveProp : Prop, IPackageItem -{ - public int PackageIndex { get; set; } - - /// - /// 道具是否可以叠加 - /// - public bool Superposition { get; set; } = false; - - /// - /// 道具可使用次数 - /// - public int Count - { - get => _count; - set - { - var temp = _count; - _count = Mathf.Clamp(value, 0, _maxCount); - if (temp != _count) - { - OnChangeCount(); - } - } - } - - private int _count = 1; - - /// - /// 道具最大叠加用次数 - /// - public int MaxCount - { - get => _maxCount; - set - { - var temp = _maxCount; - _maxCount = Mathf.Max(1, value); - if (temp != _maxCount) - { - OnChangeMaxCount(); - } - - if (Count > _maxCount) - { - Count = _maxCount; - } - } - } - - private int _maxCount = 1; - - /// - /// 使用一次后的冷却时间, 单位: 秒 - /// - public float CooldownTime { get; set; } = 2f; - - /// - /// 当道具使用完后是否自动销毁 - /// - public bool AutoDestroy { get; set; } = false; - - /// - /// 道具充能进度, 必须要充能完成才能使用, 值范围: 0 - 1 - /// - public float ChargeProgress - { - get => _chargeProgress; - set - { - var temp = _chargeProgress; - _chargeProgress = Mathf.Clamp(value, 0, 1); - if (temp != _chargeProgress) - { - OnChangeChargeProgress(); - } - } - } - - private float _chargeProgress = 1; - - /// - /// 自动充能速度, 也就是每秒充能进度, 如果为0则表示不就行自动充能 - /// - public float AutoChargeSpeed { get; set; } - - //冷却计时器 - private float _cooldownTimer = 0; - - /// - /// 当检测是否可以使用时调用 - /// - public abstract bool OnCheckUse(); - - /// - /// 当道具被使用时调用, 函数返回值为消耗数量 - /// - protected abstract int OnUse(); - - /// - /// 道具数量改变时调用 - /// - protected virtual void OnChangeCount() - { - } - - /// - /// 道具最大数量改变时调用 - /// - protected virtual void OnChangeMaxCount() - { - } - - /// - /// 道具充能进度改变时调用 - /// - protected virtual void OnChangeChargeProgress() - { - } - - /// - /// 冷却完成时调用 - /// - protected virtual void OnCooldownFinish() - { - } - - protected override void Process(float delta) - { - RunUpdate(delta); - } - - public override void PackProcess(float delta) - { - RunUpdate(delta); - } - - private void RunUpdate(float delta) - { - if (CheckAutoDestroy()) - { - return; - } - //冷却 - if (_cooldownTimer > 0) - { - _cooldownTimer -= delta; - - //冷却完成 - if (_cooldownTimer <= 0) - { - _cooldownTimer = 0; - OnCooldownFinish(); - } - } - - //自动充能 - if (AutoChargeSpeed > 0 && ChargeProgress < 1) - { - ChargeProgress += AutoChargeSpeed * delta; - } - } - - //检测是否达到自动销毁的条件 - private bool CheckAutoDestroy() - { - if (Count == 0 && AutoDestroy) //用光了, 自动销毁 - { - if (Master != null) - { - Master.ActivePropsPack.RemoveItem(this); - } - Destroy(); - return true; - } - - return false; - } - - /// - /// 检测是否可以使用当前道具 - /// - public bool CheckUse() - { - return ChargeProgress >= 1 && _cooldownTimer <= 0 && Count > 0 && OnCheckUse(); - } - - /// - /// 触发使用道具 - /// - public void Use() - { - if (Master == null) - { - return; - } - if (CheckUse()) //可以使用道具 - { - var num = OnUse(); - if (num != 0) - { - Count -= num; - } - - //冷却计时器 - _cooldownTimer = CooldownTime; - } - } - - /// - /// 获取冷却进度 0 - 1 - /// - public float GetCooldownProgress() - { - if (_cooldownTimer <= 0) - { - return 1; - } - - return (CooldownTime - _cooldownTimer) / CooldownTime; - } - - public override void Interactive(ActivityObject master) - { - if (master is Player player) - { - if (player.ActivePropsPack.Capacity == 0) - { - //容量为0 - return; - } - var item = player.ActivePropsPack.GetItemById(ActivityBase.Id); - if (item == null) //没有同类型物体 - { - if (!player.ActivePropsPack.HasVacancy()) //没有空位置, 扔掉当前道具 - { - player.ThrowActiveProp(player.ActivePropsPack.ActiveIndex); - } - //替换手中的道具 - if (player.PickUpActiveProp(this)) - { - Pickup(); - } - } - else - { - //处理同类型道具 - if (Superposition && item.Count < item.MaxCount) //允许叠加 - { - if (item.Count + Count > item.MaxCount) - { - Count -= item.MaxCount - item.Count; - item.Count = item.MaxCount; - } - else - { - item.Count += Count; - Count = 0; - } - Destroy(); - } - } - } - } - - public override CheckInteractiveResult CheckInteractive(ActivityObject master) - { - if (master is Player player) - { - if (player.ActivePropsPack.Capacity == 0) - { - //容量为0 - return new CheckInteractiveResult(this); - } - //查找相同类型的道具 - var item = player.ActivePropsPack.GetItemById(ActivityBase.Id); - if (item == null) //没有同类型物体 - { - if (player.ActivePropsPack.HasVacancy()) //还有空位, 拾起道具 - { - return new CheckInteractiveResult(this, true, CheckInteractiveResult.InteractiveType.PickUp); - } - - //替换手中的道具 - return new CheckInteractiveResult(this, true, CheckInteractiveResult.InteractiveType.Replace); - } - - //处理同类型道具 - if (Superposition && item.Count < item.MaxCount) //允许叠加 - { - return new CheckInteractiveResult(this, true, CheckInteractiveResult.InteractiveType.Bullet); - } - - //该道具不能拾起 - return new CheckInteractiveResult(this); - } - - return new CheckInteractiveResult(this); - } - - public override void OnPickUpItem() - { - } - - public override void OnRemoveItem() - { - } - - public virtual void OnActiveItem() - { - } - - public virtual void OnConcealItem() - { - } - - public virtual void OnOverflowItem() - { - Master.ThrowActiveProp(PackageIndex); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5000.cs b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5000.cs index bdc2ce4..0f7d67c 100644 --- a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5000.cs +++ b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5000.cs @@ -12,7 +12,6 @@ base.OnInit(); AutoDestroy = true; MaxCount = 10; - Superposition = true; } public override bool OnCheckUse() diff --git a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5001.cs b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5001.cs index 43770cb..c19b1c9 100644 --- a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5001.cs +++ b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5001.cs @@ -10,7 +10,6 @@ public override void OnInit() { base.OnInit(); - Superposition = true; AutoDestroy = true; MaxCount = 10; } diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp.cs deleted file mode 100644 index de5cd38..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp.cs +++ /dev/null @@ -1,24 +0,0 @@ - -/// -/// 被动增益道具 -/// -public abstract partial class BuffProp : Prop -{ - public override void Interactive(ActivityObject master) - { - if (master is Player role) - { - Pickup(); - role.PickUpBuffProp(this); - } - } - - public override CheckInteractiveResult CheckInteractive(ActivityObject master) - { - if (master is Player) - { - return new CheckInteractiveResult(this, true, CheckInteractiveResult.InteractiveType.PickUp); - } - return base.CheckInteractive(master); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0001.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0001.cs deleted file mode 100644 index 50c3417..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0001.cs +++ /dev/null @@ -1,23 +0,0 @@ - -using Godot; - -/// -/// 移速 buff, 移速 + 3 -/// -[Tool] -public partial class BuffProp0001 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.MoveSpeed += 30; - Master.RoleState.Acceleration += 400; - Master.RoleState.Friction += 300; - } - - public override void OnRemoveItem() - { - Master.RoleState.MoveSpeed -= 30; - Master.RoleState.Acceleration -= 400; - Master.RoleState.Friction -= 300; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0002.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0002.cs deleted file mode 100644 index ec3b255..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0002.cs +++ /dev/null @@ -1,20 +0,0 @@ - -using Godot; - -/// -/// 血量上限buff, 心之容器 + 1 -/// -[Tool] -public partial class BuffProp0002 : BuffProp -{ - public override void OnPickUpItem() - { - Master.MaxHp += 2; - Master.Hp += 2; - } - - public override void OnRemoveItem() - { - Master.MaxHp -= 2; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0003.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0003.cs deleted file mode 100644 index 7ecf063..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0003.cs +++ /dev/null @@ -1,20 +0,0 @@ - -using Godot; - -/// -/// 护盾上限buff, 护盾 + 1 -/// -[Tool] -public partial class BuffProp0003 : BuffProp -{ - public override void OnPickUpItem() - { - Master.MaxShield += 1; - Master.Shield += 1; - } - - public override void OnRemoveItem() - { - Master.MaxShield -= 1; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0004.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0004.cs deleted file mode 100644 index f66ab3b..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0004.cs +++ /dev/null @@ -1,19 +0,0 @@ - -using Godot; - -/// -/// 护盾恢复时间buff, 恢复时间 - 2.5s -/// -[Tool] -public partial class BuffProp0004 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.ShieldRecoveryTime -= 2.5f; - } - - public override void OnRemoveItem() - { - Master.RoleState.ShieldRecoveryTime += 2.5f; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0005.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0005.cs deleted file mode 100644 index 37783e6..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0005.cs +++ /dev/null @@ -1,24 +0,0 @@ - -using Godot; - -/// -/// 提升伤害buff, 子弹伤害提升20% -/// -[Tool] -public partial class BuffProp0005 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcDamageEvent += CalcDamage; - } - - public override void OnRemoveItem() - { - Master.RoleState.CalcDamageEvent -= CalcDamage; - } - - private void CalcDamage(int originDamage, RefValue refValue) - { - refValue.Value += Mathf.CeilToInt(originDamage * 0.2f); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0006.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0006.cs deleted file mode 100644 index 8076c29..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0006.cs +++ /dev/null @@ -1,19 +0,0 @@ - -using Godot; - -/// -/// 延长无敌时间buff, 受伤后无敌时间 + 2s -/// -[Tool] -public partial class BuffProp0006 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.WoundedInvincibleTime += 2f; - } - - public override void OnRemoveItem() - { - Master.RoleState.WoundedInvincibleTime -= 2f; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0007.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0007.cs deleted file mode 100644 index e83b525..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0007.cs +++ /dev/null @@ -1,27 +0,0 @@ - -using Godot; - -/// -/// 受伤时有15%概率抵消伤害 -/// -[Tool] -public partial class BuffProp0007 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcHurtDamageEvent += CalcHurtDamageEvent; - } - - public override void OnRemoveItem() - { - Master.RoleState.CalcHurtDamageEvent -= CalcHurtDamageEvent; - } - - private void CalcHurtDamageEvent(int originDamage, RefValue refValue) - { - if (refValue.Value > 0 && Utils.Random.RandomBoolean(0.15f)) - { - refValue.Value = 0; - } - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0008.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0008.cs deleted file mode 100644 index b7d2de6..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0008.cs +++ /dev/null @@ -1,31 +0,0 @@ - -using Godot; - -/// -/// 眼镜, 提高武器50%精准度 -/// -[Tool] -public partial class BuffProp0008 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcStartScatteringEvent += CalcStartScatteringEvent; - Master.RoleState.CalcFinalScatteringEvent += CalcFinalScatteringEvent; - } - - public override void OnRemoveItem() - { - Master.RoleState.CalcStartScatteringEvent -= CalcStartScatteringEvent; - Master.RoleState.CalcFinalScatteringEvent -= CalcFinalScatteringEvent; - } - - private void CalcStartScatteringEvent(float originValue, RefValue refValue) - { - refValue.Value *= 0.5f; - } - - private void CalcFinalScatteringEvent(float originValue, RefValue refValue) - { - refValue.Value *= 0.5f; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0009.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0009.cs deleted file mode 100644 index 4fad8f8..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0009.cs +++ /dev/null @@ -1,31 +0,0 @@ - -using Godot; - -/// -/// 高速子弹 子弹速度和射程提升25% -/// -[Tool] -public partial class BuffProp0009 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent; - Master.RoleState.CalcBulletDistanceEvent += CalcBulletDistanceEvent; - } - - public override void OnRemoveItem() - { - Master.RoleState.CalcBulletSpeedEvent -= CalcBulletSpeedEvent; - Master.RoleState.CalcBulletDistanceEvent -= CalcBulletDistanceEvent; - } - - private void CalcBulletSpeedEvent(float originSpeed, RefValue speed) - { - speed.Value += originSpeed * 0.25f; - } - - private void CalcBulletDistanceEvent(float originDistance, RefValue distance) - { - distance.Value += originDistance * 0.25f; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0010.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0010.cs deleted file mode 100644 index 6254213..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0010.cs +++ /dev/null @@ -1,63 +0,0 @@ - -using Godot; - -/// -/// 分裂子弹 子弹数量翻倍, 但是精准度, 击退和伤害降低 -/// -[Tool] -public partial class BuffProp0010 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcBulletCountEvent += CalcBulletCountEvent; - Master.RoleState.CalcBulletDeviationAngleEvent += CalcBulletDeviationAngleEvent; - Master.RoleState.CalcDamageEvent += CalcDamageEvent; - Master.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent; - Master.RoleState.CalcBulletRepelEvent += CalcBulletRepelEvent; - } - - public override void OnRemoveItem() - { - Master.RoleState.CalcBulletCountEvent -= CalcBulletCountEvent; - Master.RoleState.CalcBulletDeviationAngleEvent -= CalcBulletDeviationAngleEvent; - Master.RoleState.CalcDamageEvent -= CalcDamageEvent; - Master.RoleState.CalcBulletSpeedEvent -= CalcBulletSpeedEvent; - Master.RoleState.CalcBulletRepelEvent -= CalcBulletRepelEvent; - } - - private void CalcBulletCountEvent(int originCount, RefValue refValue) - { - refValue.Value += originCount; - } - - private void CalcBulletDeviationAngleEvent(float originAngle, RefValue refValue) - { - refValue.Value += Utils.Random.RandomRangeFloat(-8, 8); - } - - private void CalcDamageEvent(int originDamage, RefValue refValue) - { - if (refValue.Value <= 0) - { - return; - } - - refValue.Value = Mathf.Max(1, refValue.Value - Mathf.FloorToInt(refValue.Value * 0.35f)); - } - - private void CalcBulletSpeedEvent(float originSpeed, RefValue speed) - { - speed.Value += originSpeed * Utils.Random.RandomRangeFloat(-0.05f, 0.05f); - } - - private void CalcBulletRepelEvent(float originRepel, RefValue repel) - { - if (repel.Value < 0 || (Master.WeaponPack.ActiveItem != null && - Master.WeaponPack.ActiveItem.Attribute.IsMelee)) - { - return; - } - - repel.Value = Mathf.Max(1, repel.Value - Mathf.FloorToInt(repel.Value * 0.35f)); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0011.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0011.cs deleted file mode 100644 index 6485291..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0011.cs +++ /dev/null @@ -1,24 +0,0 @@ - -using Godot; - -/// -/// 弹射子弹 子弹反弹次数 +2 -/// -[Tool] -public partial class BuffProp0011 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcBulletBounceCountEvent += CalcBulletBounceCountEvent; - } - - public override void OnRemoveItem() - { - Master.RoleState.CalcBulletBounceCountEvent -= CalcBulletBounceCountEvent; - } - - private void CalcBulletBounceCountEvent(int originBounce, RefValue bounce) - { - bounce.Value += 2; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0012.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0012.cs deleted file mode 100644 index a24b0fc..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0012.cs +++ /dev/null @@ -1,24 +0,0 @@ - -using Godot; - -/// -/// 穿透子弹 子弹穿透+1 -/// -[Tool] -public partial class BuffProp0012 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcBulletPenetrationEvent += CalcBulletPenetrationEvent; - } - - public override void OnRemoveItem() - { - Master.RoleState.CalcBulletPenetrationEvent -= CalcBulletPenetrationEvent; - } - - private void CalcBulletPenetrationEvent(int origin, RefValue penetration) - { - penetration.Value += 1; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0013.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0013.cs deleted file mode 100644 index e43270a..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0013.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Godot; - -/// -/// 武器背包 武器容量+1 -/// -[Tool] -public partial class BuffProp0013 : BuffProp -{ - public override void OnPickUpItem() - { - Master.WeaponPack.SetCapacity(Master.WeaponPack.Capacity + 1); - } - - public override void OnRemoveItem() - { - Master.WeaponPack.SetCapacity(Master.WeaponPack.Capacity - 1); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0014.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0014.cs deleted file mode 100644 index b09db41..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0014.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Godot; - -/// -/// 道具背包 道具容量+1 -/// -[Tool] -public partial class BuffProp0014 : BuffProp -{ - public override void OnPickUpItem() - { - Master.ActivePropsPack.SetCapacity(Master.ActivePropsPack.Capacity + 1); - } - - public override void OnRemoveItem() - { - Master.ActivePropsPack.SetCapacity(Master.ActivePropsPack.Capacity - 1); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/Role.cs b/DungeonShooting_Godot/src/game/activity/role/Role.cs index b7a454b..f383169 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs @@ -1,4 +1,5 @@  +using System; using System.Collections; using System.Collections.Generic; using Config; @@ -10,6 +11,13 @@ public abstract partial class Role : ActivityObject { /// + /// 当前角色对其他角色造成伤害时对回调 + /// 参数1为目标角色 + /// 参数2为造成对伤害值 + /// + public event Action OnDamageEvent; + + /// /// 是否是 Ai /// public bool IsAi { get; protected set; } = false; @@ -839,7 +847,16 @@ // GameApplication.Instance.Node3D.GetRoot().AddChild(blood); } OnHit(target, damage, angle, !flag); - + + if (target is Role targetRole && !targetRole.IsDestroyed) + { + //造成伤害回调 + if (targetRole.OnDamageEvent != null) + { + targetRole.OnDamageEvent(this, damage); + } + } + //受伤特效 PlayHitAnimation(); @@ -851,6 +868,8 @@ { IsDie = true; OnDie(); + //死亡事件 + World.OnRoleDie(this); } } } diff --git a/DungeonShooting_Godot/src/game/buff/BuffAttribute.cs b/DungeonShooting_Godot/src/game/buff/BuffAttribute.cs new file mode 100644 index 0000000..2d44e2f --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/BuffAttribute.cs @@ -0,0 +1,21 @@ +using System; + +[AttributeUsage(AttributeTargets.Class)] +public class BuffAttribute : Attribute +{ + /// + /// Buff属性名称 + /// + public string BuffName { get; set; } + + /// + /// 描述 + /// + public string Description { get; set; } + + public BuffAttribute(string buffName, string description) + { + BuffName = buffName; + Description = description; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/BuffFragment.cs b/DungeonShooting_Godot/src/game/buff/BuffFragment.cs new file mode 100644 index 0000000..16f6110 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/BuffFragment.cs @@ -0,0 +1,55 @@ + +using System; + +/// +/// 被动属性逻辑基类 +/// +public abstract class BuffFragment : Component +{ + /// + /// 所属角色对象 + /// + public Role Role => Master?.Master; + + /// + /// 当道具被拾起时调用 (在 Master 赋值之后调用) + /// + public abstract void OnPickUpItem(); + + /// + /// 当道具被移除时调用 (在 Master 置为 null 之前调用) + /// + public abstract void OnRemoveItem(); + + /// + /// 初始化被动属性参数 + /// + public virtual void InitParam(float arg1) + { + Debug.LogError($"'{GetType().FullName}'为实现1参数初始化函数!"); + } + + /// + /// 初始化被动属性参数 + /// + public virtual void InitParam(float arg1, float arg2) + { + Debug.LogError($"'{GetType().FullName}'为实现2参数初始化函数!"); + } + + /// + /// 初始化被动属性参数 + /// + public virtual void InitParam(float arg1, float arg2, float arg3) + { + Debug.LogError($"'{GetType().FullName}'为实现4参数初始化函数!"); + } + + /// + /// 初始化被动属性参数 + /// + public virtual void InitParam(float arg1, float arg2, float arg3, float arg4) + { + Debug.LogError($"'{GetType().FullName}'为实现4参数初始化函数!"); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_ActivePropsCapacity.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_ActivePropsCapacity.cs new file mode 100644 index 0000000..7163a9d --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_ActivePropsCapacity.cs @@ -0,0 +1,21 @@ + +[Buff("ActivePropsCapacity", "主动道具背包容量 buff, 参数‘1’为主动道具背包增加的容量")] +public class Buff_ActivePropsCapacity : BuffFragment +{ + private int _value; + + public override void InitParam(float arg1) + { + _value = (int)arg1; + } + + public override void OnPickUpItem() + { + Role.ActivePropsPack.SetCapacity(Role.ActivePropsPack.Capacity + _value); + } + + public override void OnRemoveItem() + { + Role.ActivePropsPack.SetCapacity(Role.ActivePropsPack.Capacity - _value); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletBounceCount.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletBounceCount.cs new file mode 100644 index 0000000..1f57944 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletBounceCount.cs @@ -0,0 +1,26 @@ + +[Buff("BulletBounceCount", "子弹弹射数量 buff, 参数‘1’为增加的弹射次数")] +public class Buff_BulletBounceCount : BuffFragment +{ + private int _value; + + public override void InitParam(float arg1) + { + _value = (int)arg1; + } + + public override void OnPickUpItem() + { + Role.RoleState.CalcBulletBounceCountEvent += CalcBulletBounceCountEvent; + } + + public override void OnRemoveItem() + { + Role.RoleState.CalcBulletBounceCountEvent -= CalcBulletBounceCountEvent; + } + + private void CalcBulletBounceCountEvent(int originBounce, RefValue bounce) + { + bounce.Value += _value; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletCount.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletCount.cs new file mode 100644 index 0000000..71b3cfd --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletCount.cs @@ -0,0 +1,52 @@ + +using Godot; + +[Buff("BulletCount", + "子弹数量 buff, " + + "参数‘1’为子弹数量添加类型, 1: 具体数量, 2:百分比(小数), " + + "参数‘2’为增加子弹的数量")] +public class Buff_BulletCount : BuffFragment +{ + private int _type; + private float _value; + + public override void InitParam(float arg1, float arg2) + { + _type = (int)arg1; + _value = (int)arg2; + } + + public override void OnPickUpItem() + { + if (_type == 1) + { + Role.RoleState.CalcBulletCountEvent += CalcBulletCountEvent1; + } + else + { + Role.RoleState.CalcBulletCountEvent += CalcBulletCountEvent2; + } + } + + public override void OnRemoveItem() + { + if (_type == 1) + { + Role.RoleState.CalcBulletCountEvent -= CalcBulletCountEvent1; + } + else + { + Role.RoleState.CalcBulletCountEvent -= CalcBulletCountEvent2; + } + } + + private void CalcBulletCountEvent1(int originCount, RefValue refValue) + { + refValue.Value += Mathf.CeilToInt(_value); + } + + private void CalcBulletCountEvent2(int originCount, RefValue refValue) + { + refValue.Value += Mathf.CeilToInt(originCount * _value); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDeviationAngle.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDeviationAngle.cs new file mode 100644 index 0000000..2a7ecf8 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDeviationAngle.cs @@ -0,0 +1,31 @@ + +[Buff("BulletDeviationAngle", + "子弹偏移角度 buff, " + + "参数‘1’为增加子弹偏移角度下限, " + + "参数‘2’为增加子弹偏移角度上限, 单位角度制, 会从上限和下限随机抽取值")] +public class Buff_BulletDeviationAngle : BuffFragment +{ + private float _min; + private float _max; + + public override void InitParam(float arg1, float arg2) + { + _min = arg1; + _max = arg2; + } + + public override void OnPickUpItem() + { + Role.RoleState.CalcBulletDeviationAngleEvent += CalcBulletDeviationAngleEvent; + } + + public override void OnRemoveItem() + { + Role.RoleState.CalcBulletDeviationAngleEvent -= CalcBulletDeviationAngleEvent; + } + + private void CalcBulletDeviationAngleEvent(float originAngle, RefValue refValue) + { + refValue.Value += Utils.Random.RandomRangeFloat(_min, _max); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDistance.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDistance.cs new file mode 100644 index 0000000..b394049 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDistance.cs @@ -0,0 +1,50 @@ + +[Buff("BulletDistance", + "子弹射程 buff, " + + "参数‘1’为射程增加类型: 1:具体射程, 2:百分比射程(小数), " + + "参数‘2’为子弹增加的射程值")] +public class Buff_BulletDistance : BuffFragment +{ + private int _type; + private float _value; + + public override void InitParam(float arg1, float arg2) + { + _type = (int)arg1; + _value = arg2; + } + + public override void OnPickUpItem() + { + if (_type == 1) + { + Role.RoleState.CalcBulletDistanceEvent += CalcBulletDistanceEvent1; + } + else + { + Role.RoleState.CalcBulletDistanceEvent += CalcBulletDistanceEvent2; + } + } + + public override void OnRemoveItem() + { + if (_type == 1) + { + Role.RoleState.CalcBulletDistanceEvent -= CalcBulletDistanceEvent1; + } + else + { + Role.RoleState.CalcBulletDistanceEvent -= CalcBulletDistanceEvent2; + } + } + + private void CalcBulletDistanceEvent1(float originDistance, RefValue distance) + { + distance.Value += _value; + } + + private void CalcBulletDistanceEvent2(float originDistance, RefValue distance) + { + distance.Value += originDistance * _value; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletPenetration.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletPenetration.cs new file mode 100644 index 0000000..89040fa --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletPenetration.cs @@ -0,0 +1,26 @@ + +[Buff("BulletPenetration", "子弹穿透次数 buff, 参数‘1’为增加的穿透次数")] +public class Buff_BulletPenetration : BuffFragment +{ + private int _value; + + public override void InitParam(float arg1) + { + _value = (int)arg1; + } + + public override void OnPickUpItem() + { + Role.RoleState.CalcBulletPenetrationEvent += CalcBulletPenetrationEvent; + } + + public override void OnRemoveItem() + { + Role.RoleState.CalcBulletPenetrationEvent -= CalcBulletPenetrationEvent; + } + + private void CalcBulletPenetrationEvent(int origin, RefValue penetration) + { + penetration.Value += _value; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletRepel.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletRepel.cs new file mode 100644 index 0000000..51e7ca7 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletRepel.cs @@ -0,0 +1,67 @@ + +using Godot; + +[Buff("BulletRepel", + "子弹击退 buff, " + + "参数‘1’为击退增加类型: 1:具体击退值, 2:百分比击退值(小数), " + + "参数‘2’为子弹增加的击退值")] +public class Buff_BulletRepel : BuffFragment +{ + private int _type; + private float _value; + public override void InitParam(float arg1, float arg2) + { + _type = (int)arg1; + _value = arg2; + } + + public override void OnPickUpItem() + { + if (_type == 1) + { + Role.RoleState.CalcBulletRepelEvent += CalcBulletRepelEvent1; + } + else + { + Role.RoleState.CalcBulletRepelEvent += CalcBulletRepelEvent2; + } + } + + public override void OnRemoveItem() + { + if (_type == 1) + { + Role.RoleState.CalcBulletRepelEvent -= CalcBulletRepelEvent1; + } + else + { + Role.RoleState.CalcBulletRepelEvent -= CalcBulletRepelEvent2; + } + } + + private void CalcBulletRepelEvent1(float originRepel, RefValue repel) + { + if (Role.WeaponPack.ActiveItem != null && Role.WeaponPack.ActiveItem.Attribute.IsMelee) + { + return; + } + repel.Value += _value; + } + + private void CalcBulletRepelEvent2(float originRepel, RefValue repel) + { + if (Role.WeaponPack.ActiveItem != null && Role.WeaponPack.ActiveItem.Attribute.IsMelee) + { + return; + } + + if (_value > 0) + { + repel.Value += originRepel * _value; + } + else + { + repel.Value = Mathf.Max(0, repel.Value + Mathf.FloorToInt(repel.Value * _value)); + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletSpeed.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletSpeed.cs new file mode 100644 index 0000000..b438e39 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletSpeed.cs @@ -0,0 +1,50 @@ + +[Buff("BulletSpeed", + "子弹速度 buff, " + + "参数‘1’为射速增加类型: 1:具体射速, 2:百分比射速(小数), " + + "参数‘2’为子弹增加的射速值")] +public class Buff_BulletSpeed : BuffFragment +{ + private int _type; + private float _value; + + public override void InitParam(float arg1, float arg2) + { + _type = (int)arg1; + _value = arg2; + } + + public override void OnPickUpItem() + { + if (_type == 1) + { + Role.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent1; + } + else + { + Role.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent2; + } + } + + public override void OnRemoveItem() + { + if (_type == 1) + { + Role.RoleState.CalcBulletSpeedEvent -= CalcBulletSpeedEvent1; + } + else + { + Role.RoleState.CalcBulletSpeedEvent -= CalcBulletSpeedEvent2; + } + } + + private void CalcBulletSpeedEvent1(float originSpeed, RefValue speed) + { + speed.Value += _value; + } + + private void CalcBulletSpeedEvent2(float originSpeed, RefValue speed) + { + speed.Value += originSpeed * _value; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_Damage.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_Damage.cs new file mode 100644 index 0000000..e5eb3c6 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_Damage.cs @@ -0,0 +1,59 @@ + +using Godot; + +[Buff("Damage", + "提升伤害buff, " + + "参数‘1’为伤害增加类型: 1:具体伤害, 2:百分比伤害(小数), " + + "参数‘2’为增益伤害值")] +public class Buff_Damage : BuffFragment +{ + private int _type; + private float _value; + + public override void InitParam(float arg1, float arg2) + { + _type = (int)arg1; + _value = arg2; + } + + public override void OnPickUpItem() + { + if (_type == 1) + { + Role.RoleState.CalcDamageEvent += CalcDamage1; + } + else + { + Role.RoleState.CalcDamageEvent += CalcDamage2; + } + } + + public override void OnRemoveItem() + { + if (_type == 1) + { + Role.RoleState.CalcDamageEvent -= CalcDamage1; + } + else + { + Role.RoleState.CalcDamageEvent -= CalcDamage2; + } + } + + private void CalcDamage1(int originDamage, RefValue refValue) + { + refValue.Value += Mathf.CeilToInt(_value); + } + + private void CalcDamage2(int originDamage, RefValue refValue) + { + if (_value > 0) + { + refValue.Value += Mathf.CeilToInt(originDamage * _value); + } + else + { + refValue.Value = Mathf.Max(1, refValue.Value + Mathf.FloorToInt(refValue.Value * _value)); + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxHp.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxHp.cs new file mode 100644 index 0000000..bb6fea6 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxHp.cs @@ -0,0 +1,30 @@ + +using System.Collections.Generic; + +[Buff("MaxHp", "血量上限 buff, 参数‘1’为血量上限值")] +public class Buff_MaxHp : BuffFragment +{ + private List _cacheId = new List(); + private int _maxHp; + + public override void InitParam(float arg1) + { + _maxHp = (int)arg1; + } + + public override void OnPickUpItem() + { + Role.MaxHp += _maxHp; + var instanceId = Role.GetInstanceId(); + if (!_cacheId.Contains(instanceId)) + { + _cacheId.Add(instanceId); + Role.Hp += _maxHp; + } + } + + public override void OnRemoveItem() + { + Role.MaxHp -= _maxHp; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxShield.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxShield.cs new file mode 100644 index 0000000..c63c816 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxShield.cs @@ -0,0 +1,30 @@ + +using System.Collections.Generic; + +[Buff("MaxShield", "护盾上限buff, 参数‘1’为护盾上限")] +public class Buff_MaxShield : BuffFragment +{ + private List _cacheId = new List(); + private int _maxShield; + + public override void InitParam(float arg1) + { + _maxShield = (int)arg1; + } + + public override void OnPickUpItem() + { + Role.MaxShield += _maxShield; + var instanceId = Role.GetInstanceId(); + if (!_cacheId.Contains(instanceId)) + { + _cacheId.Add(instanceId); + Role.Shield += _maxShield; + } + } + + public override void OnRemoveItem() + { + Role.MaxShield -= _maxShield; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_MoveSpeed.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_MoveSpeed.cs new file mode 100644 index 0000000..880ef7f --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_MoveSpeed.cs @@ -0,0 +1,25 @@ + +[Buff("MoveSpeed", "移速 buff, 参数‘1’为移动速度值")] +public class Buff_MoveSpeed : BuffFragment +{ + private float _moveSpeed; + + public override void InitParam(float arg1) + { + _moveSpeed = arg1; + } + + public override void OnPickUpItem() + { + Role.RoleState.MoveSpeed += _moveSpeed; + Role.RoleState.Acceleration += _moveSpeed * 1.4f; + Role.RoleState.Friction += _moveSpeed * 10; + } + + public override void OnRemoveItem() + { + Role.RoleState.MoveSpeed -= _moveSpeed; + Role.RoleState.Acceleration -= _moveSpeed * 1.4f; + Role.RoleState.Friction -= _moveSpeed * 10; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_OffsetInjury.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_OffsetInjury.cs new file mode 100644 index 0000000..c617952 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_OffsetInjury.cs @@ -0,0 +1,29 @@ + +[Buff("OffsetInjury", "受伤时有概率抵消伤害的buff, 参数‘1’为抵消伤害概率百分比(小数)")] +public class Buff_OffsetInjury : BuffFragment +{ + private float _value; + + public override void InitParam(float arg1) + { + _value = arg1; + } + + public override void OnPickUpItem() + { + Role.RoleState.CalcHurtDamageEvent += CalcHurtDamageEvent; + } + + public override void OnRemoveItem() + { + Role.RoleState.CalcHurtDamageEvent -= CalcHurtDamageEvent; + } + + private void CalcHurtDamageEvent(int originDamage, RefValue refValue) + { + if (refValue.Value > 0 && Utils.Random.RandomBoolean(_value)) + { + refValue.Value = 0; + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_RandomBulletSpeed.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_RandomBulletSpeed.cs new file mode 100644 index 0000000..d70518d --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_RandomBulletSpeed.cs @@ -0,0 +1,31 @@ + +[Buff("RandomBulletSpeed", + "子弹增加随机速度 buff, " + + "参数‘1’为增加子弹速度下限, " + + "参数‘2’为增加子弹速度上限, 会从上限和下限随机抽取值")] +public class Buff_RandomBulletSpeed : BuffFragment +{ + private float _min; + private float _max; + + public override void InitParam(float arg1, float arg2) + { + _min = arg1; + _max = arg2; + } + + public override void OnPickUpItem() + { + Role.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent; + } + + public override void OnRemoveItem() + { + Role.RoleState.CalcBulletSpeedEvent -= CalcBulletSpeedEvent; + } + + private void CalcBulletSpeedEvent(float originSpeed, RefValue speed) + { + speed.Value += originSpeed * Utils.Random.RandomRangeFloat(_min, _max); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_Scattering.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_Scattering.cs new file mode 100644 index 0000000..00fdc81 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_Scattering.cs @@ -0,0 +1,35 @@ + +using Godot; + +[Buff("Scattering", "提高武器精准度buff, 参数‘1’为提升的精准度百分比值(小数)")] +public class Buff_Scattering : BuffFragment +{ + private float _value; + + public override void InitParam(float arg1) + { + _value = arg1; + } + + public override void OnPickUpItem() + { + Role.RoleState.CalcStartScatteringEvent += CalcStartScatteringEvent; + Role.RoleState.CalcFinalScatteringEvent += CalcFinalScatteringEvent; + } + + public override void OnRemoveItem() + { + Role.RoleState.CalcStartScatteringEvent -= CalcStartScatteringEvent; + Role.RoleState.CalcFinalScatteringEvent -= CalcFinalScatteringEvent; + } + + private void CalcStartScatteringEvent(float originValue, RefValue refValue) + { + refValue.Value = Mathf.Max(0, refValue.Value - refValue.Value * _value); + } + + private void CalcFinalScatteringEvent(float originValue, RefValue refValue) + { + refValue.Value = Mathf.Max(0, refValue.Value - refValue.Value * _value); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_ShieldRecoveryTime.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_ShieldRecoveryTime.cs new file mode 100644 index 0000000..a70d11a --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_ShieldRecoveryTime.cs @@ -0,0 +1,21 @@ + +[Buff("ShieldRecoveryTime", "单格护盾减少的恢复时间, 参数‘1’单位: 秒")] +public class Buff_ShieldRecoveryTime : BuffFragment +{ + private float _time; + + public override void InitParam(float arg1) + { + _time = arg1; + } + + public override void OnPickUpItem() + { + Role.RoleState.ShieldRecoveryTime -= _time; + } + + public override void OnRemoveItem() + { + Role.RoleState.ShieldRecoveryTime += _time; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_WeaponCapacity.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_WeaponCapacity.cs new file mode 100644 index 0000000..fd7ef35 --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_WeaponCapacity.cs @@ -0,0 +1,21 @@ + +[Buff("WeaponCapacity", "武器背包容量 buff, 参数‘1’为武器背包增加的容量")] +public class Buff_WeaponCapacity : BuffFragment +{ + private int _value; + + public override void InitParam(float arg1) + { + _value = (int)arg1; + } + + public override void OnPickUpItem() + { + Role.WeaponPack.SetCapacity(Role.WeaponPack.Capacity + _value); + } + + public override void OnRemoveItem() + { + Role.WeaponPack.SetCapacity(Role.WeaponPack.Capacity - _value); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_WoundedInvincibleTime.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_WoundedInvincibleTime.cs new file mode 100644 index 0000000..f7184ab --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_WoundedInvincibleTime.cs @@ -0,0 +1,21 @@ + +[Buff("WoundedInvincibleTime", "延长无敌时间buff, 参数‘1’为延长时间, 单位秒")] +public class Buff_WoundedInvincibleTime : BuffFragment +{ + private float _time; + + public override void InitParam(float arg1) + { + _time = arg1; + } + + public override void OnPickUpItem() + { + Role.RoleState.WoundedInvincibleTime += _time; + } + + public override void OnRemoveItem() + { + Role.RoleState.WoundedInvincibleTime -= _time; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/camera/GameCamera.cs b/DungeonShooting_Godot/src/game/camera/GameCamera.cs index 2a4076e..d5c8833 100644 --- a/DungeonShooting_Godot/src/game/camera/GameCamera.cs +++ b/DungeonShooting_Godot/src/game/camera/GameCamera.cs @@ -67,8 +67,9 @@ private Vector2 _camPos; private Vector2 _shakeOffset = Vector2.Zero; - public ShaderMaterial _offsetShader; - + private ShaderMaterial _offsetShader; + private int lockIndex = 0; + public GameCamera() { Main = this; @@ -87,7 +88,7 @@ _Shake(newDelta); var world = World.Current; - if (world != null && _followTarget != null) + if (world != null && _followTarget != null && lockIndex <= 0) { var mousePosition = InputManager.CursorPosition; var targetPosition = _followTarget.GlobalPosition; @@ -190,6 +191,22 @@ } + /// + /// 锁住相机视角移动 + /// + public void LockCamera() + { + lockIndex++; + } + + /// + /// 解锁相机视角移动 + /// + public void UnLockCamera() + { + lockIndex--; + } + //抖动调用 private void _Shake(float delta) { diff --git a/DungeonShooting_Godot/src/game/data/BuffInfo.cs b/DungeonShooting_Godot/src/game/data/BuffInfo.cs new file mode 100644 index 0000000..08e185a --- /dev/null +++ b/DungeonShooting_Godot/src/game/data/BuffInfo.cs @@ -0,0 +1,45 @@ + +using System; +using System.Collections.Generic; + +/// +/// buff 属性数据 +/// +public class BuffInfo +{ + /// + /// buff 名称 + /// + public string Name; + + /// + /// buff 描述 + /// + public string Description; + + /// + /// buff 可传参数 + /// + public List Params; + + /// + /// buff 类 + /// + public Type Type; + + public BuffInfo(string name, string description, Type type) + { + Name = name; + Description = description; + Type = type; + Params = new List(); + } + + public BuffInfo(string name, string description, List paramsList, Type type) + { + Name = name; + Description = description; + Params = paramsList; + Type = type; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/event/EventEnum.cs b/DungeonShooting_Godot/src/game/event/EventEnum.cs index afe09d8..dd3a2b6 100644 --- a/DungeonShooting_Godot/src/game/event/EventEnum.cs +++ b/DungeonShooting_Godot/src/game/event/EventEnum.cs @@ -59,11 +59,11 @@ /// OnPlayerRemoveWeapon, /// - /// 玩家拾起道具, 参数为 + /// 玩家拾起道具, 参数为 /// OnPlayerPickUpProp, /// - /// 玩家丢弃道具, 参数为 + /// 玩家丢弃道具, 参数为 /// OnPlayerRemoveProp, diff --git a/DungeonShooting_Godot/src/game/manager/BuffRegister.cs b/DungeonShooting_Godot/src/game/manager/BuffRegister.cs new file mode 100644 index 0000000..22bfa72 --- /dev/null +++ b/DungeonShooting_Godot/src/game/manager/BuffRegister.cs @@ -0,0 +1,37 @@ +using System.Collections.Generic; +/// +/// buff 注册类, 调用 Init() 函数初始化数据 +/// 注意: 该类为 Tools 面板下自动生成的, 请不要手动编辑! +/// +public class BuffRegister +{ + /// + /// 所有 buff 信息 + /// + public static Dictionary BuffInfos { get; private set; } + /// + /// 初始化 buff + /// + public static void Init() + { + BuffInfos = new Dictionary(); + BuffInfos.Add("ActivePropsCapacity", new BuffInfo("ActivePropsCapacity", null, new List() { 1 }, typeof(Buff_ActivePropsCapacity))); + BuffInfos.Add("BulletBounceCount", new BuffInfo("BulletBounceCount", null, new List() { 1 }, typeof(Buff_BulletBounceCount))); + BuffInfos.Add("BulletCount", new BuffInfo("BulletCount", null, new List() { 2 }, typeof(Buff_BulletCount))); + BuffInfos.Add("BulletDeviationAngle", new BuffInfo("BulletDeviationAngle", null, new List() { 2 }, typeof(Buff_BulletDeviationAngle))); + BuffInfos.Add("BulletDistance", new BuffInfo("BulletDistance", null, new List() { 2 }, typeof(Buff_BulletDistance))); + BuffInfos.Add("BulletPenetration", new BuffInfo("BulletPenetration", null, new List() { 1 }, typeof(Buff_BulletPenetration))); + BuffInfos.Add("BulletRepel", new BuffInfo("BulletRepel", null, new List() { 2 }, typeof(Buff_BulletRepel))); + BuffInfos.Add("BulletSpeed", new BuffInfo("BulletSpeed", null, new List() { 2 }, typeof(Buff_BulletSpeed))); + BuffInfos.Add("Damage", new BuffInfo("Damage", null, new List() { 2 }, typeof(Buff_Damage))); + BuffInfos.Add("MaxHp", new BuffInfo("MaxHp", null, new List() { 1 }, typeof(Buff_MaxHp))); + BuffInfos.Add("MaxShield", new BuffInfo("MaxShield", null, new List() { 1 }, typeof(Buff_MaxShield))); + BuffInfos.Add("MoveSpeed", new BuffInfo("MoveSpeed", null, new List() { 1 }, typeof(Buff_MoveSpeed))); + BuffInfos.Add("OffsetInjury", new BuffInfo("OffsetInjury", null, new List() { 1 }, typeof(Buff_OffsetInjury))); + BuffInfos.Add("RandomBulletSpeed", new BuffInfo("RandomBulletSpeed", null, new List() { 2 }, typeof(Buff_RandomBulletSpeed))); + BuffInfos.Add("Scattering", new BuffInfo("Scattering", null, new List() { 1 }, typeof(Buff_Scattering))); + BuffInfos.Add("ShieldRecoveryTime", new BuffInfo("ShieldRecoveryTime", null, new List() { 1 }, typeof(Buff_ShieldRecoveryTime))); + BuffInfos.Add("WeaponCapacity", new BuffInfo("WeaponCapacity", null, new List() { 1 }, typeof(Buff_WeaponCapacity))); + BuffInfos.Add("WoundedInvincibleTime", new BuffInfo("WoundedInvincibleTime", null, new List() { 1 }, typeof(Buff_WoundedInvincibleTime))); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 091e957..2eef041 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -299,6 +299,14 @@ public const string resource_sprite_ui_sursors_CursorCenter_png = "res://resource/sprite/ui/sursors/CursorCenter.png"; public const string resource_sprite_ui_sursors_Cursors_png = "res://resource/sprite/ui/sursors/Cursors.png"; public const string resource_sprite_ui_sursors_Cursors_Ui_png = "res://resource/sprite/ui/sursors/Cursors_Ui.png"; + public const string resource_sprite_ui_encyclopedia_TitleBg_png = "res://resource/sprite/ui/encyclopedia/TitleBg.png"; + public const string resource_sprite_ui_encyclopedia_Panel2_png = "res://resource/sprite/ui/encyclopedia/Panel2.png"; + public const string resource_sprite_ui_encyclopedia_Tab_png = "res://resource/sprite/ui/encyclopedia/Tab.png"; + public const string resource_sprite_ui_encyclopedia_Panel_png = "res://resource/sprite/ui/encyclopedia/Panel.png"; + public const string resource_sprite_ui_encyclopedia_Item_png = "res://resource/sprite/ui/encyclopedia/Item.png"; + public const string resource_sprite_ui_encyclopedia_TabSelect_png = "res://resource/sprite/ui/encyclopedia/TabSelect.png"; + public const string resource_sprite_ui_encyclopedia_Select_png = "res://resource/sprite/ui/encyclopedia/Select.png"; + public const string resource_sprite_ui_encyclopedia_TabIcon1_png = "res://resource/sprite/ui/encyclopedia/TabIcon1.png"; public const string resource_sprite_ui_mapEditorTools_DoorDragButton_png = "res://resource/sprite/ui/mapEditorTools/DoorDragButton.png"; public const string resource_sprite_ui_mapEditorTools_DoorDragButton_hover_png = "res://resource/sprite/ui/mapEditorTools/DoorDragButton_hover.png"; public const string resource_sprite_ui_mapEditorTools_DoorDragButton_down_png = "res://resource/sprite/ui/mapEditorTools/DoorDragButton_down.png"; diff --git a/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs b/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs index ea4d712..ac640c4 100644 --- a/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs +++ b/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs @@ -289,7 +289,7 @@ } /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7.Label + /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Label /// public class Label_4 : UiNode { @@ -298,7 +298,7 @@ } /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7.Button + /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Button /// public class Button_4 : UiNode { @@ -307,9 +307,9 @@ } /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7 + /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6 /// - public class HBoxContainer7 : UiNode + public class HBoxContainer6 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label @@ -337,12 +337,12 @@ } private Button_4 _L_Button; - public HBoxContainer7(EditorToolsPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } - public override HBoxContainer7 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + public HBoxContainer6(EditorToolsPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer6 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer8.Label + /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7.Label /// public class Label_5 : UiNode { @@ -351,7 +351,7 @@ } /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer8.Button + /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7.Button /// public class Button_5 : UiNode { @@ -360,9 +360,9 @@ } /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer8 + /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7 /// - public class HBoxContainer8 : UiNode + public class HBoxContainer7 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label @@ -390,6 +390,59 @@ } private Button_5 _L_Button; + public HBoxContainer7(EditorToolsPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer7 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer8.Label + /// + public class Label_6 : UiNode + { + public Label_6(EditorToolsPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label_6 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer8.Button + /// + public class Button_6 : UiNode + { + public Button_6(EditorToolsPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Button_6 Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer8 + /// + public class HBoxContainer8 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label + /// + public Label_6 L_Label + { + get + { + if (_L_Label == null) _L_Label = new Label_6(UiPanel, Instance.GetNode("Label")); + return _L_Label; + } + } + private Label_6 _L_Label; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Button + /// + public Button_6 L_Button + { + get + { + if (_L_Button == null) _L_Button = new Button_6(UiPanel, Instance.GetNode("Button")); + return _L_Button; + } + } + private Button_6 _L_Button; + public HBoxContainer8(EditorToolsPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } public override HBoxContainer8 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } @@ -452,6 +505,19 @@ private HBoxContainer5 _L_HBoxContainer5; /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer6 + /// + public HBoxContainer6 L_HBoxContainer6 + { + get + { + if (_L_HBoxContainer6 == null) _L_HBoxContainer6 = new HBoxContainer6(UiPanel, Instance.GetNode("HBoxContainer6")); + return _L_HBoxContainer6; + } + } + private HBoxContainer6 _L_HBoxContainer6; + + /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer7 /// public HBoxContainer7 L_HBoxContainer7 @@ -570,6 +636,11 @@ public HBoxContainer5 S_HBoxContainer5 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer5; /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6 + /// + public HBoxContainer6 S_HBoxContainer6 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer6; + + /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7 /// public HBoxContainer7 S_HBoxContainer7 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer7; diff --git a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs index c63e847..600cc68 100644 --- a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs @@ -1,6 +1,8 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Reflection; using System.Text.RegularExpressions; using Godot; using Environment = System.Environment; @@ -57,6 +59,8 @@ container.L_HBoxContainer3.L_Button.Instance.Pressed += OnCreateUI; //重新生成UiManagerMethods.cs代码 container.L_HBoxContainer5.L_Button.Instance.Pressed += GenerateUiManagerMethods; + //生成buff属性表 + container.L_HBoxContainer6.L_Button.Instance.Pressed += GenerateBuffAttrTable; //导出excel表 container.L_HBoxContainer7.L_Button.Instance.Pressed += ExportExcel; //打开excel表文件夹 @@ -78,6 +82,7 @@ container.L_HBoxContainer4.L_Button.Instance.Pressed -= OnGenerateCurrentUiCode; container.L_HBoxContainer3.L_Button.Instance.Pressed -= OnCreateUI; container.L_HBoxContainer5.L_Button.Instance.Pressed -= GenerateUiManagerMethods; + container.L_HBoxContainer6.L_Button.Instance.Pressed -= GenerateBuffAttrTable; container.L_HBoxContainer7.L_Button.Instance.Pressed -= ExportExcel; container.L_HBoxContainer8.L_Button.Instance.Pressed -= OpenExportExcelFolder; } @@ -297,6 +302,21 @@ ShowTips("错误", "生成UiManagerMethods.cs代码执行失败! 前往控制台查看错误日志!"); } } + + /// + /// 生成Buff属性表 + /// + private void GenerateBuffAttrTable() + { + if (BuffGenerator.Generate()) + { + ShowTips("提示", "Buff属性表生成完成!"); + } + else + { + ShowTips("错误", "uff属性表生成失败! 前往控制台查看错误日志!"); + } + } /// /// 导出excel表 diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs index 806f085..91d3480 100644 --- a/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs +++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs @@ -6,17 +6,30 @@ public abstract partial class Encyclopedia : UiBase { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2 + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.ColorRect /// - public Panel2 L_Panel2 + public ColorRect L_ColorRect { get { - if (_L_Panel2 == null) _L_Panel2 = new Panel2((EncyclopediaPanel)this, GetNode("Panel2")); - return _L_Panel2; + if (_L_ColorRect == null) _L_ColorRect = new ColorRect((EncyclopediaPanel)this, GetNode("ColorRect")); + return _L_ColorRect; } } - private Panel2 _L_Panel2; + private ColorRect _L_ColorRect; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect + /// + public NinePatchRect L_NinePatchRect + { + get + { + if (_L_NinePatchRect == null) _L_NinePatchRect = new NinePatchRect((EncyclopediaPanel)this, GetNode("NinePatchRect")); + return _L_NinePatchRect; + } + } + private NinePatchRect _L_NinePatchRect; public Encyclopedia() : base(nameof(Encyclopedia)) @@ -29,82 +42,109 @@ } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer.LineEdit + /// 类型: , 路径: Encyclopedia.ColorRect /// - public class LineEdit : UiNode + public class ColorRect : UiNode { - public LineEdit(EncyclopediaPanel uiPanel, Godot.LineEdit node) : base(uiPanel, node) { } - public override LineEdit Clone() => new (UiPanel, (Godot.LineEdit)Instance.Duplicate()); + public ColorRect(EncyclopediaPanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override ColorRect Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer.Search + /// 类型: , 路径: Encyclopedia.NinePatchRect.TextureRect.Label /// - public class Search : UiNode + public class Label : UiNode { - public Search(EncyclopediaPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override Search Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public Label(EncyclopediaPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer + /// 类型: , 路径: Encyclopedia.NinePatchRect.TextureRect /// - public class HBoxContainer : UiNode + public class TextureRect : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.LineEdit + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.Label /// - public LineEdit L_LineEdit + public Label L_Label { get { - if (_L_LineEdit == null) _L_LineEdit = new LineEdit(UiPanel, Instance.GetNode("LineEdit")); - return _L_LineEdit; + if (_L_Label == null) _L_Label = new Label(UiPanel, Instance.GetNode("Label")); + return _L_Label; } } - private LineEdit _L_LineEdit; + private Label _L_Label; - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.Search - /// - public Search L_Search - { - get - { - if (_L_Search == null) _L_Search = new Search(UiPanel, Instance.GetNode("Search")); - return _L_Search; - } - } - private Search _L_Search; - - public HBoxContainer(EncyclopediaPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } - public override HBoxContainer Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + public TextureRect(EncyclopediaPanel uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override TextureRect Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.Control.TabButton.Icon /// - public class MarginContainer_1 : UiNode + public class Icon : UiNode + { + public Icon(EncyclopediaPanel uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override Icon Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.Control.TabButton + /// + public class TabButton : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.HBoxContainer + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.Control.Icon /// - public HBoxContainer L_HBoxContainer + public Icon L_Icon { get { - if (_L_HBoxContainer == null) _L_HBoxContainer = new HBoxContainer(UiPanel, Instance.GetNode("HBoxContainer")); - return _L_HBoxContainer; + if (_L_Icon == null) _L_Icon = new Icon(UiPanel, Instance.GetNode("Icon")); + return _L_Icon; } } - private HBoxContainer _L_HBoxContainer; + private Icon _L_Icon; - public MarginContainer_1(EncyclopediaPanel uiPanel, Godot.MarginContainer node) : base(uiPanel, node) { } - public override MarginContainer_1 Clone() => new (UiPanel, (Godot.MarginContainer)Instance.Duplicate()); + public TabButton(EncyclopediaPanel uiPanel, Godot.TextureButton node) : base(uiPanel, node) { } + public override TabButton Clone() => new (UiPanel, (Godot.TextureButton)Instance.Duplicate()); } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.PreviewImage + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.Control + /// + public class Control : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.TabButton + /// + public TabButton L_TabButton + { + get + { + if (_L_TabButton == null) _L_TabButton = new TabButton(UiPanel, Instance.GetNode("TabButton")); + return _L_TabButton; + } + } + private TabButton _L_TabButton; + + public Control(EncyclopediaPanel uiPanel, Godot.Control node) : base(uiPanel, node) { } + public override Control Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton.Bg + /// + public class Bg : UiNode + { + public Bg(EncyclopediaPanel uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override Bg Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton.PreviewImage /// public class PreviewImage : UiNode { @@ -113,16 +153,7 @@ } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.ObjectName - /// - public class ObjectName : UiNode - { - public ObjectName(EncyclopediaPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override ObjectName Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.Select + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton.Select /// public class Select : UiNode { @@ -131,12 +162,25 @@ } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton /// - public class ObjectButton : UiNode + public class ObjectButton : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.PreviewImage + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.Bg + /// + public Bg L_Bg + { + get + { + if (_L_Bg == null) _L_Bg = new Bg(UiPanel, Instance.GetNode("Bg")); + return _L_Bg; + } + } + private Bg _L_Bg; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.PreviewImage /// public PreviewImage L_PreviewImage { @@ -149,20 +193,7 @@ private PreviewImage _L_PreviewImage; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectName - /// - public ObjectName L_ObjectName - { - get - { - if (_L_ObjectName == null) _L_ObjectName = new ObjectName(UiPanel, Instance.GetNode("ObjectName")); - return _L_ObjectName; - } - } - private ObjectName _L_ObjectName; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.Select + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.Select /// public Select L_Select { @@ -174,23 +205,23 @@ } private Select _L_Select; - public ObjectButton(EncyclopediaPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override ObjectButton Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public ObjectButton(EncyclopediaPanel uiPanel, Godot.TextureButton node) : base(uiPanel, node) { } + public override ObjectButton Clone() => new (UiPanel, (Godot.TextureButton)Instance.Duplicate()); } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer /// public class ScrollContainer : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ObjectButton + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ObjectButton /// public ObjectButton L_ObjectButton { get { - if (_L_ObjectButton == null) _L_ObjectButton = new ObjectButton(UiPanel, Instance.GetNode("ObjectButton")); + if (_L_ObjectButton == null) _L_ObjectButton = new ObjectButton(UiPanel, Instance.GetNode("ObjectButton")); return _L_ObjectButton; } } @@ -201,25 +232,12 @@ } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2 + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect /// - public class VBoxContainer2 : UiNode + public class NinePatchRect_1 : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.MarginContainer - /// - public MarginContainer_1 L_MarginContainer - { - get - { - if (_L_MarginContainer == null) _L_MarginContainer = new MarginContainer_1(UiPanel, Instance.GetNode("MarginContainer")); - return _L_MarginContainer; - } - } - private MarginContainer_1 _L_MarginContainer; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.ScrollContainer + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.ScrollContainer /// public ScrollContainer L_ScrollContainer { @@ -231,17 +249,193 @@ } private ScrollContainer _L_ScrollContainer; + public NinePatchRect_1(EncyclopediaPanel uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override NinePatchRect_1 Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2 + /// + public class VBoxContainer2 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.Control + /// + public Control L_Control + { + get + { + if (_L_Control == null) _L_Control = new Control(UiPanel, Instance.GetNode("Control")); + return _L_Control; + } + } + private Control _L_Control; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.NinePatchRect + /// + public NinePatchRect_1 L_NinePatchRect + { + get + { + if (_L_NinePatchRect == null) _L_NinePatchRect = new NinePatchRect_1(UiPanel, Instance.GetNode("NinePatchRect")); + return _L_NinePatchRect; + } + } + private NinePatchRect_1 _L_NinePatchRect; + public VBoxContainer2(EncyclopediaPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } public override VBoxContainer2 Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); } /// - /// 类型: , 路径: Encyclopedia.Panel2.MarginContainer + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemName /// - public class MarginContainer : UiNode + public class ItemName : UiNode + { + public ItemName(EncyclopediaPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override ItemName Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.NinePatchRect.ItemTexture + /// + public class ItemTexture : UiNode + { + public ItemTexture(EncyclopediaPanel uiPanel, Godot.TextureRect node) : base(uiPanel, node) { } + public override ItemTexture Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.NinePatchRect + /// + public class NinePatchRect_3 : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Panel2.VBoxContainer2 + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemTexture + /// + public ItemTexture L_ItemTexture + { + get + { + if (_L_ItemTexture == null) _L_ItemTexture = new ItemTexture(UiPanel, Instance.GetNode("ItemTexture")); + return _L_ItemTexture; + } + } + private ItemTexture _L_ItemTexture; + + public NinePatchRect_3(EncyclopediaPanel uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override NinePatchRect_3 Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemDes + /// + public class ItemDes : UiNode + { + public ItemDes(EncyclopediaPanel uiPanel, Godot.RichTextLabel node) : base(uiPanel, node) { } + public override ItemDes Clone() => new (UiPanel, (Godot.RichTextLabel)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg + /// + public class ItemInfoBg : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemName + /// + public ItemName L_ItemName + { + get + { + if (_L_ItemName == null) _L_ItemName = new ItemName(UiPanel, Instance.GetNode("ItemName")); + return _L_ItemName; + } + } + private ItemName _L_ItemName; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.NinePatchRect + /// + public NinePatchRect_3 L_NinePatchRect + { + get + { + if (_L_NinePatchRect == null) _L_NinePatchRect = new NinePatchRect_3(UiPanel, Instance.GetNode("NinePatchRect")); + return _L_NinePatchRect; + } + } + private NinePatchRect_3 _L_NinePatchRect; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemDes + /// + public ItemDes L_ItemDes + { + get + { + if (_L_ItemDes == null) _L_ItemDes = new ItemDes(UiPanel, Instance.GetNode("ItemDes")); + return _L_ItemDes; + } + } + private ItemDes _L_ItemDes; + + public ItemInfoBg(EncyclopediaPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override ItemInfoBg Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect + /// + public class NinePatchRect_2 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.ItemInfoBg + /// + public ItemInfoBg L_ItemInfoBg + { + get + { + if (_L_ItemInfoBg == null) _L_ItemInfoBg = new ItemInfoBg(UiPanel, Instance.GetNode("ItemInfoBg")); + return _L_ItemInfoBg; + } + } + private ItemInfoBg _L_ItemInfoBg; + + public NinePatchRect_2(EncyclopediaPanel uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override NinePatchRect_2 Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3 + /// + public class VBoxContainer3 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.NinePatchRect + /// + public NinePatchRect_2 L_NinePatchRect + { + get + { + if (_L_NinePatchRect == null) _L_NinePatchRect = new NinePatchRect_2(UiPanel, Instance.GetNode("NinePatchRect")); + return _L_NinePatchRect; + } + } + private NinePatchRect_2 _L_NinePatchRect; + + public VBoxContainer3(EncyclopediaPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override VBoxContainer3 Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer + /// + public class HBoxContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.VBoxContainer2 /// public VBoxContainer2 L_VBoxContainer2 { @@ -253,15 +447,72 @@ } private VBoxContainer2 _L_VBoxContainer2; + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.VBoxContainer3 + /// + public VBoxContainer3 L_VBoxContainer3 + { + get + { + if (_L_VBoxContainer3 == null) _L_VBoxContainer3 = new VBoxContainer3(UiPanel, Instance.GetNode("VBoxContainer3")); + return _L_VBoxContainer3; + } + } + private VBoxContainer3 _L_VBoxContainer3; + + public HBoxContainer(EncyclopediaPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer + /// + public class MarginContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.HBoxContainer + /// + public HBoxContainer L_HBoxContainer + { + get + { + if (_L_HBoxContainer == null) _L_HBoxContainer = new HBoxContainer(UiPanel, Instance.GetNode("HBoxContainer")); + return _L_HBoxContainer; + } + } + private HBoxContainer _L_HBoxContainer; + public MarginContainer(EncyclopediaPanel uiPanel, Godot.MarginContainer node) : base(uiPanel, node) { } public override MarginContainer Clone() => new (UiPanel, (Godot.MarginContainer)Instance.Duplicate()); } /// - /// 类型: , 路径: Encyclopedia.Panel2 + /// 类型: , 路径: Encyclopedia.NinePatchRect.CloseButton /// - public class Panel2 : UiNode + public class CloseButton : UiNode { + public CloseButton(EncyclopediaPanel uiPanel, Godot.TextureButton node) : base(uiPanel, node) { } + public override CloseButton Clone() => new (UiPanel, (Godot.TextureButton)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect + /// + public class NinePatchRect : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.TextureRect + /// + public TextureRect L_TextureRect + { + get + { + if (_L_TextureRect == null) _L_TextureRect = new TextureRect(UiPanel, Instance.GetNode("TextureRect")); + return _L_TextureRect; + } + } + private TextureRect _L_TextureRect; + /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.MarginContainer /// @@ -275,59 +526,122 @@ } private MarginContainer _L_MarginContainer; - public Panel2(EncyclopediaPanel uiPanel, Godot.Panel node) : base(uiPanel, node) { } - public override Panel2 Clone() => new (UiPanel, (Godot.Panel)Instance.Duplicate()); + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.CloseButton + /// + public CloseButton L_CloseButton + { + get + { + if (_L_CloseButton == null) _L_CloseButton = new CloseButton(UiPanel, Instance.GetNode("CloseButton")); + return _L_CloseButton; + } + } + private CloseButton _L_CloseButton; + + public NinePatchRect(EncyclopediaPanel uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override NinePatchRect Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); } /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer.LineEdit + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.ColorRect /// - public LineEdit S_LineEdit => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_MarginContainer.L_HBoxContainer.L_LineEdit; + public ColorRect S_ColorRect => L_ColorRect; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer.Search + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.TextureRect.Label /// - public Search S_Search => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_MarginContainer.L_HBoxContainer.L_Search; + public Label S_Label => L_NinePatchRect.L_TextureRect.L_Label; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.MarginContainer.HBoxContainer + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.TextureRect /// - public HBoxContainer S_HBoxContainer => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_MarginContainer.L_HBoxContainer; + public TextureRect S_TextureRect => L_NinePatchRect.L_TextureRect; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.PreviewImage + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.Control.TabButton.Icon /// - public PreviewImage S_PreviewImage => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer.L_ObjectButton.L_PreviewImage; + public Icon S_Icon => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2.L_Control.L_TabButton.L_Icon; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.ObjectName + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.Control.TabButton /// - public ObjectName S_ObjectName => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer.L_ObjectButton.L_ObjectName; + public TabButton S_TabButton => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2.L_Control.L_TabButton; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton.Select + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.Control /// - public Select S_Select => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer.L_ObjectButton.L_Select; + public Control S_Control => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2.L_Control; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer.ObjectButton + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton.Bg /// - public ObjectButton S_ObjectButton => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer.L_ObjectButton; + public Bg S_Bg => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2.L_NinePatchRect.L_ScrollContainer.L_ObjectButton.L_Bg; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2.ScrollContainer + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton.PreviewImage /// - public ScrollContainer S_ScrollContainer => L_Panel2.L_MarginContainer.L_VBoxContainer2.L_ScrollContainer; + public PreviewImage S_PreviewImage => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2.L_NinePatchRect.L_ScrollContainer.L_ObjectButton.L_PreviewImage; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2.MarginContainer.VBoxContainer2 + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton.Select /// - public VBoxContainer2 S_VBoxContainer2 => L_Panel2.L_MarginContainer.L_VBoxContainer2; + public Select S_Select => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2.L_NinePatchRect.L_ScrollContainer.L_ObjectButton.L_Select; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Panel2 + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton /// - public Panel2 S_Panel2 => L_Panel2; + public ObjectButton S_ObjectButton => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2.L_NinePatchRect.L_ScrollContainer.L_ObjectButton; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer + /// + public ScrollContainer S_ScrollContainer => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2.L_NinePatchRect.L_ScrollContainer; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2 + /// + public VBoxContainer2 S_VBoxContainer2 => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemName + /// + public ItemName S_ItemName => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_ItemInfoBg.L_ItemName; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.NinePatchRect.ItemTexture + /// + public ItemTexture S_ItemTexture => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_ItemInfoBg.L_NinePatchRect.L_ItemTexture; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemDes + /// + public ItemDes S_ItemDes => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_ItemInfoBg.L_ItemDes; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg + /// + public ItemInfoBg S_ItemInfoBg => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_ItemInfoBg; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3 + /// + public VBoxContainer3 S_VBoxContainer3 => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer + /// + public HBoxContainer S_HBoxContainer => L_NinePatchRect.L_MarginContainer.L_HBoxContainer; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer + /// + public MarginContainer S_MarginContainer => L_NinePatchRect.L_MarginContainer; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.CloseButton + /// + public CloseButton S_CloseButton => L_NinePatchRect.L_CloseButton; } diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs index 06c3005..f106ca2 100644 --- a/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs @@ -1,18 +1,108 @@ +using System.Linq; +using Config; using Godot; namespace UI.Encyclopedia; public partial class EncyclopediaPanel : Encyclopedia { + //tab网格 + private UiGrid _tab; + //item网格 + private UiGrid _grid; + //private long _id; public override void OnCreateUi() { + S_CloseButton.Instance.Pressed += OnCloseClick; + _tab = CreateUiGrid(S_TabButton); + _tab.SetColumns(10); + _tab.SetCellOffset(new Vector2I(0, 0)); + _tab.Add(new TabData(ResourcePath.resource_sprite_ui_encyclopedia_TabIcon1_png, ActivityType.Weapon)); + _tab.Add(new TabData(ResourcePath.resource_sprite_ui_encyclopedia_TabIcon1_png, ActivityType.Prop)); + _tab.Add(new TabData(ResourcePath.resource_sprite_ui_encyclopedia_TabIcon1_png, ActivityType.Enemy)); + + _grid = CreateUiGrid(S_ObjectButton); + _grid.SetHorizontalExpand(true); + _grid.SetAutoColumns(true); + _grid.SetCellOffset(new Vector2I(10, 10)); + + _tab.SelectIndex = 0; + } + + public override void OnShowUi() + { + GameCamera.Main.LockCamera(); + } + + public override void OnHideUi() + { + GameCamera.Main.UnLockCamera(); } public override void OnDestroyUi() { } + + public override void Process(float delta) + { + if (Input.IsActionJustPressed("ui_cancel")) + { + OnCloseClick(); + } + } + + /// + /// 设置选中的tab + /// + public void SelectTab(ActivityType type) + { + // StopCoroutine(_id); + // _id = StartCoroutine( + // _grid.SetDataListCoroutine( + // ExcelConfig.ActivityBase_List.Where(data => data.Type == type).ToArray() + // ) + // ); + _grid.SetDataList( + ExcelConfig.ActivityBase_List.Where(data => data.Type == type).ToArray() + ); + SelectItem(null); + } + + /// + /// 设置选中的物体 + /// + public void SelectItem(ExcelConfig.ActivityBase config) + { + if (config != null) + { + S_ItemInfoBg.Instance.Visible = true; + S_ItemName.Instance.Text = config.Name; + S_ItemTexture.Instance.Texture = ResourceManager.LoadTexture2D(config.Icon); + S_ItemDes.Instance.Text = config.Intro; + //S_ItemDes.Instance.Text = config.Details; + } + else + { + S_ItemInfoBg.Instance.Visible = false; + S_ItemName.Instance.Text = null; + S_ItemTexture.Instance.Texture = null; + S_ItemDes.Instance.Text = null; + } + } + + private void OnCloseClick() + { + if (PrevUi != null) + { + OpenPrevUi(); + } + else + { + Destroy(); + } + } } diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/ItemCell.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/ItemCell.cs new file mode 100644 index 0000000..4173ac7 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/ItemCell.cs @@ -0,0 +1,39 @@ +using System.Collections; +using Config; + +namespace UI.Encyclopedia; + +public class ItemCell : UiCell +{ + public override void OnInit() + { + CellNode.L_Select.Instance.Visible = false; + } + + public override void OnSetData(ExcelConfig.ActivityBase data) + { + CellNode.L_PreviewImage.Instance.Texture = ResourceManager.LoadTexture2D(data.Icon); + } + + public override IEnumerator OnSetDataCoroutine(ExcelConfig.ActivityBase data) + { + CellNode.L_PreviewImage.Instance.Texture = ResourceManager.LoadTexture2D(data.Icon); + yield break; + } + + public override void OnDisable() + { + CellNode.L_PreviewImage.Instance.Texture = null; + } + + public override void OnSelect() + { + CellNode.L_Select.Instance.Visible = true; + CellNode.UiPanel.SelectItem(Data); + } + + public override void OnUnSelect() + { + CellNode.L_Select.Instance.Visible = false; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/TabCell.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/TabCell.cs new file mode 100644 index 0000000..bda34ac --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/TabCell.cs @@ -0,0 +1,54 @@ +using Godot; + +namespace UI.Encyclopedia; + +public class TabCell : UiCell +{ + //选中时页签显示的纹理 + private const string SelectTexture = ResourcePath.resource_sprite_ui_encyclopedia_TabSelect_png; + private static Texture2D _selectTexture; + + private static Texture2D GetSelectTexture() + { + if (_selectTexture == null) + { + _selectTexture = ResourceManager.LoadTexture2D(SelectTexture); + } + + return _selectTexture; + } + + + private float _startY; + private Texture2D _originTexture; + + public override void OnInit() + { + _originTexture = CellNode.Instance.TextureNormal; + } + + public override void OnSetData(TabData data) + { + CellNode.L_Icon.Instance.Texture = ResourceManager.LoadTexture2D(data.Icon); + var position = CellNode.L_Icon.Instance.Position; + _startY = position.Y; + } + + public override void OnClick() + { + Grid.SelectIndex = Index; + } + + public override void OnSelect() + { + CellNode.Instance.TextureNormal = GetSelectTexture(); + CellNode.L_Icon.Instance.Position = new Vector2(CellNode.L_Icon.Instance.Position.X, _startY - 12); + CellNode.UiPanel.SelectTab(Data.Type); + } + + public override void OnUnSelect() + { + CellNode.Instance.TextureNormal = _originTexture; + CellNode.L_Icon.Instance.Position = new Vector2(CellNode.L_Icon.Instance.Position.X, _startY); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/TabData.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/TabData.cs new file mode 100644 index 0000000..75c0884 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/TabData.cs @@ -0,0 +1,19 @@ +namespace UI.Encyclopedia; + +public class TabData +{ + /// + /// 图标 + /// + public string Icon; + /// + /// 物体类型 + /// + public ActivityType Type; + + public TabData(string icon, ActivityType type) + { + Icon = icon; + Type = type; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs index 638b735..f53ef8e 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs @@ -430,7 +430,7 @@ //为了引用不变, 所以这里使用克隆数据 dataMarkInfo.CloneFrom(mark); //刷新 Cell - markCell.SetData(markCell.Data); + markCell.UpdateData(markCell.Data); //执行排序 markCell.Grid.Sort(); EventManager.EmitEvent(EventEnum.OnEditMark, dataMarkInfo); diff --git a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs index 0328541..12750a2 100644 --- a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs @@ -26,6 +26,16 @@ S_Restart.Instance.Visible = false; } } + + public override void OnShowUi() + { + GameCamera.Main.LockCamera(); + } + + public override void OnHideUi() + { + GameCamera.Main.UnLockCamera(); + } public override void Process(float delta) { diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs index 466618c..893e742 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs @@ -73,7 +73,7 @@ //玩家拾起道具, 弹出提示 private void OnPlayerPickUpProp(object propObj) { - var prop = (Prop)propObj; + var prop = (PropActivity)propObj; var message = $"{prop.ActivityBase.Name}\n{prop.ActivityBase.Intro}"; BottomTipsPanel.ShowTips(prop.GetDefaultTexture(), message); } diff --git a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs index 3dda271..9810361 100644 --- a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs +++ b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs @@ -81,7 +81,7 @@ if (uiCell != null && !uiCell.Data) { _useMask.Add(cell); - uiCell.SetData(true); + uiCell.UpdateData(true); EventManager.EmitEvent(EventEnum.OnSelectCombinationCell, cell); } @@ -100,7 +100,7 @@ if (uiCell != null && uiCell.Data) { _useMask.Remove(cell); - uiCell.SetData(false); + uiCell.UpdateData(false); EventManager.EmitEvent(EventEnum.OnRemoveCombinationCell, cell); } @@ -119,7 +119,7 @@ var uiCell = _maskGrid.GetCell(i); if (uiCell.Data) { - uiCell.SetData(false); + uiCell.UpdateData(false); } } diff --git a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/right/TileSelected.cs b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/right/TileSelected.cs index 5d546e2..18cf1d5 100644 --- a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/right/TileSelected.cs +++ b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/right/TileSelected.cs @@ -65,7 +65,7 @@ var uiCell = Grid.Find(c => c.Data.CombinationInfo.Id == data.CombinationInfo.Id); if (uiCell != null) { - uiCell.SetData(data); + uiCell.UpdateData(data); } EventManager.EmitEvent(EventEnum.OnTileSetDirty); }