diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx new file mode 100644 index 0000000..dba30a6 --- /dev/null +++ b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Role.xlsx b/DungeonShooting_Godot/excel/excelFile/Role.xlsx deleted file mode 100644 index 778ef30..0000000 --- a/DungeonShooting_Godot/excel/excelFile/Role.xlsx +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx index 2a92072..888248b 100644 --- a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx Binary files differ diff --git a/DungeonShooting_Godot/prefab/role/Player.tscn b/DungeonShooting_Godot/prefab/role/Player.tscn index 1e1804f..6e091b3 100644 --- a/DungeonShooting_Godot/prefab/role/Player.tscn +++ b/DungeonShooting_Godot/prefab/role/Player.tscn @@ -1,71 +1,72 @@ -[gd_scene load_steps=20 format=3 uid="uid://cp2uhtlb6h7k2"] +[gd_scene load_steps=24 format=3 uid="uid://cp2uhtlb6h7k2"] -[ext_resource type="PackedScene" uid="uid://cyrcv2jdgr8cf" path="res://prefab/role/Role.tscn" id="1_4vjqs"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_dgp5f"] -[ext_resource type="Texture2D" uid="uid://bhwhhg2dfsr26" path="res://resource/sprite/role/role2.png" id="3_i2g22"] +[ext_resource type="Script" path="res://src/game/role/Player.cs" id="1_sq1r0"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_v6n5s"] +[ext_resource type="Texture2D" uid="uid://bhwhhg2dfsr26" path="res://resource/sprite/role/role2.png" id="3_vci0q"] +[ext_resource type="Script" path="res://src/game/role/MountRotation.cs" id="4_uh4x0"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_vejn8"] resource_local_to_scene = true -shader = ExtResource("2_dgp5f") +shader = ExtResource("2_v6n5s") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1 [sub_resource type="ShaderMaterial" id="ShaderMaterial_0gb8j"] resource_local_to_scene = true -shader = ExtResource("2_dgp5f") +shader = ExtResource("2_v6n5s") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0 [sub_resource type="AtlasTexture" id="AtlasTexture_tmewn"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(0, 0, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_dvg4a"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(0, 24, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_kvuct"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(16, 24, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_5op76"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(32, 24, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_helyc"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(48, 24, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_67mn8"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(48, 48, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_jeywq"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(32, 48, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_oycx8"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(16, 48, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_tjg1t"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(0, 48, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_2ltxw"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(0, 48, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_x1va1"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(16, 48, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_ic2p5"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(32, 48, 16, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_j3hdu"] -atlas = ExtResource("3_i2g22") +atlas = ExtResource("3_vci0q") region = Rect2(48, 48, 16, 24) [sub_resource type="SpriteFrames" id="SpriteFrames_3poqo"] @@ -130,13 +131,60 @@ "speed": 10.0 }] -[node name="Player" instance=ExtResource("1_4vjqs")] -collision_layer = 8 -collision_mask = 1 +[sub_resource type="CircleShape2D" id="CircleShape2D_5pj80"] +radius = 4.0 -[node name="ShadowSprite" parent="." index="0"] +[sub_resource type="RectangleShape2D" id="RectangleShape2D_1eja2"] +size = Vector2(12, 18) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_n68nu"] +size = Vector2(10, 16.5) + +[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("HurtArea", "MountPoint", "BackMountPoint", "InteractiveArea", "ShadowSprite", "AnimatedSprite", "Collision")] +script = ExtResource("1_sq1r0") +HurtArea = NodePath("HurtArea") +MountPoint = NodePath("MountPoint") +BackMountPoint = NodePath("BackMountPoint") +InteractiveArea = NodePath("InteractiveArea") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 material = SubResource("ShaderMaterial_vejn8") -[node name="AnimatedSprite" parent="." index="2"] +[node name="BackMountPoint" type="Marker2D" parent="."] +position = Vector2(0, -12) + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] material = SubResource("ShaderMaterial_0gb8j") +position = Vector2(0, -12) sprite_frames = SubResource("SpriteFrames_3poqo") + +[node name="Collision" type="CollisionShape2D" parent="."] +position = Vector2(0, -4) +shape = SubResource("CircleShape2D_5pj80") + +[node name="HurtArea" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 0 +monitoring = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="HurtArea"] +position = Vector2(0, -9) +shape = SubResource("RectangleShape2D_1eja2") + +[node name="InteractiveArea" type="Area2D" parent="."] +visible = false +collision_layer = 0 +collision_mask = 4 +monitorable = false + +[node name="Collision" type="CollisionShape2D" parent="InteractiveArea"] +position = Vector2(0, -5) +shape = SubResource("RectangleShape2D_n68nu") + +[node name="MountPoint" type="Marker2D" parent="."] +position = Vector2(1, -6) +script = ExtResource("4_uh4x0") diff --git a/DungeonShooting_Godot/prefab/role/Player0001.tscn b/DungeonShooting_Godot/prefab/role/Player0001.tscn deleted file mode 100644 index dc986d2..0000000 --- a/DungeonShooting_Godot/prefab/role/Player0001.tscn +++ /dev/null @@ -1,33 +0,0 @@ -[gd_scene load_steps=5 format=3 uid="uid://dhvpoolrlrbq7"] - -[ext_resource type="Script" path="res://src/game/role/Player.cs" id="1_dl8pn"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_ispp0"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_4wbfd"] -resource_local_to_scene = true -shader = ExtResource("2_ispp0") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1 - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mr55t"] -resource_local_to_scene = true -shader = ExtResource("2_ispp0") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0 - -[node name="Player0001" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] -script = ExtResource("1_dl8pn") -ShadowSprite = NodePath("CanvasGroup/ShadowSprite") -AnimatedSprite = NodePath("CanvasGroup/AnimatedSprite") -Collision = NodePath("Collision") - -[node name="CanvasGroup" type="CanvasGroup" parent="."] - -[node name="ShadowSprite" type="Sprite2D" parent="CanvasGroup"] -z_index = -1 -material = SubResource("ShaderMaterial_4wbfd") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="CanvasGroup"] -material = SubResource("ShaderMaterial_mr55t") - -[node name="Collision" type="CollisionShape2D" parent="."] diff --git a/DungeonShooting_Godot/prefab/ui/EditorTools.tscn b/DungeonShooting_Godot/prefab/ui/EditorTools.tscn index 18fcc9c..87c510a 100644 --- a/DungeonShooting_Godot/prefab/ui/EditorTools.tscn +++ b/DungeonShooting_Godot/prefab/ui/EditorTools.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://kw3o772vpne"] -[ext_resource type="Script" path="res://src/game/ui/editorTools/EditorToolsPanel.cs" id="1_qrlbl"] +[ext_resource type="Script" path="res://src/game/ui/editorTools/EditorToolsPanel.cs" id="1_kqvmy"] [node name="EditorTools" type="Control"] layout_mode = 3 @@ -11,7 +11,7 @@ grow_vertical = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -script = ExtResource("1_qrlbl") +script = ExtResource("1_kqvmy") [node name="ScrollContainer" type="ScrollContainer" parent="."] layout_mode = 0 diff --git a/DungeonShooting_Godot/resource/config/ActivityObject.json b/DungeonShooting_Godot/resource/config/ActivityObject.json new file mode 100644 index 0000000..c24050f --- /dev/null +++ b/DungeonShooting_Godot/resource/config/ActivityObject.json @@ -0,0 +1,7 @@ +[ + { + "Id": "role0001", + "Type": 3, + "Prefab": "res://prefab/role/Player.tscn" + } +] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/Role.json b/DungeonShooting_Godot/resource/config/Role.json deleted file mode 100644 index 026a477..0000000 --- a/DungeonShooting_Godot/resource/config/Role.json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "Id": "123", - "A": [ - "4a55" - ], - "B": { - "bbb": 123 - }, - "C": [ - { - "abc": [ - "1", - "a2" - ] - } - ], - "D": { - "X": 1, - "Y": 11 - }, - "E": [ - { - "X": 1, - "Y": 11 - }, - { - "X": 2, - "Y": 22 - } - ] - }, - { - "Id": "321465", - "A": [ - "asdf", - "a4sdf47" - ], - "B": { - "bbb": 123, - "ccc": 4654 - }, - "C": [ - { - "abc": [ - "1", - "a2" - ] - }, - { - "cccasf": [ - "1", - "a2", - "654asdf" - ] - } - ], - "D": { - "X": 1.56, - "Y": -44.55 - }, - "E": [ - { - "X": -1, - "Y": 11.45 - }, - { - "X": -2, - "Y": 22.4654 - } - ] - } -] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png.import b/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png.import index b4c2034..39572c3 100644 --- a/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png.import +++ b/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://civvcowt2wklr" -path="res://.godot/imported/weapon0001.png-6f3807222cc10bbb7eddc649cd3775c0.ctex" +path="res://.godot/imported/Weapon0001.png-305a0d14fe3c147edd264f33dc26bc8a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/gun/weapon0001/weapon0001.png" -dest_files=["res://.godot/imported/weapon0001.png-6f3807222cc10bbb7eddc649cd3775c0.ctex"] +source_file="res://resource/sprite/gun/weapon0001/Weapon0001.png" +dest_files=["res://.godot/imported/Weapon0001.png-305a0d14fe3c147edd264f33dc26bc8a.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import index b20c9a6..c36be94 100644 --- a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://chd2vtesap5cf" -path="res://.godot/imported/enemy0001.png-1247a3ddf8a1a163d812cad12c4340fd.ctex" +path="res://.godot/imported/Enemy0001.png-148a38dfa95953b26d890356e8875de4.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/role/enemy0001/enemy0001.png" -dest_files=["res://.godot/imported/enemy0001.png-1247a3ddf8a1a163d812cad12c4340fd.ctex"] +source_file="res://resource/sprite/role/enemy0001/Enemy0001.png" +dest_files=["res://.godot/imported/Enemy0001.png-148a38dfa95953b26d890356e8875de4.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import index 56388a2..d563acf 100644 --- a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://d2f55lu60x64i" -path="res://.godot/imported/enemy0001_Debris.png-297a2fb6680cb862a9a085cf58f8268c.ctex" +path="res://.godot/imported/Enemy0001_Debris.png-ac416dc79cd3c1217b27e1ef1fbe0d0b.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/role/enemy0001/enemy0001_Debris.png" -dest_files=["res://.godot/imported/enemy0001_Debris.png-297a2fb6680cb862a9a085cf58f8268c.ctex"] +source_file="res://resource/sprite/role/enemy0001/Enemy0001_Debris.png" +dest_files=["res://.godot/imported/Enemy0001_Debris.png-ac416dc79cd3c1217b27e1ef1fbe0d0b.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/theme/mainTheme.tres b/DungeonShooting_Godot/resource/theme/mainTheme.tres index 3074d53..f99a360 100644 --- a/DungeonShooting_Godot/resource/theme/mainTheme.tres +++ b/DungeonShooting_Godot/resource/theme/mainTheme.tres @@ -1,6 +1,6 @@ [gd_resource type="Theme" load_steps=78 format=3 uid="uid://ds668te2rph30"] -[ext_resource type="FontFile" uid="uid://cad0in7dtweo5" path="res://resource/font/VonwaonBitmap-16px.ttf" id="1_x1mau"] +[ext_resource type="FontFile" uid="uid://cad0in7dtweo5" path="res://resource/font/VonwaonBitmap-16px.ttf" id="1_p8d4w"] [sub_resource type="StyleBoxFlat" id="1"] content_margin_left = 6.0 @@ -352,7 +352,7 @@ [sub_resource type="ImageTexture" id="58"] -[sub_resource type="Image" id="Image_554ng"] +[sub_resource type="Image" id="Image_d82m3"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -362,7 +362,7 @@ } [sub_resource type="ImageTexture" id="60"] -image = SubResource("Image_554ng") +image = SubResource("Image_d82m3") [sub_resource type="StyleBoxTexture" id="61"] content_margin_left = 2.0 @@ -372,7 +372,7 @@ texture = SubResource("60") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_ngohf"] +[sub_resource type="Image" id="Image_gqp1k"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -382,7 +382,7 @@ } [sub_resource type="ImageTexture" id="63"] -image = SubResource("Image_ngohf") +image = SubResource("Image_gqp1k") [sub_resource type="StyleBoxTexture" id="64"] content_margin_left = 2.0 @@ -392,7 +392,7 @@ texture = SubResource("63") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_mu8t1"] +[sub_resource type="Image" id="Image_kk46c"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -402,7 +402,7 @@ } [sub_resource type="ImageTexture" id="66"] -image = SubResource("Image_mu8t1") +image = SubResource("Image_kk46c") [sub_resource type="StyleBoxTexture" id="67"] content_margin_left = 2.0 @@ -412,7 +412,7 @@ texture = SubResource("66") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_rdbq1"] +[sub_resource type="Image" id="Image_fsu1c"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -422,7 +422,7 @@ } [sub_resource type="ImageTexture" id="69"] -image = SubResource("Image_rdbq1") +image = SubResource("Image_fsu1c") [sub_resource type="StyleBoxTexture" id="70"] content_margin_left = 0.0 @@ -446,7 +446,7 @@ content_margin_right = 4.0 content_margin_bottom = 4.0 -[sub_resource type="Image" id="Image_syc01"] +[sub_resource type="Image" id="Image_cc3ol"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 228, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 228, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 17, 255, 255, 255, 186, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 191, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 186, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 189, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 77, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 77, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -456,7 +456,7 @@ } [sub_resource type="ImageTexture" id="56"] -image = SubResource("Image_syc01") +image = SubResource("Image_cc3ol") [sub_resource type="StyleBoxFlat" id="57"] content_margin_left = 6.0 @@ -506,7 +506,7 @@ region_rect = Rect2(0, 0, 12, 12) [resource] -default_font = ExtResource("1_x1mau") +default_font = ExtResource("1_p8d4w") default_font_size = 32 Button/colors/font_color = Color(0.780392, 0.780392, 0.780392, 1) Button/colors/font_color_disabled = Color(1, 1, 1, 0.3) @@ -516,7 +516,7 @@ Button/colors/icon_color_hover = Color(1.15, 1.15, 1.15, 1) Button/colors/icon_color_pressed = Color(0.135294, 0.496079, 1.04176, 1) Button/constants/hseparation = 2 -Button/fonts/font = ExtResource("1_x1mau") +Button/fonts/font = ExtResource("1_p8d4w") Button/styles/disabled = SubResource("1") Button/styles/focus = SubResource("2") Button/styles/hover = SubResource("3") @@ -618,7 +618,7 @@ Label/constants/shadow_as_outline = 0 Label/constants/shadow_offset_x = 1 Label/constants/shadow_offset_y = 1 -Label/fonts/font = ExtResource("1_x1mau") +Label/fonts/font = ExtResource("1_p8d4w") Label/styles/normal = SubResource("54") LineEdit/colors/clear_button_color = Color(0.780392, 0.780392, 0.780392, 1) LineEdit/colors/clear_button_color_pressed = Color(0.117647, 0.431373, 0.905882, 1) @@ -629,7 +629,7 @@ LineEdit/colors/read_only = Color(1, 1, 1, 0.3) LineEdit/colors/selection_color = Color(0.117647, 0.431373, 0.905882, 0.4) LineEdit/constants/minimum_spaces = 12 -LineEdit/fonts/font = ExtResource("1_x1mau") +LineEdit/fonts/font = ExtResource("1_p8d4w") LineEdit/icons/clear = SubResource("56") LineEdit/styles/focus = SubResource("2") LineEdit/styles/normal = SubResource("4") diff --git a/DungeonShooting_Godot/scene/Main.tscn b/DungeonShooting_Godot/scene/Main.tscn index ad1c3c1..d07845e 100644 --- a/DungeonShooting_Godot/scene/Main.tscn +++ b/DungeonShooting_Godot/scene/Main.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=5 format=3 uid="uid://lbe753cb8heb"] -[ext_resource type="Script" path="res://src/game/GameApplication.cs" id="1_vxjd8"] -[ext_resource type="Script" path="res://src/game/camera/GameCamera.cs" id="2_fxsv3"] +[ext_resource type="Script" path="res://src/game/GameApplication.cs" id="1_2e8hl"] +[ext_resource type="Script" path="res://src/game/camera/GameCamera.cs" id="2_gb3lm"] [sub_resource type="Shader" id="1"] code = "shader_type canvas_item; @@ -21,7 +21,7 @@ shader_parameter/offset = Vector2(0, 0) [node name="Main" type="Node2D" node_paths=PackedStringArray("SubViewport", "SubViewportContainer", "SceneRoot", "GlobalNodeRoot")] -script = ExtResource("1_vxjd8") +script = ExtResource("1_2e8hl") SubViewport = NodePath("ViewCanvas/SubViewportContainer/SubViewport") SubViewportContainer = NodePath("ViewCanvas/SubViewportContainer") SceneRoot = NodePath("ViewCanvas/SubViewportContainer/SubViewport/SceneRoot") @@ -49,6 +49,6 @@ process_callback = 0 limit_smoothed = true editor_draw_drag_margin = true -script = ExtResource("2_fxsv3") +script = ExtResource("2_gb3lm") [node name="GlobalNodeRoot" type="Node2D" parent="."] diff --git a/DungeonShooting_Godot/scene/test/TestReadExcel.tscn b/DungeonShooting_Godot/scene/test/TestReadExcel.tscn index 1d2959f..06a29bb 100644 --- a/DungeonShooting_Godot/scene/test/TestReadExcel.tscn +++ b/DungeonShooting_Godot/scene/test/TestReadExcel.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://deq562id5sngp"] -[ext_resource type="Script" path="res://src/test/TestReadExcel.cs" id="1_5kr2c"] +[ext_resource type="Script" path="res://src/test/TestReadExcel.cs" id="1_namis"] [node name="TestReadExcel" type="Node2D"] -script = ExtResource("1_5kr2c") +script = ExtResource("1_namis") diff --git a/DungeonShooting_Godot/src/config/ExcelConfig.cs b/DungeonShooting_Godot/src/config/ExcelConfig.cs index e7dbb63..11458d0 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig.cs @@ -8,13 +8,13 @@ public static partial class ExcelConfig { /// <summary> - /// Role.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// ActivityObject.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// </summary> - public static List<Role> Role_List { get; private set; } + public static List<ActivityObject> ActivityObject_List { get; private set; } /// <summary> - /// Role.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// ActivityObject.xlsx表数据集合, 里 Map 形式存储, key 为 Id /// </summary> - public static Dictionary<string, Role> Role_Map { get; private set; } + public static Dictionary<string, ActivityObject> ActivityObject_Map { get; private set; } /// <summary> /// Weapon.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 @@ -35,25 +35,25 @@ if (_init) return; _init = true; - _InitRoleConfig(); + _InitActivityObjectConfig(); _InitWeaponConfig(); } - private static void _InitRoleConfig() + private static void _InitActivityObjectConfig() { try { - var text = _ReadConfigAsText("res://resource/config/Role.json"); - Role_List = JsonSerializer.Deserialize<List<Role>>(text); - Role_Map = new Dictionary<string, Role>(); - foreach (var item in Role_List) + var text = _ReadConfigAsText("res://resource/config/ActivityObject.json"); + ActivityObject_List = JsonSerializer.Deserialize<List<ActivityObject>>(text); + ActivityObject_Map = new Dictionary<string, ActivityObject>(); + foreach (var item in ActivityObject_List) { - Role_Map.Add(item.Id, item); + ActivityObject_Map.Add(item.Id, item); } } catch (Exception e) { GD.PrintErr(e.ToString()); - throw new Exception("初始化表'Role'失败!"); + throw new Exception("初始化表'ActivityObject'失败!"); } } private static void _InitWeaponConfig() diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs new file mode 100644 index 0000000..4e12fe9 --- /dev/null +++ b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs @@ -0,0 +1,37 @@ +using System.Text.Json.Serialization; +using System.Collections.Generic; + +namespace Config; + +public static partial class ExcelConfig +{ + public class ActivityObject + { + /// <summary> + /// 物体唯一id <br/> + /// 需要添加类型前缀 + /// </summary> + [JsonInclude] + public string Id { get; private set; } + + /// <summary> + /// Test(测试对象): 2 <br/> + /// Role(角色): 3 <br/> + /// Enemy(敌人): 4 <br/> + /// Weapon(武器): 3 <br/> + /// Bullet(子弹): 3 <br/> + /// Shell(弹壳): 3 <br/> + /// Effect(特效): 3 <br/> + /// Other(其它类型): 3 + /// </summary> + [JsonInclude] + public int Type { get; private set; } + + /// <summary> + /// 物体预制场景路径, 场景根节点必须是ActivityObject子类 + /// </summary> + [JsonInclude] + public string Prefab { get; private set; } + + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_Role.cs b/DungeonShooting_Godot/src/config/ExcelConfig_Role.cs deleted file mode 100644 index f116562..0000000 --- a/DungeonShooting_Godot/src/config/ExcelConfig_Role.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Text.Json.Serialization; -using System.Collections.Generic; - -namespace Config; - -public static partial class ExcelConfig -{ - public class Role - { - /// <summary> - /// 物体唯一id <br/> - /// 不需要添加类型前缀 - /// </summary> - [JsonInclude] - public string Id { get; private set; } - - /// <summary> - /// 222 - /// </summary> - [JsonInclude] - public string[] A { get; private set; } - - /// <summary> - /// - /// </summary> - [JsonInclude] - public Dictionary<string, int> B { get; private set; } - - /// <summary> - /// - /// </summary> - [JsonInclude] - public Dictionary<string, string[]>[] C { get; private set; } - - /// <summary> - /// 123 - /// </summary> - [JsonInclude] - public SerializeVector2 D { get; private set; } - - /// <summary> - /// - /// </summary> - [JsonInclude] - public SerializeVector2[] E { get; private set; } - - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs index 7564fb1..932c480 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs @@ -1,5 +1,4 @@ - using System; using System.Collections.Generic; using System.Reflection; @@ -90,8 +89,44 @@ } } } - foreach (var propertyInfo in propertyInfoList) + + var tempList = new List<PropertyInfo>(); + Type tempType = null; + var index = -1; + for (int i = propertyInfoList.Count - 1; i >= 0; i--) { + var item = propertyInfoList[i]; + if (tempType != item.DeclaringType || i == 0) + { + if (tempType == null) + { + index = i; + } + else + { + int j; + if (i == 0) + { + j = i; + } + else + { + j = i + 1; + } + for (; j <= index; j++) + { + tempList.Add(propertyInfoList[j]); + } + + index = i; + } + tempType = item.DeclaringType; + } + } + + foreach (var propertyInfo in tempList) + { + GD.Print("propertyInfo2: " + propertyInfo.Name); var value = propertyInfo.GetValue(this); if (value == null || ((Node)value).GetParent() == null) { diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs new file mode 100644 index 0000000..ce51394 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs @@ -0,0 +1,10 @@ +/// <summary> +/// 根据配置表注册物体, 该类是自动生成的, 请不要手动编辑! +/// </summary> +public partial class ActivityObject +{ + private static void _InitRegister() + { + _activityRegisterMap.Add("role0001", "res://prefab/role/Player.tscn"); + } +} diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs index da315be..a08c0e6 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs @@ -1,11 +1,12 @@ using System; using System.Collections.Generic; -using System.Reflection; using Godot; public partial class ActivityObject { + //负责存放所有注册对象数据 + private static Dictionary<string, string> _activityRegisterMap = new Dictionary<string, string>(); private static bool _initState = false; /// <summary> @@ -19,7 +20,7 @@ } _initState = true; - + _InitRegister(); } /// <summary> @@ -27,18 +28,19 @@ /// </summary> public static ActivityObject Create(string itemId) { - // var world = GameApplication.Instance.World; - // if (world == null) - // { - // throw new Exception("实例化 ActivityObject 前请先调用 'GameApplication.Instance.CreateNewWorld()' 初始化 World 对象"); - // } - // if (_activityRegisterMap.TryGetValue(itemId, out var item)) - // { - // var instance = item.CallBack(); - // instance._InitNode(item.RegisterActivity.ItemId, item.RegisterActivity.PrefabPath, world); - // item.RegisterActivity.CustomHandler(instance); - // return instance; - // } + var world = GameApplication.Instance.World; + if (world == null) + { + throw new Exception("实例化 ActivityObject 前请先调用 'GameApplication.Instance.CreateNewWorld()' 初始化 World 对象"); + } + + if (_activityRegisterMap.TryGetValue(itemId, out var path)) + { + var instance = ResourceManager.LoadAndInstantiate<ActivityObject>(path); + instance._InitNode(itemId, world); + return instance; + } + GD.PrintErr("创建实例失败, 未找到id为'" + itemId + "'的物体!"); return null; } @@ -52,7 +54,6 @@ { return (T)instance; } - GD.PrintErr("创建实例失败, 未找到id为'" + itemId + "'的物体!"); return null; } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/ExportFillNodeAttribute.cs b/DungeonShooting_Godot/src/framework/activity/ExportFillNodeAttribute.cs index 0616e34..b7b9177 100644 --- a/DungeonShooting_Godot/src/framework/activity/ExportFillNodeAttribute.cs +++ b/DungeonShooting_Godot/src/framework/activity/ExportFillNodeAttribute.cs @@ -4,7 +4,7 @@ /// <summary> /// 标记类型为Node的属性, 表示当前属性如果没有赋值, 则在编辑器中自动创建子节点, 必须搭配 [Export] 使用! /// </summary> -[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] +[AttributeUsage(AttributeTargets.Property)] public class ExportFillNodeAttribute : Attribute { } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs b/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs index 5680141..f70ee27 100644 --- a/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs @@ -1,5 +1,8 @@ -using Godot; -using Godot.Collections; +using System; +using System.IO; +using System.Text.Json; +using Godot; +using Array = Godot.Collections.Array; namespace Generator; @@ -13,5 +16,40 @@ { GD.Print(message); } + + try + { + GeneratorActivityObjectInit(); + GD.Print("生成'src/framework/activity/ActivityObject_Init.cs'成功!"); + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + } + } + + //生成初始化 ActivityObject 代码 + private static void GeneratorActivityObjectInit() + { + var text = File.ReadAllText("resource/config/ActivityObject.json"); + var array = JsonSerializer.Deserialize<System.Collections.Generic.Dictionary<string, System.Object>[]>(text); + + var str = $"/// <summary>\n"; + str += $"/// 根据配置表注册物体, 该类是自动生成的, 请不要手动编辑!\n"; + str += $"/// </summary>\n"; + str += $"public partial class ActivityObject\n"; + str += $"{{\n"; + str += $" private static void _InitRegister()\n"; + str += $" {{\n"; + + foreach (var item in array) + { + str += $" _activityRegisterMap.Add(\"{item["Id"]}\", \"{item["Prefab"]}\");\n"; + } + + str += $" }}\n"; + str += $"}}\n"; + + File.WriteAllText("src/framework/activity/ActivityObject_Init.cs", str); } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index e530369..5ac3f40 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -127,7 +127,7 @@ DungeonManager.Name = "DungeonManager"; SceneRoot.AddChild(DungeonManager); //打开主菜单Ui - //UiManager.Open_Main(); + UiManager.Open_Main(); } public override void _Process(double delta) diff --git a/DungeonShooting_Godot/src/game/role/Role.cs b/DungeonShooting_Godot/src/game/role/Role.cs index abe3dc2..c248950 100644 --- a/DungeonShooting_Godot/src/game/role/Role.cs +++ b/DungeonShooting_Godot/src/game/role/Role.cs @@ -19,7 +19,8 @@ /// <summary> /// 伤害区域 /// </summary> - public Area2D HurtArea { get; private set; } + [Export, ExportFillNode] + public Area2D HurtArea { get; set; } /// <summary> /// 移动速度 @@ -49,16 +50,19 @@ /// <summary> /// 武器挂载点 /// </summary> - public MountRotation MountPoint { get; private set; } + [Export, ExportFillNode] + public MountRotation MountPoint { get; set; } /// <summary> /// 背后武器的挂载点 /// </summary> - public Marker2D BackMountPoint { get; private set; } + [Export, ExportFillNode] + public Marker2D BackMountPoint { get; set; } /// <summary> /// 互动碰撞区域 /// </summary> - public Area2D InteractiveArea { get; private set; } + [Export, ExportFillNode] + public Area2D InteractiveArea { get; set; } /// <summary> /// 脸的朝向 @@ -214,18 +218,14 @@ { Holster = new Holster(this); _startScale = Scale; - MountPoint = GetNode<MountRotation>("MountPoint"); MountPoint.Master = this; - BackMountPoint = GetNode<Marker2D>("BackMountPoint"); - - HurtArea = GetNode<Area2D>("HurtArea"); + HurtArea.CollisionLayer = CollisionLayer; HurtArea.CollisionMask = 0; Face = FaceDirection.Right; //连接互动物体信号 - InteractiveArea = GetNode<Area2D>("InteractiveArea"); InteractiveArea.BodyEntered += _OnPropsEnter; InteractiveArea.BodyExited += _OnPropsExit; } diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index 689b707..2aa87c3 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -147,8 +147,8 @@ Player.SetCurrentPlayer(player); player.PutDown(RoomLayerEnum.YSortLayer); //玩家手上添加武器 - player.PickUpWeapon(ActivityObject.Create<Weapon>(ActivityIdPrefix.Weapon + "0001")); - player.PickUpWeapon(ActivityObject.Create<Weapon>(ActivityIdPrefix.Weapon + "0002")); + // player.PickUpWeapon(ActivityObject.Create<Weapon>(ActivityIdPrefix.Weapon + "0001")); + // player.PickUpWeapon(ActivityObject.Create<Weapon>(ActivityIdPrefix.Weapon + "0002")); GameApplication.Instance.Cursor.SetGuiMode(false); yield return 0;