diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/preview_gif.gif" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/preview_gif.gif" new file mode 100644 index 0000000..57c884b --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/preview_gif.gif" Binary files differ diff --git a/DungeonShooting_Godot/DungeonShooting.csproj b/DungeonShooting_Godot/DungeonShooting.csproj index 51b8a45..e36028f 100644 --- a/DungeonShooting_Godot/DungeonShooting.csproj +++ b/DungeonShooting_Godot/DungeonShooting.csproj @@ -1,6 +1,6 @@ - + - net6.0 + net7.0 true diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/NodeMonitor.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/NodeMonitor.cs index cc95225..2a62912 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/NodeMonitor.cs +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/NodeMonitor.cs @@ -95,7 +95,7 @@ catch (Exception e) { //检查节点存在报错, 直接跳过该节点的检查 - GD.Print(e.Message); + Debug.Log(e.Message); } } @@ -131,7 +131,7 @@ catch (Exception e) { //检查节点存在报错, 直接跳过该节点的检查 - GD.Print(e.Message); + Debug.Log(e.Message); _targetNode = null; } _checkTreeTimer = 0; diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs index f78f577..198c613 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs @@ -42,18 +42,18 @@ //自定义节点 private CustomTypeInfo[] _customTypeInfos = new CustomTypeInfo[] { - new CustomTypeInfo( - "ActivityMark", - "Node2D", - "res://src/framework/map/mark/ActivityMark.cs", - "res://addons/dungeonShooting_plugin/Mark.svg" - ), - new CustomTypeInfo( - "EnemyMark", - "Node2D", - "res://src/framework/map/mark/EnemyMark.cs", - "res://addons/dungeonShooting_plugin/Mark.svg" - ), + // new CustomTypeInfo( + // "ActivityMark", + // "Node2D", + // "res://src/framework/map/mark/ActivityMark.cs", + // "res://addons/dungeonShooting_plugin/Mark.svg" + // ), + // new CustomTypeInfo( + // "EnemyMark", + // "Node2D", + // "res://src/framework/map/mark/EnemyMark.cs", + // "res://addons/dungeonShooting_plugin/Mark.svg" + // ), }; public override void _Process(double delta) @@ -89,7 +89,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); } } } @@ -104,7 +104,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); } try @@ -113,7 +113,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); } @@ -140,7 +140,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); } } } @@ -153,7 +153,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); } try @@ -162,7 +162,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); } _editorTools.Free(); diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx index 8b0e0b8..dbdd157 100644 --- a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx index 603d0e4..b2185d4 100644 --- a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx index 27f6dfd..bba5663 100644 --- a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx Binary files differ diff --git a/DungeonShooting_Godot/export_presets.cfg b/DungeonShooting_Godot/export_presets.cfg index 8683c0c..0776df9 100644 --- a/DungeonShooting_Godot/export_presets.cfg +++ b/DungeonShooting_Godot/export_presets.cfg @@ -8,7 +8,7 @@ export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../../export/DungeonShooting.apk" +export_path="../../DungeonShooting_Export/android/DungeonShooting.apk" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -18,11 +18,11 @@ custom_template/debug="" custom_template/release="" -gradle_build/use_gradle_build=false +gradle_build/use_gradle_build=true gradle_build/export_format=0 gradle_build/min_sdk="" gradle_build/target_sdk="" -architectures/armeabi-v7a=true +architectures/armeabi-v7a=false architectures/arm64-v8a=true architectures/x86=false architectures/x86_64=false @@ -34,14 +34,14 @@ package/app_category=2 package/retain_data_on_uninstall=false package/exclude_from_recents=false +package/show_in_android_tv=false +package/show_in_app_library=true +package/show_as_launcher_app=false launcher_icons/main_192x192="" launcher_icons/adaptive_foreground_432x432="" launcher_icons/adaptive_background_432x432="" graphics/opengl_debug=false xr_features/xr_mode=0 -xr_features/hand_tracking=0 -xr_features/hand_tracking_frequency=0 -xr_features/passthrough=0 screen/immersive_mode=true screen/support_small=true screen/support_normal=true @@ -201,6 +201,10 @@ permissions/write_user_dictionary=false dotnet/include_scripts_content=false dotnet/include_debug_symbols=true +dotnet/embed_build_outputs=false +xr_features/hand_tracking=0 +xr_features/hand_tracking_frequency=0 +xr_features/passthrough=0 [preset.1] @@ -246,6 +250,7 @@ application/file_description="" application/copyright="" application/trademarks="" +application/export_angle=0 ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/port="22" @@ -265,78 +270,4 @@ Remove-Item -Recurse -Force '{temp_dir}'" dotnet/include_scripts_content=true dotnet/include_debug_symbols=true - -[preset.2] - -name="iOS" -platform="iOS" -runnable=true -dedicated_server=false -custom_features="" -export_filter="all_resources" -include_filter="" -exclude_filter="" -export_path="" -encryption_include_filters="" -encryption_exclude_filters="" -encrypt_pck=false -encrypt_directory=false - -[preset.2.options] - -custom_template/debug="" -custom_template/release="" -architectures/arm64=true -application/app_store_team_id="" -application/code_sign_identity_debug="" -application/export_method_debug=1 -application/code_sign_identity_release="" -application/export_method_release=0 -application/targeted_device_family=2 -application/bundle_identifier="" -application/signature="" -application/short_version="1.0" -application/version="1.0" -application/icon_interpolation=4 -application/launch_screens_interpolation=4 -capabilities/access_wifi=false -capabilities/push_notifications=false -user_data/accessible_from_files_app=false -user_data/accessible_from_itunes_sharing=false -privacy/camera_usage_description="" -privacy/camera_usage_description_localized={} -privacy/microphone_usage_description="" -privacy/microphone_usage_description_localized={} -privacy/photolibrary_usage_description="" -privacy/photolibrary_usage_description_localized={} -icons/iphone_120x120="" -icons/iphone_180x180="" -icons/ipad_76x76="" -icons/ipad_152x152="" -icons/ipad_167x167="" -icons/app_store_1024x1024="" -icons/spotlight_40x40="" -icons/spotlight_80x80="" -icons/settings_58x58="" -icons/settings_87x87="" -icons/notification_40x40="" -icons/notification_60x60="" -storyboard/use_launch_screen_storyboard=false -storyboard/image_scale_mode=0 -storyboard/custom_image@2x="" -storyboard/custom_image@3x="" -storyboard/use_custom_bg_color=false -storyboard/custom_bg_color=Color(0, 0, 0, 1) -landscape_launch_screens/iphone_2436x1125="" -landscape_launch_screens/iphone_2208x1242="" -landscape_launch_screens/ipad_1024x768="" -landscape_launch_screens/ipad_2048x1536="" -portrait_launch_screens/iphone_640x960="" -portrait_launch_screens/iphone_640x1136="" -portrait_launch_screens/iphone_750x1334="" -portrait_launch_screens/iphone_1125x2436="" -portrait_launch_screens/ipad_768x1024="" -portrait_launch_screens/ipad_1536x2048="" -portrait_launch_screens/iphone_1242x2208="" -dotnet/include_scripts_content=false -dotnet/include_debug_symbols=true +dotnet/embed_build_outputs=false diff --git a/DungeonShooting_Godot/prefab/FanCollisionShape.tscn b/DungeonShooting_Godot/prefab/FanCollisionShape.tscn deleted file mode 100644 index cf26c3a..0000000 --- a/DungeonShooting_Godot/prefab/FanCollisionShape.tscn +++ /dev/null @@ -1,4 +0,0 @@ -[gd_scene format=2] - -[node name="FanCollisionShape" type="CollisionPolygon2D"] -polygon = PackedVector2Array( 0, -10, 5, -9, 9, -5, 10, 0, 9, 5, 5, 9, 0, 10 ) diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn index 3ee607f..0a44b2f 100644 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn +++ b/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn @@ -36,7 +36,7 @@ }] [sub_resource type="RectangleShape2D" id="RectangleShape2D_lcqb8"] -size = Vector2(11, 4) +size = Vector2(9, 4) [node name="Bullet0001" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] collision_layer = 2 @@ -51,6 +51,7 @@ material = SubResource("ShaderMaterial_w5w0i") [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.6, 1.6, 1.6, 1) material = SubResource("ShaderMaterial_qhkgc") sprite_frames = SubResource("SpriteFrames_5wvmf") @@ -65,5 +66,5 @@ shape = SubResource("RectangleShape2D_lcqb8") [node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(2.5, 0) +position = Vector2(1.5, 0) shape = SubResource("RectangleShape2D_lcqb8") diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn index 89c2130..1cb086c 100644 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn +++ b/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn @@ -43,6 +43,7 @@ material = SubResource("ShaderMaterial_v77gw") [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.6, 1.6, 1.6, 1) material = SubResource("ShaderMaterial_p0wfd") sprite_frames = ExtResource("3_uvuj8") diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn index 4890b1e..605759f 100644 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn +++ b/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn @@ -40,6 +40,7 @@ material = SubResource("ShaderMaterial_v77gw") [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.6, 1.6, 1.6, 1) material = SubResource("ShaderMaterial_p0wfd") sprite_frames = ExtResource("3_qvo0u") @@ -54,5 +55,4 @@ shape = SubResource("RectangleShape2D_c0onq") [node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(1, 0) shape = SubResource("RectangleShape2D_c0onq") diff --git a/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn b/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn index 4cd0ba7..9f4e524 100644 --- a/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn +++ b/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3] +[gd_scene load_steps=8 format=3 uid="uid://dbhgioeoksa7"] [ext_resource type="Material" uid="uid://c1chld6lkpgji" path="res://resource/material/SmokeParticleMaterial.tres" id="1_dxavj"] [ext_resource type="Texture2D" uid="uid://bs1lan5uwxyfg" path="res://resource/curve/Curve1.tres" id="1_s60r7"] @@ -12,7 +12,7 @@ particles_anim_v_frames = 1 particles_anim_loop = false -[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_pgx85"] +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_p8jst"] particle_flag_align_y = true particle_flag_disable_z = true spread = 180.0 @@ -41,7 +41,7 @@ [node name="GPUParticles2D" type="GPUParticles2D" parent="."] emitting = false -process_material = SubResource("ParticleProcessMaterial_pgx85") +process_material = SubResource("ParticleProcessMaterial_p8jst") texture = ExtResource("3_1mceu") lifetime = 0.5 one_shot = true diff --git a/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn b/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn index 9e15242..8b4aa0a 100644 --- a/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn +++ b/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn @@ -2,7 +2,7 @@ [ext_resource type="Material" uid="uid://c1chld6lkpgji" path="res://resource/material/SmokeParticleMaterial.tres" id="1_leomh"] [ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="2_c2t2e"] -[ext_resource type="Script" path="res://src/game/effects/AutoDestroyEffect.cs" id="3_i1urq"] +[ext_resource type="Script" path="res://src/game/effects/AutoDestroyParticles.cs" id="3_5cpi6"] [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_emuda"] particles_animation = true @@ -21,5 +21,5 @@ one_shot = true explosiveness = 1.0 fixed_fps = 20 -script = ExtResource("3_i1urq") +script = ExtResource("3_5cpi6") DelayTime = 1.5 diff --git a/DungeonShooting_Godot/prefab/effect/weapon/BulletDisappear.tscn b/DungeonShooting_Godot/prefab/effect/weapon/BulletDisappear.tscn index 54549a1..6572e0c 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/BulletDisappear.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/BulletDisappear.tscn @@ -1,8 +1,8 @@ -[gd_scene load_steps=15 format=3] +[gd_scene load_steps=13 format=3 uid="uid://c6mmikwchwt"] [ext_resource type="Texture2D" uid="uid://d8ot2wrdoe4j" path="res://resource/sprite/effects/Explosion.png" id="1_qqm6c"] -[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/Smoke.png" id="1_ybsvf"] - +[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="1_ybsvf"] +[ext_resource type="Script" path="res://src/game/effects/AutoDestroySprite.cs" id="2_l2qlq"] [sub_resource type="AtlasTexture" id="AtlasTexture_tscb3"] atlas = ExtResource("1_qqm6c") @@ -69,63 +69,15 @@ color = Color(0.909804, 0.909804, 0.909804, 0.380392) anim_offset_max = 1.0 -[sub_resource type="Animation" id="Animation_jnfgg"] -resource_name = "Start" -length = 0.3 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".:emitting") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} -tracks/1/type = "method" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("..") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0.3), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"queue_free" -}] -} - -[sub_resource type="Animation" id="Animation_yr61b"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".:emitting") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [false] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_1spnw"] -_data = { -"RESET": SubResource("Animation_yr61b"), -"Start": SubResource("Animation_jnfgg") -} - -[node name="BulletDisappear" type="AnimatedSprite2D"] +[node name="BulletDisappear" type="AnimatedSprite2D" node_paths=PackedStringArray("Particles2D")] modulate = Color(1, 1, 1, 0.784314) z_index = -4 scale = Vector2(0.5, 0.5) sprite_frames = SubResource("SpriteFrames_ub3cw") autoplay = "default" +script = ExtResource("2_l2qlq") +DelayTime = 0.3 +Particles2D = [NodePath("GPUParticles2D")] [node name="GPUParticles2D" type="GPUParticles2D" parent="."] material = SubResource("CanvasItemMaterial_4bd3q") @@ -136,10 +88,3 @@ one_shot = true explosiveness = 0.9 fixed_fps = 20 - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -root_node = NodePath("../GPUParticles2D") -autoplay = "Start" -libraries = { -"": SubResource("AnimationLibrary_1spnw") -} diff --git a/DungeonShooting_Godot/prefab/effect/weapon/BulletSmoke.tscn b/DungeonShooting_Godot/prefab/effect/weapon/BulletSmoke.tscn index a540d11..d13cf17 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/BulletSmoke.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/BulletSmoke.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=9 format=3] +[gd_scene load_steps=9 format=3 uid="uid://b8ogu2l8pa70y"] [ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="1"] [ext_resource type="Texture2D" uid="uid://bs1lan5uwxyfg" path="res://resource/curve/Curve1.tres" id="1_8pe88"] -[ext_resource type="Texture2D" uid="uid://dwa4chrugc6b1" path="res://resource/sprite/effects/Collision.png" id="2"] - +[ext_resource type="Texture2D" uid="uid://dwa4chrugc6b1" path="res://resource/sprite/effects/weapon/Collision1.png" id="2"] [sub_resource type="CanvasItemMaterial" id="1"] particles_animation = true @@ -73,10 +72,10 @@ tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), +"times": PackedFloat32Array(0, 0.05), +"transitions": PackedFloat32Array(1, 1), "update": 1, -"values": [true] +"values": [true, false] } tracks/1/type = "method" tracks/1/imported = false @@ -140,7 +139,7 @@ hframes = 4 [node name="AnimationPlayer" type="AnimationPlayer" parent="."] -autoplay = "Smoke" libraries = { "": SubResource("AnimationLibrary_uuiu7") } +autoplay = "Smoke" diff --git a/DungeonShooting_Godot/prefab/effect/weapon/FirePart.tscn b/DungeonShooting_Godot/prefab/effect/weapon/FirePart.tscn index 0d5c27f..629586a 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/FirePart.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/FirePart.tscn @@ -1,24 +1,13 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=2 format=3 uid="uid://bh6vo2i6x7lmj"] -[sub_resource type="ParticleProcessMaterial" id=1] -flag_disable_z = true +[sub_resource type="ParticleProcessMaterial" id="1"] spread = 60.0 -gravity = Vector3( 0, 0, 0 ) -initial_velocity = 200.0 -initial_velocity_random = 1.0 -orbit_velocity = 0.0 -orbit_velocity_random = 0.0 -linear_accel = -200.0 -linear_accel_random = 0.5 +gravity = Vector3(0, 0, 0) [node name="FirePart" type="GPUParticles2D"] emitting = false amount = 10 +process_material = SubResource("1") lifetime = 0.2 one_shot = true explosiveness = 1.0 -local_coords = false -process_material = SubResource( 1 ) -__meta__ = { -"_edit_vertical_guides_": [ ] -} diff --git a/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn index 5ba7c89..9d50730 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn @@ -1,31 +1,38 @@ -[gd_scene load_steps=7 format=3 uid="uid://cylm455bsio3g"] +[gd_scene load_steps=8 format=3 uid="uid://cylm455bsio3g"] [ext_resource type="Texture2D" uid="uid://7jhe2mmctmr1" path="res://resource/sprite/effects/weapon/MeleeAttack1.png" id="1_bjxle"] [ext_resource type="Script" path="res://src/game/effects/AutoDestroySprite.cs" id="2_bjagc"] -[sub_resource type="AtlasTexture" id="AtlasTexture_h5mw5"] +[sub_resource type="AtlasTexture" id="AtlasTexture_36t2o"] atlas = ExtResource("1_bjxle") -region = Rect2(0, 0, 16, 32) +region = Rect2(0, 0, 16, 38) -[sub_resource type="AtlasTexture" id="AtlasTexture_rjd0g"] +[sub_resource type="AtlasTexture" id="AtlasTexture_pwsgl"] atlas = ExtResource("1_bjxle") -region = Rect2(16, 0, 16, 32) +region = Rect2(16, 0, 16, 38) -[sub_resource type="AtlasTexture" id="AtlasTexture_q06ex"] +[sub_resource type="AtlasTexture" id="AtlasTexture_8lpt5"] atlas = ExtResource("1_bjxle") -region = Rect2(32, 0, 16, 32) +region = Rect2(32, 0, 16, 38) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ihg55"] +atlas = ExtResource("1_bjxle") +region = Rect2(48, 0, 16, 38) [sub_resource type="SpriteFrames" id="SpriteFrames_hkcv6"] animations = [{ "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_h5mw5") +"texture": SubResource("AtlasTexture_36t2o") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_rjd0g") +"texture": SubResource("AtlasTexture_pwsgl") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_q06ex") +"texture": SubResource("AtlasTexture_8lpt5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ihg55") }], "loop": false, "name": &"default", @@ -36,4 +43,4 @@ sprite_frames = SubResource("SpriteFrames_hkcv6") autoplay = "default" script = ExtResource("2_bjagc") -DelayTime = 0.15 +DelayTime = 0.2 diff --git a/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack2.tscn b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack2.tscn new file mode 100644 index 0000000..3796f4a --- /dev/null +++ b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack2.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=3 uid="uid://cxq8wfeda4huc"] + +[ext_resource type="SpriteFrames" uid="uid://dj8o7ws03bik4" path="res://resource/spriteFrames/effect/KnifeHit1.tres" id="1_ds7pw"] +[ext_resource type="Script" path="res://src/game/effects/AutoDestroySprite.cs" id="2_hl3gp"] + +[node name="MeleeAttack2" type="AnimatedSprite2D"] +sprite_frames = ExtResource("1_ds7pw") +autoplay = "default" +script = ExtResource("2_hl3gp") +DelayTime = 0.12 diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn index 2b54e02..b40786c 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn @@ -9,7 +9,7 @@ shader = ExtResource("2_lwx51") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 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 @@ -19,7 +19,7 @@ shader = ExtResource("2_lwx51") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 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 diff --git a/DungeonShooting_Godot/prefab/role/Enemy0001.tscn b/DungeonShooting_Godot/prefab/role/Enemy0001.tscn index 6d6eeaf..46e01b2 100644 --- a/DungeonShooting_Godot/prefab/role/Enemy0001.tscn +++ b/DungeonShooting_Godot/prefab/role/Enemy0001.tscn @@ -25,7 +25,7 @@ shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false -[node name="Enemy0001" node_paths=PackedStringArray("HurtArea", "HurtCollision", "MountPoint", "BackMountPoint", "InteractiveArea", "InteractiveCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_5po38")] +[node name="Enemy0001" node_paths=PackedStringArray("HurtArea", "HurtCollision", "MountPoint", "BackMountPoint", "InteractiveArea", "InteractiveCollision", "MeleeAttackArea", "MeleeAttackCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_5po38")] collision_layer = 16 collision_mask = 25 script = ExtResource("2_1plrq") @@ -35,6 +35,8 @@ BackMountPoint = NodePath("BackMountPoint") InteractiveArea = NodePath("InteractiveArea") InteractiveCollision = NodePath("InteractiveArea/InteractiveCollision") +MeleeAttackArea = NodePath("MountPoint/MeleeAttackArea") +MeleeAttackCollision = NodePath("MountPoint/MeleeAttackArea/MeleeAttackCollision") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") diff --git a/DungeonShooting_Godot/prefab/role/Role0001.tscn b/DungeonShooting_Godot/prefab/role/Role0001.tscn index b8e436d..3da3053 100644 --- a/DungeonShooting_Godot/prefab/role/Role0001.tscn +++ b/DungeonShooting_Godot/prefab/role/Role0001.tscn @@ -25,7 +25,7 @@ shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false -[node name="Role0001" node_paths=PackedStringArray("HurtArea", "HurtCollision", "MountPoint", "BackMountPoint", "InteractiveArea", "InteractiveCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_10c2n")] +[node name="Role0001" node_paths=PackedStringArray("HurtArea", "HurtCollision", "MountPoint", "BackMountPoint", "InteractiveArea", "InteractiveCollision", "MeleeAttackArea", "MeleeAttackCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_10c2n")] collision_layer = 8 script = ExtResource("2_6xwnt") HurtArea = NodePath("HurtArea") @@ -34,6 +34,8 @@ BackMountPoint = NodePath("BackMountPoint") InteractiveArea = NodePath("InteractiveArea") InteractiveCollision = NodePath("InteractiveArea/InteractiveCollision") +MeleeAttackArea = NodePath("MountPoint/MeleeAttackArea") +MeleeAttackCollision = NodePath("MountPoint/MeleeAttackArea/MeleeAttackCollision") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") diff --git a/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn b/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn index 2217fee..559a842 100644 --- a/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn +++ b/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn @@ -71,3 +71,10 @@ [node name="MountPoint" type="Marker2D" parent="."] position = Vector2(2, -8) script = ExtResource("2_5ddpw") + +[node name="MeleeAttackArea" type="Area2D" parent="MountPoint"] +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="MeleeAttackCollision" type="CollisionPolygon2D" parent="MountPoint/MeleeAttackArea"] diff --git a/DungeonShooting_Godot/prefab/ui/Debugger.tscn b/DungeonShooting_Godot/prefab/ui/Debugger.tscn new file mode 100644 index 0000000..cf76f5b --- /dev/null +++ b/DungeonShooting_Godot/prefab/ui/Debugger.tscn @@ -0,0 +1,70 @@ +[gd_scene load_steps=3 format=3 uid="uid://df0dfbrbt3ufg"] + +[ext_resource type="Script" path="res://src/game/ui/debugger/DebuggerPanel.cs" id="1_awck4"] +[ext_resource type="Texture2D" uid="uid://dfk7b7gbhsfvx" path="res://addons/dungeonShooting_plugin/Tool.svg" id="2_acjpv"] + +[node name="Debugger" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +script = ExtResource("1_awck4") +Layer = 3 + +[node name="Bg" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 0.784314) + +[node name="Clear" type="Button" parent="Bg"] +layout_mode = 0 +offset_left = 34.0 +offset_top = 33.0 +offset_right = 174.0 +offset_bottom = 73.0 +text = "清除日志" + +[node name="Close" type="Button" parent="Bg"] +layout_mode = 1 +anchors_preset = 1 +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -200.0 +offset_top = 33.0 +offset_right = -60.0 +offset_bottom = 73.0 +grow_horizontal = 0 +text = "关闭" + +[node name="ScrollContainer" type="ScrollContainer" parent="Bg"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = 101.0 +grow_horizontal = 2 +grow_vertical = 2 +horizontal_scroll_mode = 0 + +[node name="Label" type="Label" parent="Bg/ScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +autowrap_mode = 3 + +[node name="HoverButton" type="Button" parent="."] +layout_mode = 0 +offset_left = 18.0 +offset_top = 169.0 +offset_right = 46.0 +offset_bottom = 193.0 +scale = Vector2(2, 2) +icon = ExtResource("2_acjpv") +flat = true +icon_alignment = 1 diff --git a/DungeonShooting_Godot/prefab/ui/Main.tscn b/DungeonShooting_Godot/prefab/ui/Main.tscn index 3138727..fa4657f 100644 --- a/DungeonShooting_Godot/prefab/ui/Main.tscn +++ b/DungeonShooting_Godot/prefab/ui/Main.tscn @@ -12,33 +12,37 @@ grow_vertical = 2 script = ExtResource("1_s44xr") -[node name="Title" type="Label" parent="."] +[node name="ColorRect" type="ColorRect" parent="."] layout_mode = 1 -anchors_preset = 10 +anchors_preset = 15 anchor_right = 1.0 -offset_top = 172.0 -offset_bottom = 405.0 +anchor_bottom = 1.0 grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.109804, 0.0666667, 0.0901961, 1) + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Title" type="Label" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 6 theme_override_font_sizes/font_size = 160 text = "Program dungeon" horizontal_alignment = 1 vertical_alignment = 1 -[node name="ButtonList" type="VBoxContainer" parent="."] -layout_mode = 1 -anchors_preset = 7 -anchor_left = 0.5 -anchor_top = 1.0 -anchor_right = 0.5 -anchor_bottom = 1.0 -offset_left = -96.0 -offset_top = -641.0 -offset_right = 96.0 -grow_horizontal = 2 -grow_vertical = 0 +[node name="ButtonList" type="VBoxContainer" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 alignment = 1 -[node name="Start" type="Button" parent="ButtonList"] +[node name="Start" type="Button" parent="VBoxContainer/ButtonList"] custom_minimum_size = Vector2(0, 50) layout_mode = 2 focus_neighbor_top = NodePath("../Exit") @@ -47,7 +51,7 @@ text = "开始游戏 " -[node name="Tools" type="Button" parent="ButtonList"] +[node name="Tools" type="Button" parent="VBoxContainer/ButtonList"] custom_minimum_size = Vector2(0, 50) layout_mode = 2 focus_neighbor_top = NodePath("../Start") @@ -56,7 +60,7 @@ theme_override_font_sizes/font_size = 32 text = "开发者工具" -[node name="Setting" type="Button" parent="ButtonList"] +[node name="Setting" type="Button" parent="VBoxContainer/ButtonList"] custom_minimum_size = Vector2(0, 50) layout_mode = 2 focus_neighbor_top = NodePath("../Start") @@ -65,7 +69,7 @@ theme_override_font_sizes/font_size = 32 text = "设置" -[node name="Exit" type="Button" parent="ButtonList"] +[node name="Exit" type="Button" parent="VBoxContainer/ButtonList"] custom_minimum_size = Vector2(0, 50) layout_mode = 2 focus_neighbor_top = NodePath("../Setting") diff --git a/DungeonShooting_Godot/prefab/ui/MapEditor.tscn b/DungeonShooting_Godot/prefab/ui/MapEditor.tscn index 0cc0d6a..edb4ebc 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditor.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditor.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=15 format=3 uid="uid://csbxfkdupsckv"] +[gd_scene load_steps=14 format=3 uid="uid://csbxfkdupsckv"] [ext_resource type="Script" path="res://src/game/ui/mapEditor/MapEditorPanel.cs" id="1_5s7a0"] [ext_resource type="Texture2D" uid="uid://cajcnlimvoxk" path="res://resource/sprite/ui/commonIcon/Back.png" id="2_gkcw7"] -[ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileSet/TileSet1.tres" id="2_vrg60"] [ext_resource type="Texture2D" uid="uid://cat35d7ueu7gu" path="res://resource/sprite/ui/commonIcon/Save.png" id="3_qq8k4"] [ext_resource type="Texture2D" uid="uid://7l7aqhsaexoh" path="res://resource/sprite/ui/commonIcon/Play.png" id="4_2imnr"] [ext_resource type="Texture2D" uid="uid://0878uloew5jo" path="res://resource/sprite/ui/mapEditor/ErrorCell.png" id="4_465u2"] @@ -196,7 +195,6 @@ [node name="TileMap" type="TileMap" parent="Bg/VBoxContainer/HSplitContainer/Left/MarginContainer/MapView/SubViewport"] position = Vector2(500, 540) scale = Vector2(4, 4) -tile_set = ExtResource("2_vrg60") format = 2 script = ExtResource("4_mhy1a") diff --git a/DungeonShooting_Godot/prefab/ui/PauseMenu.tscn b/DungeonShooting_Godot/prefab/ui/PauseMenu.tscn new file mode 100644 index 0000000..421dd01 --- /dev/null +++ b/DungeonShooting_Godot/prefab/ui/PauseMenu.tscn @@ -0,0 +1,59 @@ +[gd_scene load_steps=3 format=3 uid="uid://bkq1wl66w3ais"] + +[ext_resource type="Script" path="res://src/game/ui/pauseMenu/PauseMenuPanel.cs" id="1_ef73i"] +[ext_resource type="Theme" uid="uid://drb1ajgvcih7p" path="res://resource/theme/theme1.tres" id="2_x1py5"] + +[node name="PauseMenu" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource("1_ef73i") +Layer = 2 + +[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 +color = Color(0, 0, 0, 0.54902) + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -64.0 +offset_top = -79.0 +offset_right = 64.0 +offset_bottom = 79.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Continue" type="Button" parent="VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 +focus_neighbor_top = NodePath("../Exit") +focus_neighbor_bottom = NodePath("../Setting") +theme = ExtResource("2_x1py5") +text = "继续" + +[node name="Restart" type="Button" parent="VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 +focus_neighbor_top = NodePath("../Exit") +focus_neighbor_bottom = NodePath("../Setting") +theme = ExtResource("2_x1py5") +text = "重新开始" + +[node name="Exit" type="Button" parent="VBoxContainer"] +custom_minimum_size = Vector2(0, 50) +layout_mode = 2 +focus_neighbor_top = NodePath("../Exit") +focus_neighbor_bottom = NodePath("../Setting") +theme = ExtResource("2_x1py5") +text = "退出游戏" diff --git a/DungeonShooting_Godot/prefab/ui/Setting.tscn b/DungeonShooting_Godot/prefab/ui/Setting.tscn new file mode 100644 index 0000000..b522b38 --- /dev/null +++ b/DungeonShooting_Godot/prefab/ui/Setting.tscn @@ -0,0 +1,65 @@ +[gd_scene load_steps=3 format=3 uid="uid://bnwweusrc44xy"] + +[ext_resource type="Script" path="res://src/game/ui/setting/SettingPanel.cs" id="1_ff0oi"] +[ext_resource type="Texture2D" uid="uid://cajcnlimvoxk" path="res://resource/sprite/ui/commonIcon/Back.png" id="2_vgl60"] + +[node name="Setting" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource("1_ff0oi") + +[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 +color = Color(0.109804, 0.0666667, 0.0901961, 1) + +[node name="Back" type="Button" parent="."] +layout_mode = 0 +offset_right = 98.0 +offset_bottom = 98.0 +icon = ExtResource("2_vgl60") +flat = true +icon_alignment = 1 +expand_icon = true + +[node name="Title" type="Label" parent="."] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_bottom = 98.0 +grow_horizontal = 2 +theme_override_font_sizes/font_size = 48 +text = "游戏设置" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = 123.0 +offset_bottom = -48.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="FullScreen" type="HBoxContainer" parent="VBoxContainer"] +custom_minimum_size = Vector2(600, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 0 + +[node name="Name" type="Label" parent="VBoxContainer/FullScreen"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "全屏" + +[node name="CheckBox" type="CheckBox" parent="VBoxContainer/FullScreen"] +layout_mode = 2 +size_flags_horizontal = 10 diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn index 2a88133..05a83fb 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://c6etppq4v63xw"] +[gd_scene load_steps=8 format=3 uid="uid://c6etppq4v63xw"] [ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_ykl0r"] [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="2_t56pk"] @@ -25,6 +25,9 @@ shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +[sub_resource type="RectangleShape2D" id="RectangleShape2D_7i6da"] +size = Vector2(22, 8.25) + [node name="Weapon0001" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_ykl0r")] script = ExtResource("2_t56pk") FirePoint = NodePath("AnimatedSprite/FirePoint") @@ -50,3 +53,7 @@ [node name="GripPoint" parent="." index="2"] position = Vector2(-5, -1) + +[node name="Collision" parent="." index="3"] +position = Vector2(0, -0.875) +shape = SubResource("RectangleShape2D_7i6da") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn index 0942b19..0d01b8d 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn @@ -1,64 +1,34 @@ -[gd_scene load_steps=10 format=3 uid="uid://doj2eilx1xtxf"] +[gd_scene load_steps=8 format=3 uid="uid://xutp8hlrwuxd"] [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_hgtyo"] +[ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_r50xc"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_8nvny"] [ext_resource type="SpriteFrames" uid="uid://domhmo4flmlt0" path="res://resource/spriteFrames/weapon/Weapon0002.tres" id="3_4h3je"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_bywvu"] resource_local_to_scene = true shader = ExtResource("2_8nvny") 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 = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false -[sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_llqbm"] resource_local_to_scene = true shader = ExtResource("2_8nvny") 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 -[sub_resource type="RectangleShape2D" id="RectangleShape2D_3p5jk"] -size = Vector2(19.5, 8.75) +[sub_resource type="RectangleShape2D" id="RectangleShape2D_aymlx"] +size = Vector2(18, 6) -[sub_resource type="Animation" id="Animation_x136i"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_3piau"] -resource_name = "floodlight" -length = 3.0 -loop_mode = 1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 2.3, 2.6, 2.7, 3), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1), -"update": 0, -"values": [0, 0, 0.5, 0.5, 0] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"] -_data = { -"RESET": SubResource("Animation_x136i"), -"floodlight": SubResource("Animation_3piau") -} - -[node name="Weapon0002" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 +[node name="Weapon0002" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_r50xc")] script = ExtResource("1_hgtyo") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") @@ -68,28 +38,22 @@ AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_cbiyh") +[node name="ShadowSprite" parent="." index="0"] +material = SubResource("ShaderMaterial_bywvu") -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_o36tv") +[node name="AnimatedSprite" parent="." index="1"] +material = SubResource("ShaderMaterial_llqbm") sprite_frames = ExtResource("3_4h3je") -animation = &"beLoaded" -[node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] +[node name="ShellPoint" parent="AnimatedSprite" index="0"] position = Vector2(-3, -2) -[node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] -position = Vector2(12, -2) +[node name="FirePoint" parent="AnimatedSprite" index="1"] +position = Vector2(11.5, -2) -[node name="GripPoint" type="Marker2D" parent="."] +[node name="GripPoint" parent="." index="2"] position = Vector2(-10, 1) -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_3p5jk") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_trkjd") -} +[node name="Collision" parent="." index="3"] +position = Vector2(0, 1) +shape = SubResource("RectangleShape2D_aymlx") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn index 18e0dd4..8575621 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn @@ -1,65 +1,34 @@ -[gd_scene load_steps=10 format=3 uid="uid://dqy4trli5wcms"] +[gd_scene load_steps=8 format=3 uid="uid://bqp56e0f7kqn0"] [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_aeolk"] +[ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_c17wt"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_4yjnk"] [ext_resource type="SpriteFrames" uid="uid://c7dt1uwdybn5" path="res://resource/spriteFrames/weapon/Weapon0003.tres" id="3_upkjt"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_c6pgc"] resource_local_to_scene = true shader = ExtResource("2_4yjnk") 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 = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false -[sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_kp0pp"] resource_local_to_scene = true shader = ExtResource("2_4yjnk") 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 -[sub_resource type="RectangleShape2D" id="RectangleShape2D_3p5jk"] -size = Vector2(14, 8) +[sub_resource type="RectangleShape2D" id="RectangleShape2D_tlu5a"] +size = Vector2(12, 7) -[sub_resource type="Animation" id="Animation_x136i"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_3piau"] -resource_name = "floodlight" -length = 3.0 -loop_mode = 1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 2.3, 2.6, 2.7, 3), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1), -"update": 0, -"values": [0, 0, 0.5, 0.5, 0] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"] -_data = { -"RESET": SubResource("Animation_x136i"), -"floodlight": SubResource("Animation_3piau") -} - -[node name="Weapon0003" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 +[node name="Weapon0003" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_c17wt")] script = ExtResource("1_aeolk") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") @@ -69,27 +38,22 @@ AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_cbiyh") +[node name="ShadowSprite" parent="." index="0"] +material = SubResource("ShaderMaterial_c6pgc") -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_o36tv") +[node name="AnimatedSprite" parent="." index="1"] +material = SubResource("ShaderMaterial_kp0pp") sprite_frames = ExtResource("3_upkjt") -[node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] +[node name="ShellPoint" parent="AnimatedSprite" index="0"] position = Vector2(0, -3) -[node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] -position = Vector2(9, -2) +[node name="FirePoint" parent="AnimatedSprite" index="1"] +position = Vector2(8, -2) -[node name="GripPoint" type="Marker2D" parent="."] +[node name="GripPoint" parent="." index="2"] position = Vector2(-4, 0) -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_3p5jk") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_trkjd") -} +[node name="Collision" parent="." index="3"] +position = Vector2(-1, 0) +shape = SubResource("RectangleShape2D_tlu5a") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn index dde6dec..cbedbe7 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn @@ -4,20 +4,29 @@ [ext_resource type="Script" path="res://src/game/activity/weapon/knife/Knife.cs" id="2_v1wer"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_63s5g"] [ext_resource type="SpriteFrames" uid="uid://k2tktysa7j86" path="res://resource/spriteFrames/weapon/Weapon0004.tres" id="4_uymcs"] -[ext_resource type="PackedScene" path="res://prefab/FanCollisionShape.tscn" id="5_nr15b"] - [sub_resource type="ShaderMaterial" id="ShaderMaterial_o5ytq"] resource_local_to_scene = true shader = ExtResource("3_63s5g") 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 = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false [sub_resource type="ShaderMaterial" id="ShaderMaterial_rtliw"] resource_local_to_scene = true shader = ExtResource("3_63s5g") 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 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_yks6x"] +size = Vector2(26, 2) [node name="Weapon0004" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_kg172")] script = ExtResource("2_v1wer") @@ -36,13 +45,19 @@ material = SubResource("ShaderMaterial_rtliw") sprite_frames = ExtResource("4_uymcs") +[node name="ShellPoint" parent="AnimatedSprite" index="0"] +position = Vector2(0, -1) + +[node name="FirePoint" parent="AnimatedSprite" index="1"] +position = Vector2(12, -1) + [node name="GripPoint" parent="." index="2"] position = Vector2(-12, -1) +[node name="Collision" parent="." index="3"] +position = Vector2(-1, -1) +shape = SubResource("RectangleShape2D_yks6x") + [node name="HitArea" type="Area2D" parent="." index="4"] monitoring = false monitorable = false - -[node name="FanCollisionShape" parent="HitArea" index="0" instance=ExtResource("5_nr15b")] -rotation = -1.5708 -scale = Vector2(3, 3) diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn index f9f1911..1fbae52 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn @@ -1,65 +1,34 @@ -[gd_scene load_steps=10 format=3 uid="uid://cisivapjn5rq2"] +[gd_scene load_steps=8 format=3 uid="uid://bwhi5e52wiiay"] [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_3lu3r"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_466gw"] +[ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_lyhyf"] [ext_resource type="SpriteFrames" uid="uid://djdvlmqsn8bie" path="res://resource/spriteFrames/weapon/Weapon0005.tres" id="2_m3plc"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_uftuv"] resource_local_to_scene = true shader = ExtResource("1_466gw") 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 = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false -[sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_irvr4"] resource_local_to_scene = true shader = ExtResource("1_466gw") 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 -[sub_resource type="RectangleShape2D" id="RectangleShape2D_3p5jk"] -size = Vector2(26, 8) +[sub_resource type="RectangleShape2D" id="RectangleShape2D_opiwr"] +size = Vector2(28, 8) -[sub_resource type="Animation" id="Animation_x136i"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_3piau"] -resource_name = "floodlight" -length = 3.0 -loop_mode = 1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 2.3, 2.6, 2.7, 3), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1), -"update": 0, -"values": [0, 0, 0.5, 0.5, 0] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"] -_data = { -"RESET": SubResource("Animation_x136i"), -"floodlight": SubResource("Animation_3piau") -} - -[node name="Weapon0005" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 +[node name="Weapon0005" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_lyhyf")] script = ExtResource("1_3lu3r") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") @@ -69,27 +38,22 @@ AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_cbiyh") +[node name="ShadowSprite" parent="." index="0"] +material = SubResource("ShaderMaterial_uftuv") -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_o36tv") +[node name="AnimatedSprite" parent="." index="1"] +material = SubResource("ShaderMaterial_irvr4") sprite_frames = ExtResource("2_m3plc") -[node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] +[node name="ShellPoint" parent="AnimatedSprite" index="0"] position = Vector2(-1, -3.5) -[node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] +[node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(20, -3.5) -[node name="GripPoint" type="Marker2D" parent="."] +[node name="GripPoint" parent="." index="2"] position = Vector2(-9, 0) -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_3p5jk") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_trkjd") -} +[node name="Collision" parent="." index="3"] +position = Vector2(-1, 0) +shape = SubResource("RectangleShape2D_opiwr") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn index 2a5a07b..2b9639a 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=10 format=3 uid="uid://uydtgdanj0kx"] +[gd_scene load_steps=8 format=3 uid="uid://bg7ggha8wqys6"] [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_5nx8j"] +[ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_kx4jd"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_rp1bw"] [ext_resource type="SpriteFrames" uid="uid://dx1mjbx4acs3q" path="res://resource/spriteFrames/weapon/Weapon0006.tres" id="2_j3sji"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_m6bme"] resource_local_to_scene = true shader = ExtResource("1_rp1bw") shader_parameter/blend = Color(0, 0, 0, 0.470588) @@ -14,7 +15,7 @@ shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false -[sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_fqjj0"] resource_local_to_scene = true shader = ExtResource("1_rp1bw") shader_parameter/blend = Color(1, 1, 1, 1) @@ -24,49 +25,10 @@ shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false -[sub_resource type="RectangleShape2D" id="RectangleShape2D_3p5jk"] -size = Vector2(12, 10) +[sub_resource type="RectangleShape2D" id="RectangleShape2D_iq77m"] +size = Vector2(12, 8) -[sub_resource type="Animation" id="Animation_x136i"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_3piau"] -resource_name = "floodlight" -length = 3.0 -loop_mode = 1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 2.3, 2.6, 2.7, 3), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1), -"update": 0, -"values": [0, 0, 0.5, 0.5, 0] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"] -_data = { -"RESET": SubResource("Animation_x136i"), -"floodlight": SubResource("Animation_3piau") -} - -[node name="Weapon0006" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 +[node name="Weapon0006" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_kx4jd")] script = ExtResource("1_5nx8j") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") @@ -76,27 +38,22 @@ AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_cbiyh") +[node name="ShadowSprite" parent="." index="0"] +material = SubResource("ShaderMaterial_m6bme") -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_o36tv") +[node name="AnimatedSprite" parent="." index="1"] +material = SubResource("ShaderMaterial_fqjj0") sprite_frames = ExtResource("2_j3sji") -[node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] +[node name="ShellPoint" parent="AnimatedSprite" index="0"] position = Vector2(-3, -2.5) -[node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] +[node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(8, -2.5) -[node name="GripPoint" type="Marker2D" parent="."] +[node name="GripPoint" parent="." index="2"] position = Vector2(-4, 1) -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_3p5jk") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_trkjd") -} +[node name="Collision" parent="." index="3"] +position = Vector2(-1, 0) +shape = SubResource("RectangleShape2D_iq77m") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn index 4277b9a..0467857 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=10 format=3 uid="uid://btd0wc11ajcuo"] +[gd_scene load_steps=8 format=3 uid="uid://cgbggnmxoi251"] +[ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_5xnlm"] [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_exwbu"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_7rywx"] [ext_resource type="SpriteFrames" uid="uid://xxyokrbt10xm" path="res://resource/spriteFrames/weapon/Weapon0007.tres" id="3_ms2gs"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_sy2aq"] resource_local_to_scene = true shader = ExtResource("2_7rywx") shader_parameter/blend = Color(0, 0, 0, 0.470588) @@ -14,7 +15,7 @@ shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false -[sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_277ni"] resource_local_to_scene = true shader = ExtResource("2_7rywx") shader_parameter/blend = Color(1, 1, 1, 1) @@ -24,49 +25,10 @@ shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false -[sub_resource type="RectangleShape2D" id="RectangleShape2D_3p5jk"] -size = Vector2(12, 10) +[sub_resource type="RectangleShape2D" id="RectangleShape2D_4pn1i"] +size = Vector2(20, 6) -[sub_resource type="Animation" id="Animation_x136i"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_3piau"] -resource_name = "floodlight" -length = 3.0 -loop_mode = 1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 2.3, 2.6, 2.7, 3), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1), -"update": 0, -"values": [0, 0, 0.5, 0.5, 0] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"] -_data = { -"RESET": SubResource("Animation_x136i"), -"floodlight": SubResource("Animation_3piau") -} - -[node name="Weapon0007" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 4 +[node name="Weapon0007" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_5xnlm")] script = ExtResource("1_exwbu") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") @@ -76,27 +38,21 @@ AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_cbiyh") +[node name="ShadowSprite" parent="." index="0"] +material = SubResource("ShaderMaterial_sy2aq") -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_o36tv") +[node name="AnimatedSprite" parent="." index="1"] +material = SubResource("ShaderMaterial_277ni") sprite_frames = ExtResource("3_ms2gs") -[node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] -position = Vector2(-1, -3) +[node name="ShellPoint" parent="AnimatedSprite" index="0"] +position = Vector2(-2, -3) -[node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] +[node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(13, -3) -[node name="GripPoint" type="Marker2D" parent="."] +[node name="GripPoint" parent="." index="2"] position = Vector2(-6, 0) -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_3p5jk") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_trkjd") -} +[node name="Collision" parent="." index="3"] +shape = SubResource("RectangleShape2D_4pn1i") diff --git a/DungeonShooting_Godot/prefab/weapon/WeaponTemplate.tscn b/DungeonShooting_Godot/prefab/weapon/WeaponTemplate.tscn index 254e507..81179a1 100644 --- a/DungeonShooting_Godot/prefab/weapon/WeaponTemplate.tscn +++ b/DungeonShooting_Godot/prefab/weapon/WeaponTemplate.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://cxltmhhp4rbyk"] +[gd_scene load_steps=7 format=3 uid="uid://cxltmhhp4rbyk"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_3p8rg"] @@ -7,15 +7,20 @@ shader = ExtResource("1_3p8rg") 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 = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false [sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"] resource_local_to_scene = true shader = ExtResource("1_3p8rg") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_3p5jk"] -size = Vector2(19.5, 8.75) +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 [sub_resource type="Animation" id="Animation_x136i"] length = 0.001 @@ -74,7 +79,6 @@ [node name="GripPoint" type="Marker2D" parent="."] [node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_3p5jk") [node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { diff --git a/DungeonShooting_Godot/project.godot b/DungeonShooting_Godot/project.godot index c36c7b6..8f16079 100644 --- a/DungeonShooting_Godot/project.godot +++ b/DungeonShooting_Godot/project.godot @@ -12,7 +12,7 @@ config/name="DungeonShooting" run/main_scene="res://scene/Main.tscn" -config/features=PackedStringArray("4.1", "C#") +config/features=PackedStringArray("4.2", "C#") config/icon="res://icon.png" [debug] @@ -211,7 +211,9 @@ [rendering] textures/canvas_textures/default_texture_filter=0 +textures/vram_compression/import_etc2_astc=true environment/defaults/default_clear_color=Color(0.109804, 0.0666667, 0.0901961, 1) +viewport/hdr_2d=true 2d/snapping/use_gpu_pixel_snap=true environment/default_environment="res://default_env.tres" diff --git a/DungeonShooting_Godot/resource/Enviromenent.tres b/DungeonShooting_Godot/resource/Enviromenent.tres deleted file mode 100644 index 1210cfb..0000000 --- a/DungeonShooting_Godot/resource/Enviromenent.tres +++ /dev/null @@ -1,10 +0,0 @@ -[gd_resource type="Environment" format=3 uid="uid://cu80ujuqcj7gx"] - -[resource] -background_mode = 3 -glow_enabled = true -glow_levels/3 = 2.0 -glow_normalized = true -glow_strength = 1.6 -glow_blend_mode = 1 -glow_hdr_threshold = 1.1 diff --git a/DungeonShooting_Godot/resource/config/Weapon.json b/DungeonShooting_Godot/resource/config/Weapon.json index 1bf292c..57bbf71 100644 --- a/DungeonShooting_Godot/resource/config/Weapon.json +++ b/DungeonShooting_Godot/resource/config/Weapon.json @@ -37,6 +37,7 @@ "ScatteringRangeAddValue": 3, "ScatteringRangeBackSpeed": 40, "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 2, "BacklashRange": [ 2, 4 @@ -46,9 +47,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0001", - "BulletHarmRange": [ + "HarmRange": [ 4 ], + "RepelRnage": [ + 20 + ], "BulletDeviationAngleRange": [ 0 ], @@ -68,8 +72,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0005", "__BeginReloadSound": "reloadBegin0004", @@ -124,6 +130,7 @@ "ScatteringRangeAddValue": 3, "ScatteringRangeBackSpeed": 40, "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 2, "BacklashRange": [ 2, 4 @@ -133,9 +140,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0001", - "BulletHarmRange": [ + "HarmRange": [ 4 ], + "RepelRnage": [ + 20 + ], "BulletDeviationAngleRange": [ 0 ], @@ -155,8 +165,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0005", "__BeginReloadSound": "reloadBegin0004", @@ -211,6 +223,7 @@ "ScatteringRangeAddValue": 20, "ScatteringRangeBackSpeed": 40, "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 4, "BacklashRange": [ 5, 6 @@ -220,9 +233,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0002", - "BulletHarmRange": [ + "HarmRange": [ 4 ], + "RepelRnage": [ + 30 + ], "BulletDeviationAngleRange": [ -10, 10 @@ -243,8 +259,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0003", "__BeginReloadSound": "reloadBegin0002", @@ -299,6 +317,7 @@ "ScatteringRangeAddValue": 20, "ScatteringRangeBackSpeed": 40, "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 4, "BacklashRange": [ 5, 6 @@ -308,9 +327,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0002", - "BulletHarmRange": [ + "HarmRange": [ 4 ], + "RepelRnage": [ + 30 + ], "BulletDeviationAngleRange": [ -10, 10 @@ -331,8 +353,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0003", "__BeginReloadSound": "reloadBegin0002", @@ -387,6 +411,7 @@ "ScatteringRangeAddValue": 4, "ScatteringRangeBackSpeed": 40, "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 4, "BacklashRange": [ 3, 5 @@ -396,9 +421,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0001", - "BulletHarmRange": [ + "HarmRange": [ 4 ], + "RepelRnage": [ + 20 + ], "BulletDeviationAngleRange": [ 0 ], @@ -418,8 +446,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0004", "__BeginReloadSound": "reloading0001", @@ -474,6 +504,7 @@ "ScatteringRangeAddValue": 4, "ScatteringRangeBackSpeed": 40, "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 4, "BacklashRange": [ 3, 5 @@ -483,9 +514,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0001", - "BulletHarmRange": [ + "HarmRange": [ 4 ], + "RepelRnage": [ + 20 + ], "BulletDeviationAngleRange": [ 0 ], @@ -505,8 +539,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0004", "__BeginReloadSound": "reloading0001", @@ -561,6 +597,7 @@ "ScatteringRangeAddValue": 0, "ScatteringRangeBackSpeed": 0, "ScatteringRangeBackDelayTime": 0, + "CameraShake": 7, "BacklashRange": [ -8 ], @@ -569,9 +606,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0001", - "BulletHarmRange": [ + "HarmRange": [ 25 ], + "RepelRnage": [ + 150 + ], "BulletDeviationAngleRange": [ 0 ], @@ -589,8 +629,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "", "__BeginReloadSound": "", @@ -645,6 +687,7 @@ "ScatteringRangeAddValue": 0, "ScatteringRangeBackSpeed": 0, "ScatteringRangeBackDelayTime": 0, + "CameraShake": 7, "BacklashRange": [ -8 ], @@ -653,9 +696,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0001", - "BulletHarmRange": [ + "HarmRange": [ 25 ], + "RepelRnage": [ + 150 + ], "BulletDeviationAngleRange": [ 0 ], @@ -673,8 +719,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "", "__BeginReloadSound": "", @@ -729,6 +777,7 @@ "ScatteringRangeAddValue": 40, "ScatteringRangeBackSpeed": 40, "ScatteringRangeBackDelayTime": 0.8, + "CameraShake": 5, "BacklashRange": [ 5, 7 @@ -738,9 +787,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0001", - "BulletHarmRange": [ + "HarmRange": [ 30 ], + "RepelRnage": [ + 250 + ], "BulletDeviationAngleRange": [ 0 ], @@ -760,8 +812,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0008", "__BeginReloadSound": "reloadBegin0009", @@ -816,6 +870,7 @@ "ScatteringRangeAddValue": 40, "ScatteringRangeBackSpeed": 40, "ScatteringRangeBackDelayTime": 0.8, + "CameraShake": 5, "BacklashRange": [ 5, 7 @@ -825,9 +880,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0001", - "BulletHarmRange": [ + "HarmRange": [ 30 ], + "RepelRnage": [ + 250 + ], "BulletDeviationAngleRange": [ 0 ], @@ -847,8 +905,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0008", "__BeginReloadSound": "reloadBegin0009", @@ -903,6 +963,7 @@ "ScatteringRangeAddValue": 2, "ScatteringRangeBackSpeed": 40, "ScatteringRangeBackDelayTime": 0.3, + "CameraShake": 2, "BacklashRange": [ 1, 2 @@ -912,9 +973,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0002", - "BulletHarmRange": [ + "HarmRange": [ 3 ], + "RepelRnage": [ + 10 + ], "BulletDeviationAngleRange": [ 0 ], @@ -934,8 +998,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0002", "__BeginReloadSound": "reloadBegin0005", @@ -990,6 +1056,7 @@ "ScatteringRangeAddValue": 2, "ScatteringRangeBackSpeed": 30, "ScatteringRangeBackDelayTime": 0.3, + "CameraShake": 2, "BacklashRange": [ 1, 2 @@ -999,9 +1066,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0002", - "BulletHarmRange": [ + "HarmRange": [ 3 ], + "RepelRnage": [ + 10 + ], "BulletDeviationAngleRange": [ 0 ], @@ -1021,8 +1091,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0002", "__BeginReloadSound": "reloadBegin0005", @@ -1077,6 +1149,7 @@ "ScatteringRangeAddValue": 3, "ScatteringRangeBackSpeed": 50, "ScatteringRangeBackDelayTime": 0.3, + "CameraShake": 2, "BacklashRange": [ 1, 2 @@ -1086,9 +1159,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0003", - "BulletHarmRange": [ + "HarmRange": [ 3 ], + "RepelRnage": [ + 15 + ], "BulletDeviationAngleRange": [ 0 ], @@ -1108,8 +1184,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0007", "__BeginReloadSound": "reloadBegin0006", @@ -1164,6 +1242,7 @@ "ScatteringRangeAddValue": 3, "ScatteringRangeBackSpeed": 50, "ScatteringRangeBackDelayTime": 0.3, + "CameraShake": 2, "BacklashRange": [ 1, 2 @@ -1173,9 +1252,12 @@ "DefaultAngle": 0, "UpliftAngleRestore": 1, "BulletId": "bullet0003", - "BulletHarmRange": [ + "HarmRange": [ 3 ], + "RepelRnage": [ + 15 + ], "BulletDeviationAngleRange": [ 0 ], @@ -1195,8 +1277,10 @@ }, "CanMeleeAttack": true, "MeleeAttackHarmRange": [ - 5, - 8 + 10 + ], + "MeleeAttackRepelRnage": [ + 100 ], "__ShootSound": "shooting0007", "__BeginReloadSound": "reloadBegin0006", diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json index ce8105f..f5cded9 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json @@ -1,36 +1,40 @@ { "TestGroup1": { - "GroupName": "TestGroup1", - "BattleList": [ - { - "ErrorType": 0, - "Path": "resource/map/tileMaps/TestGroup1/battle/Battle1" - }, - { - "ErrorType": 0, - "Path": "resource/map/tileMaps/TestGroup1/battle/Battle2" - }, - { - "ErrorType": 0, - "Path": "resource/map/tileMaps/TestGroup1/battle/Battle3" - } - ], - "InletList": [ - { - "ErrorType": 0, - "Path": "resource/map/tileMaps/TestGroup1/inlet/Start1" - } - ], - "OutletList": [ - { - "ErrorType": 0, - "Path": "resource/map/tileMaps/TestGroup1/outlet/End1" - } - ], - "BossList": [], - "RewardList": [], - "ShopList": [], - "EventList": [], - "Remark": "\u6D4B\u8BD5\u7EC4" + "GroupName": "TestGroup1", + "BattleList": [ + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/battle/Battle1" + }, + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/battle/Battle2" + }, + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/battle/Battle3" + } + ], + "InletList": [ + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/inlet/Start1" + }, + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/inlet/Start2" + } + ], + "OutletList": [ + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/outlet/End1" + } + ], + "BossList": [], + "RewardList": [], + "ShopList": [], + "EventList": [], + "Remark": "\u6D4B\u8BD5\u7EC4" } -} \ No newline at end of file +} diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle3/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle3/Preview.png index 95d5f00..d6290c0 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle3/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle3/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle3/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle3/TileInfo.json index 6e7dcaa..c0ec3fa 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle3/TileInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle3/TileInfo.json @@ -1 +1 @@ -{"NavigationList":[{"Type":0,"Points":[184,120,376,120,376,152,440,152,440,216,520,216,520,384,456,384,456,464,312,464,312,480,184,480]},{"Type":1,"Points":[264,240,392,240,392,272,424,272,424,344,408,344,408,392,360,392,360,312,312,312,312,328,296,328,296,392,248,392,248,256,264,256]}],"Floor":[32,23,0,0,8,32,22,0,0,8,32,21,0,0,8,32,20,0,0,8,32,19,0,0,8,32,18,0,0,8,32,17,0,0,8,32,16,0,0,8,32,15,0,0,8,32,14,0,0,8,32,13,0,0,8,31,23,0,0,8,31,22,0,0,8,31,21,0,0,8,31,20,0,0,8,31,19,0,0,8,31,18,0,0,8,31,17,0,0,8,31,16,0,0,8,31,15,0,0,8,31,14,0,0,8,31,13,0,0,8,30,23,0,0,8,30,22,0,0,8,30,21,0,0,8,30,20,0,0,8,30,19,0,0,8,30,18,0,0,8,30,17,0,0,8,30,16,0,0,8,30,15,0,0,8,30,14,0,0,8,30,13,0,0,8,29,23,0,0,8,29,22,0,0,8,29,21,0,0,8,29,20,0,0,8,29,19,0,0,8,29,18,0,0,8,29,17,0,0,8,29,16,0,0,8,29,15,0,0,8,29,14,0,0,8,29,13,0,0,8,28,28,0,0,8,28,27,0,0,8,28,26,0,0,8,28,25,0,0,8,28,24,0,0,8,28,23,0,0,8,28,22,0,0,8,28,21,0,0,8,28,20,0,0,8,28,19,0,0,8,28,18,0,0,8,28,17,0,0,8,28,16,0,0,8,28,15,0,0,8,28,14,0,0,8,28,13,0,0,8,27,28,0,0,8,27,27,0,0,8,27,26,0,0,8,27,25,0,0,8,27,24,0,0,8,27,23,0,0,8,27,22,0,0,8,27,21,0,0,8,27,20,0,0,8,27,19,0,0,8,27,18,0,0,8,27,17,0,0,8,27,16,0,0,8,27,15,0,0,8,27,14,0,0,8,27,13,0,0,8,27,9,0,0,8,27,10,0,0,8,27,11,0,0,8,27,12,0,0,8,26,28,0,0,8,26,27,0,0,8,26,26,0,0,8,26,25,0,0,8,26,24,0,0,8,26,23,0,0,8,26,22,0,0,8,26,21,0,0,8,26,20,0,0,8,26,19,0,0,8,26,18,0,0,8,26,17,0,0,8,26,16,0,0,8,26,15,0,0,8,26,14,0,0,8,26,13,0,0,8,26,9,0,0,8,26,10,0,0,8,26,11,0,0,8,26,12,0,0,8,25,28,0,0,8,25,27,0,0,8,25,26,0,0,8,25,25,0,0,8,25,24,0,0,8,25,23,0,0,8,25,22,0,0,8,25,21,0,0,8,25,16,0,0,8,25,15,0,0,8,25,14,0,0,8,25,13,0,0,8,25,9,0,0,8,25,10,0,0,8,25,11,0,0,8,25,12,0,0,8,24,28,0,0,8,24,27,0,0,8,24,26,0,0,8,24,25,0,0,8,24,24,0,0,8,24,16,0,0,8,24,15,0,0,8,24,14,0,0,8,24,13,0,0,8,24,9,0,0,8,24,10,0,0,8,24,11,0,0,8,24,12,0,0,8,23,28,0,0,8,23,27,0,0,8,23,26,0,0,8,23,25,0,0,8,23,24,0,0,8,23,14,0,0,8,23,13,0,0,8,23,7,0,0,8,23,8,0,0,8,23,9,0,0,8,23,10,0,0,8,23,11,0,0,8,23,12,0,0,8,22,28,0,0,8,22,27,0,0,8,22,26,0,0,8,22,25,0,0,8,22,24,0,0,8,22,23,0,0,8,22,22,0,0,8,22,21,0,0,8,22,20,0,0,8,22,19,0,0,8,22,7,0,0,8,22,8,0,0,8,22,9,0,0,8,22,10,0,0,8,22,11,0,0,8,22,12,0,0,8,22,13,0,0,8,22,14,0,0,8,21,28,0,0,8,21,27,0,0,8,21,26,0,0,8,21,25,0,0,8,21,24,0,0,8,21,23,0,0,8,21,22,0,0,8,21,21,0,0,8,21,20,0,0,8,21,19,0,0,8,21,7,0,0,8,21,8,0,0,8,21,9,0,0,8,21,10,0,0,8,21,11,0,0,8,21,12,0,0,8,21,13,0,0,8,21,14,0,0,8,20,28,0,0,8,20,27,0,0,8,20,26,0,0,8,20,25,0,0,8,20,24,0,0,8,20,23,0,0,8,20,22,0,0,8,20,21,0,0,8,20,20,0,0,8,20,19,0,0,8,20,7,0,0,8,20,8,0,0,8,20,9,0,0,8,20,10,0,0,8,20,11,0,0,8,20,12,0,0,8,20,13,0,0,8,20,14,0,0,8,19,29,0,0,8,19,28,0,0,8,19,27,0,0,8,19,26,0,0,8,19,25,0,0,8,19,24,0,0,8,19,23,0,0,8,19,22,0,0,8,19,21,0,0,8,19,20,0,0,8,19,19,0,0,8,19,7,0,0,8,19,8,0,0,8,19,9,0,0,8,19,10,0,0,8,19,11,0,0,8,19,12,0,0,8,19,13,0,0,8,19,14,0,0,8,18,29,0,0,8,18,28,0,0,8,18,27,0,0,8,18,26,0,0,8,18,25,0,0,8,18,24,0,0,8,18,23,0,0,8,18,22,0,0,8,18,21,0,0,8,18,20,0,0,8,18,7,0,0,8,18,8,0,0,8,18,9,0,0,8,18,10,0,0,8,18,11,0,0,8,18,12,0,0,8,18,13,0,0,8,18,14,0,0,8,17,29,0,0,8,17,28,0,0,8,17,27,0,0,8,17,26,0,0,8,17,25,0,0,8,17,24,0,0,8,17,7,0,0,8,17,8,0,0,8,17,9,0,0,8,17,10,0,0,8,17,11,0,0,8,17,12,0,0,8,17,13,0,0,8,17,14,0,0,8,16,29,0,0,8,16,28,0,0,8,16,27,0,0,8,16,26,0,0,8,16,25,0,0,8,16,24,0,0,8,16,7,0,0,8,16,8,0,0,8,16,9,0,0,8,16,10,0,0,8,16,11,0,0,8,16,12,0,0,8,16,13,0,0,8,16,14,0,0,8,16,15,0,0,8,15,29,0,0,8,15,28,0,0,8,15,27,0,0,8,15,26,0,0,8,15,25,0,0,8,15,24,0,0,8,15,23,0,0,8,15,22,0,0,8,15,21,0,0,8,15,20,0,0,8,15,7,0,0,8,15,8,0,0,8,15,9,0,0,8,15,10,0,0,8,15,11,0,0,8,15,12,0,0,8,15,13,0,0,8,15,14,0,0,8,15,15,0,0,8,15,16,0,0,8,15,17,0,0,8,15,18,0,0,8,15,19,0,0,8,14,29,0,0,8,14,28,0,0,8,14,27,0,0,8,14,26,0,0,8,14,25,0,0,8,14,24,0,0,8,14,23,0,0,8,14,22,0,0,8,14,21,0,0,8,14,20,0,0,8,14,7,0,0,8,14,8,0,0,8,14,9,0,0,8,14,10,0,0,8,14,11,0,0,8,14,12,0,0,8,14,13,0,0,8,14,14,0,0,8,14,15,0,0,8,14,16,0,0,8,14,17,0,0,8,14,18,0,0,8,14,19,0,0,8,13,29,0,0,8,13,28,0,0,8,13,27,0,0,8,13,26,0,0,8,13,25,0,0,8,13,24,0,0,8,13,23,0,0,8,13,22,0,0,8,13,21,0,0,8,13,20,0,0,8,13,7,0,0,8,13,8,0,0,8,13,9,0,0,8,13,10,0,0,8,13,11,0,0,8,13,12,0,0,8,13,13,0,0,8,13,14,0,0,8,13,15,0,0,8,13,16,0,0,8,13,17,0,0,8,13,18,0,0,8,13,19,0,0,8,12,29,0,0,8,12,28,0,0,8,12,27,0,0,8,12,26,0,0,8,12,25,0,0,8,12,24,0,0,8,12,23,0,0,8,12,22,0,0,8,12,21,0,0,8,12,20,0,0,8,12,7,0,0,8,12,8,0,0,8,12,9,0,0,8,12,10,0,0,8,12,11,0,0,8,12,12,0,0,8,12,13,0,0,8,12,14,0,0,8,12,15,0,0,8,12,16,0,0,8,12,17,0,0,8,12,18,0,0,8,12,19,0,0,8,11,29,0,0,8,11,28,0,0,8,11,27,0,0,8,11,26,0,0,8,11,25,0,0,8,11,24,0,0,8,11,23,0,0,8,11,22,0,0,8,11,21,0,0,8,11,20,0,0,8,11,7,0,0,8,11,8,0,0,8,11,9,0,0,8,11,10,0,0,8,11,11,0,0,8,11,12,0,0,8,11,13,0,0,8,11,14,0,0,8,11,15,0,0,8,11,16,0,0,8,11,17,0,0,8,11,18,0,0,8,11,19,0,0,8],"Middle":[11,6,0,2,7,12,6,0,2,7,13,6,0,2,7,14,6,0,2,7,15,6,0,2,7,16,6,0,2,7,16,23,0,1,7,17,6,0,2,7,17,23,0,3,7,18,6,0,2,7,18,19,0,3,7,19,6,0,2,7,19,18,0,2,7,20,6,0,2,7,20,18,0,2,7,21,6,0,2,7,21,18,0,2,7,22,6,0,2,7,22,18,0,2,7,23,6,0,2,7,23,23,0,1,7,24,8,0,1,7,24,23,0,3,7,25,8,0,2,7,25,20,0,3,7,26,8,0,2,7,27,8,0,2,7,28,12,0,1,7,29,12,0,2,7,30,12,0,2,7,31,12,0,2,7,32,12,0,2,7],"Top":[10,6,0,3,4,10,7,0,3,3,10,8,0,3,3,10,9,0,3,3,10,10,0,3,3,10,11,0,3,3,10,12,0,3,3,10,13,0,3,3,10,14,0,3,3,10,15,0,3,3,10,16,0,3,3,10,17,0,3,3,10,18,0,3,3,10,19,0,3,3,10,20,0,3,3,10,21,0,3,3,10,22,0,3,3,10,23,0,3,3,10,24,0,3,3,10,25,0,3,3,10,26,0,3,3,10,27,0,3,3,10,28,0,3,3,10,29,0,3,3,10,30,0,11,2,11,30,0,2,2,12,30,0,2,2,13,30,0,2,2,14,30,0,2,2,15,30,0,2,2,16,16,0,1,2,16,17,0,1,3,16,18,0,1,3,16,19,0,1,3,16,20,0,1,3,16,21,0,1,3,16,22,0,1,3,16,30,0,2,2,17,15,0,1,2,17,16,0,13,2,17,19,0,3,4,17,20,0,3,3,17,21,0,3,3,17,22,0,3,3,17,30,0,2,2,18,15,0,2,2,18,18,0,3,4,18,30,0,2,2,19,15,0,2,2,19,30,0,2,2,20,15,0,2,2,20,29,0,1,2,20,30,0,13,2,21,15,0,2,2,21,29,0,2,2,22,15,0,2,2,22,29,0,2,2,23,15,0,3,2,23,16,0,3,3,23,17,0,11,2,23,18,0,1,4,23,19,0,1,3,23,20,0,1,3,23,21,0,1,3,23,22,0,1,3,23,29,0,2,2,24,6,0,1,4,24,7,0,1,3,24,17,0,2,2,24,20,0,3,4,24,21,0,3,3,24,22,0,3,3,24,29,0,2,2,25,17,0,3,2,25,18,0,3,3,25,19,0,3,3,25,29,0,2,2,26,29,0,2,2,27,29,0,2,2,28,8,0,1,4,28,9,0,1,3,28,10,0,1,3,28,11,0,1,3,28,29,0,2,2,29,24,0,1,2,29,25,0,1,3,29,26,0,1,3,29,27,0,1,3,29,28,0,1,3,29,29,0,13,2,30,24,0,2,2,31,24,0,2,2,32,24,0,2,2,33,12,0,1,4,33,13,0,1,3,33,14,0,1,3,33,15,0,1,3,33,16,0,1,3,33,17,0,1,3,33,18,0,1,3,33,19,0,1,3,33,20,0,1,3,33,21,0,1,3,33,22,0,1,3,33,23,0,1,3,33,24,0,13,2]} \ No newline at end of file +{"NavigationList":[{"Type":0,"Points":[184,120,376,120,376,152,440,152,440,216,520,216,520,384,456,384,456,464,312,464,312,480,184,480]},{"Type":1,"Points":[264,240,392,240,392,256,408,256,408,272,424,272,424,344,408,344,408,392,360,392,360,328,296,328,296,312,280,312,280,392,232,392,232,272,248,272,248,256,264,256]}],"Floor":[32,23,0,0,8,32,22,0,0,8,32,21,0,0,8,32,20,0,0,8,32,19,0,0,8,32,18,0,0,8,32,17,0,0,8,32,16,0,0,8,32,15,0,0,8,32,14,0,0,8,32,13,0,0,8,31,23,0,0,8,31,22,0,0,8,31,21,0,0,8,31,20,0,0,8,31,19,0,0,8,31,18,0,0,8,31,17,0,0,8,31,16,0,0,8,31,15,0,0,8,31,14,0,0,8,31,13,0,0,8,30,23,0,0,8,30,22,0,0,8,30,21,0,0,8,30,20,0,0,8,30,19,0,0,8,30,18,0,0,8,30,17,0,0,8,30,16,0,0,8,30,15,0,0,8,30,14,0,0,8,30,13,0,0,8,29,23,0,0,8,29,22,0,0,8,29,21,0,0,8,29,20,0,0,8,29,19,0,0,8,29,18,0,0,8,29,17,0,0,8,29,16,0,0,8,29,15,0,0,8,29,14,0,0,8,29,13,0,0,8,28,28,0,0,8,28,27,0,0,8,28,26,0,0,8,28,25,0,0,8,28,24,0,0,8,28,23,0,0,8,28,22,0,0,8,28,21,0,0,8,28,20,0,0,8,28,19,0,0,8,28,18,0,0,8,28,17,0,0,8,28,16,0,0,8,28,15,0,0,8,28,14,0,0,8,28,13,0,0,8,27,28,0,0,8,27,27,0,0,8,27,26,0,0,8,27,25,0,0,8,27,24,0,0,8,27,23,0,0,8,27,22,0,0,8,27,21,0,0,8,27,20,0,0,8,27,19,0,0,8,27,18,0,0,8,27,17,0,0,8,27,16,0,0,8,27,15,0,0,8,27,14,0,0,8,27,13,0,0,8,27,9,0,0,8,27,10,0,0,8,27,11,0,0,8,27,12,0,0,8,26,28,0,0,8,26,27,0,0,8,26,26,0,0,8,26,25,0,0,8,26,24,0,0,8,26,23,0,0,8,26,22,0,0,8,26,21,0,0,8,26,20,0,0,8,26,19,0,0,8,26,18,0,0,8,26,17,0,0,8,26,16,0,0,8,26,15,0,0,8,26,14,0,0,8,26,13,0,0,8,26,9,0,0,8,26,10,0,0,8,26,11,0,0,8,26,12,0,0,8,25,28,0,0,8,25,27,0,0,8,25,26,0,0,8,25,25,0,0,8,25,24,0,0,8,25,23,0,0,8,25,22,0,0,8,25,21,0,0,8,25,16,0,0,8,25,15,0,0,8,25,14,0,0,8,25,13,0,0,8,25,9,0,0,8,25,10,0,0,8,25,11,0,0,8,25,12,0,0,8,24,28,0,0,8,24,27,0,0,8,24,26,0,0,8,24,25,0,0,8,24,24,0,0,8,24,15,0,0,8,24,14,0,0,8,24,13,0,0,8,24,9,0,0,8,24,10,0,0,8,24,11,0,0,8,24,12,0,0,8,23,28,0,0,8,23,27,0,0,8,23,26,0,0,8,23,25,0,0,8,23,24,0,0,8,23,14,0,0,8,23,13,0,0,8,23,7,0,0,8,23,8,0,0,8,23,9,0,0,8,23,10,0,0,8,23,11,0,0,8,23,12,0,0,8,22,28,0,0,8,22,27,0,0,8,22,26,0,0,8,22,25,0,0,8,22,24,0,0,8,22,23,0,0,8,22,22,0,0,8,22,21,0,0,8,22,20,0,0,8,22,7,0,0,8,22,8,0,0,8,22,9,0,0,8,22,10,0,0,8,22,11,0,0,8,22,12,0,0,8,22,13,0,0,8,22,14,0,0,8,21,28,0,0,8,21,27,0,0,8,21,26,0,0,8,21,25,0,0,8,21,24,0,0,8,21,23,0,0,8,21,22,0,0,8,21,21,0,0,8,21,20,0,0,8,21,7,0,0,8,21,8,0,0,8,21,9,0,0,8,21,10,0,0,8,21,11,0,0,8,21,12,0,0,8,21,13,0,0,8,21,14,0,0,8,20,28,0,0,8,20,27,0,0,8,20,26,0,0,8,20,25,0,0,8,20,24,0,0,8,20,23,0,0,8,20,22,0,0,8,20,21,0,0,8,20,20,0,0,8,20,7,0,0,8,20,8,0,0,8,20,9,0,0,8,20,10,0,0,8,20,11,0,0,8,20,12,0,0,8,20,13,0,0,8,20,14,0,0,8,19,29,0,0,8,19,28,0,0,8,19,27,0,0,8,19,26,0,0,8,19,25,0,0,8,19,24,0,0,8,19,23,0,0,8,19,22,0,0,8,19,21,0,0,8,19,20,0,0,8,19,7,0,0,8,19,8,0,0,8,19,9,0,0,8,19,10,0,0,8,19,11,0,0,8,19,12,0,0,8,19,13,0,0,8,19,14,0,0,8,18,19,0,0,8,18,29,0,0,8,18,28,0,0,8,18,27,0,0,8,18,26,0,0,8,18,25,0,0,8,18,24,0,0,8,18,23,0,0,8,18,22,0,0,8,18,21,0,0,8,18,20,0,0,8,18,7,0,0,8,18,8,0,0,8,18,9,0,0,8,18,10,0,0,8,18,11,0,0,8,18,12,0,0,8,18,13,0,0,8,18,14,0,0,8,17,19,0,0,8,17,23,0,0,8,17,22,0,0,8,17,21,0,0,8,17,20,0,0,8,17,29,0,0,8,17,28,0,0,8,17,27,0,0,8,17,26,0,0,8,17,25,0,0,8,17,24,0,0,8,17,7,0,0,8,17,8,0,0,8,17,9,0,0,8,17,10,0,0,8,17,11,0,0,8,17,12,0,0,8,17,13,0,0,8,17,14,0,0,8,16,29,0,0,8,16,28,0,0,8,16,27,0,0,8,16,26,0,0,8,16,25,0,0,8,16,24,0,0,8,16,7,0,0,8,16,8,0,0,8,16,9,0,0,8,16,10,0,0,8,16,11,0,0,8,16,12,0,0,8,16,13,0,0,8,16,14,0,0,8,16,15,0,0,8,15,29,0,0,8,15,28,0,0,8,15,27,0,0,8,15,26,0,0,8,15,25,0,0,8,15,24,0,0,8,15,7,0,0,8,15,8,0,0,8,15,9,0,0,8,15,10,0,0,8,15,11,0,0,8,15,12,0,0,8,15,13,0,0,8,15,14,0,0,8,15,15,0,0,8,15,16,0,0,8,14,29,0,0,8,14,28,0,0,8,14,27,0,0,8,14,26,0,0,8,14,25,0,0,8,14,24,0,0,8,14,23,0,0,8,14,22,0,0,8,14,21,0,0,8,14,20,0,0,8,14,7,0,0,8,14,8,0,0,8,14,9,0,0,8,14,10,0,0,8,14,11,0,0,8,14,12,0,0,8,14,13,0,0,8,14,14,0,0,8,14,15,0,0,8,14,16,0,0,8,14,17,0,0,8,14,18,0,0,8,14,19,0,0,8,13,29,0,0,8,13,28,0,0,8,13,27,0,0,8,13,26,0,0,8,13,25,0,0,8,13,24,0,0,8,13,23,0,0,8,13,22,0,0,8,13,21,0,0,8,13,20,0,0,8,13,7,0,0,8,13,8,0,0,8,13,9,0,0,8,13,10,0,0,8,13,11,0,0,8,13,12,0,0,8,13,13,0,0,8,13,14,0,0,8,13,15,0,0,8,13,16,0,0,8,13,17,0,0,8,13,18,0,0,8,13,19,0,0,8,12,29,0,0,8,12,28,0,0,8,12,27,0,0,8,12,26,0,0,8,12,25,0,0,8,12,24,0,0,8,12,23,0,0,8,12,22,0,0,8,12,21,0,0,8,12,20,0,0,8,12,7,0,0,8,12,8,0,0,8,12,9,0,0,8,12,10,0,0,8,12,11,0,0,8,12,12,0,0,8,12,13,0,0,8,12,14,0,0,8,12,15,0,0,8,12,16,0,0,8,12,17,0,0,8,12,18,0,0,8,12,19,0,0,8,11,29,0,0,8,11,28,0,0,8,11,27,0,0,8,11,26,0,0,8,11,25,0,0,8,11,24,0,0,8,11,23,0,0,8,11,22,0,0,8,11,21,0,0,8,11,20,0,0,8,11,7,0,0,8,11,8,0,0,8,11,9,0,0,8,11,10,0,0,8,11,11,0,0,8,11,12,0,0,8,11,13,0,0,8,11,14,0,0,8,11,15,0,0,8,11,16,0,0,8,11,17,0,0,8,11,18,0,0,8,11,19,0,0,8],"Middle":[11,6,0,2,7,12,6,0,2,7,13,6,0,2,7,14,6,0,2,7,15,6,0,2,7,15,23,0,1,7,16,6,0,2,7,16,23,0,3,7,17,6,0,2,7,17,18,0,2,7,18,6,0,2,7,18,18,0,2,7,19,6,0,2,7,19,19,0,1,7,20,6,0,2,7,20,19,0,2,7,21,6,0,2,7,21,19,0,2,7,22,6,0,2,7,22,19,0,2,7,23,6,0,2,7,23,23,0,1,7,24,8,0,1,7,24,23,0,3,7,25,8,0,2,7,25,20,0,3,7,26,8,0,2,7,27,8,0,2,7,28,12,0,1,7,29,12,0,2,7,30,12,0,2,7,31,12,0,2,7,32,12,0,2,7],"Top":[10,6,0,3,4,10,7,0,3,3,10,8,0,3,3,10,9,0,3,3,10,10,0,3,3,10,11,0,3,3,10,12,0,3,3,10,13,0,3,3,10,14,0,3,3,10,15,0,3,3,10,16,0,3,3,10,17,0,3,3,10,18,0,3,3,10,19,0,3,3,10,20,0,3,3,10,21,0,3,3,10,22,0,3,3,10,23,0,3,3,10,24,0,3,3,10,25,0,3,3,10,26,0,3,3,10,27,0,3,3,10,28,0,3,3,10,29,0,3,3,10,30,0,11,2,11,30,0,2,2,12,30,0,2,2,13,30,0,2,2,14,30,0,2,2,15,17,0,1,2,15,18,0,1,3,15,19,0,1,3,15,20,0,1,3,15,21,0,1,3,15,22,0,1,3,15,30,0,2,2,16,16,0,1,2,16,17,0,13,2,16,18,0,3,4,16,19,0,3,3,16,20,0,3,3,16,21,0,3,3,16,22,0,3,3,16,30,0,2,2,17,15,0,1,2,17,16,0,13,2,17,30,0,2,2,18,15,0,2,2,18,30,0,2,2,19,15,0,2,2,19,18,0,1,4,19,30,0,2,2,20,15,0,2,2,20,29,0,1,2,20,30,0,13,2,21,15,0,2,2,21,29,0,2,2,22,15,0,2,2,22,29,0,2,2,23,15,0,3,2,23,16,0,11,2,23,19,0,1,4,23,20,0,1,3,23,21,0,1,3,23,22,0,1,3,23,29,0,2,2,24,6,0,1,4,24,7,0,1,3,24,16,0,3,2,24,17,0,11,2,24,20,0,3,4,24,21,0,3,3,24,22,0,3,3,24,29,0,2,2,25,17,0,3,2,25,18,0,3,3,25,19,0,3,3,25,29,0,2,2,26,29,0,2,2,27,29,0,2,2,28,8,0,1,4,28,9,0,1,3,28,10,0,1,3,28,11,0,1,3,28,29,0,2,2,29,24,0,1,2,29,25,0,1,3,29,26,0,1,3,29,27,0,1,3,29,28,0,1,3,29,29,0,13,2,30,24,0,2,2,31,24,0,2,2,32,24,0,2,2,33,12,0,1,4,33,13,0,1,3,33,14,0,1,3,33,15,0,1,3,33,16,0,1,3,33,17,0,1,3,33,18,0,1,3,33,19,0,1,3,33,20,0,1,3,33,21,0,1,3,33,22,0,1,3,33,23,0,1,3,33,24,0,13,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json index 1c55d41..fd75129 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json @@ -1 +1 @@ -[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":19,"Y":2},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":10,"Y":22},"Size":{"X":0,"Y":0},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]}],[{"Position":{"X":11,"Y":38},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-15,"Y":31},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"prop5000","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":36,"Y":36},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":35,"Y":2},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1.5,"MarkList":[{"Id":"prop0002","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-12,"Y":3},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":2,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-36,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5000","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":56,"Y":-24},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file +[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":19,"Y":2},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-76,"Y":35},"Size":{"X":0,"Y":0},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-79,"Y":46},"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":-75,"Y":2},"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":-75,"Y":67},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-73,"Y":-18},"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":-76,"Y":21},"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":-74,"Y":-30},"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":55,"Y":67},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":56,"Y":24},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"prop5000","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":56,"Y":0},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":34,"Y":23},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1.5,"MarkList":[{"Id":"prop0002","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":55,"Y":44},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":56,"Y":-24},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preview.png index 3f0900c..d64d95a 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/RoomInfo.json index 4285d01..6005b11 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/RoomInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/RoomInfo.json @@ -1 +1 @@ -{"Position":{"X":-5,"Y":-4},"Size":{"X":11,"Y":10},"DoorAreaInfos":[],"GroupName":"TestGroup1","RoomType":1,"RoomName":"Start1","Weight":100,"Remark":""} \ No newline at end of file +{"Position":{"X":-8,"Y":-4},"Size":{"X":15,"Y":10},"DoorAreaInfos":[{"Direction":3,"Start":0,"End":208},{"Direction":0,"Start":0,"End":128},{"Direction":2,"Start":128,"End":208},{"Direction":1,"Start":0,"End":128},{"Direction":2,"Start":0,"End":64}],"GroupName":"TestGroup1","RoomType":1,"RoomName":"Start1","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/TileInfo.json index 22e1c00..68ed08e 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/TileInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/TileInfo.json @@ -1 +1 @@ -{"NavigationList":[{"Type":0,"Points":[-56,-40,72,-40,72,80,-56,80]}],"Floor":[-4,-3,0,0,8,-4,-2,0,0,8,-4,-1,0,0,8,-4,0,0,0,8,-4,1,0,0,8,-4,2,0,0,8,-4,3,0,0,8,-4,4,0,0,8,-3,-3,0,0,8,-3,-2,0,0,8,-3,-1,0,0,8,-3,0,0,0,8,-3,1,0,0,8,-3,2,0,0,8,-3,3,0,0,8,-3,4,0,0,8,-2,-3,0,0,8,-2,-2,0,0,8,-2,-1,0,0,8,-2,0,0,0,8,-2,1,0,0,8,-2,2,0,0,8,-2,3,0,0,8,-2,4,0,0,8,-1,-3,0,0,8,-1,-2,0,0,8,-1,-1,0,0,8,-1,0,0,0,8,-1,1,0,0,8,-1,2,0,0,8,-1,3,0,0,8,-1,4,0,0,8,0,-3,0,0,8,0,-2,0,0,8,0,-1,0,0,8,0,0,0,0,8,0,1,0,0,8,0,2,0,0,8,0,3,0,0,8,0,4,0,0,8,4,-3,0,0,8,4,-2,0,0,8,4,-1,0,0,8,4,0,0,0,8,4,1,0,0,8,4,2,0,0,8,4,3,0,0,8,4,4,0,0,8,3,-3,0,0,8,3,-2,0,0,8,3,-1,0,0,8,3,0,0,0,8,3,1,0,0,8,3,2,0,0,8,3,3,0,0,8,3,4,0,0,8,2,-3,0,0,8,2,-2,0,0,8,2,-1,0,0,8,2,0,0,0,8,2,1,0,0,8,2,2,0,0,8,2,3,0,0,8,2,4,0,0,8,1,-3,0,0,8,1,-2,0,0,8,1,-1,0,0,8,1,0,0,0,8,1,1,0,0,8,1,2,0,0,8,1,3,0,0,8,1,4,0,0,8],"Middle":[-4,-4,0,2,7,-3,-4,0,2,7,-2,-4,0,2,7,-1,-4,0,2,7,0,-4,0,2,7,1,-4,0,2,7,2,-4,0,2,7,3,-4,0,2,7,4,-4,0,2,7],"Top":[-5,-4,0,3,4,-5,-3,0,3,3,-5,-2,0,3,3,-5,-1,0,3,3,-5,0,0,3,3,-5,1,0,3,3,-5,2,0,3,3,-5,3,0,3,3,-5,4,0,3,3,-5,5,0,11,2,-4,5,0,2,2,-3,5,0,2,2,-2,5,0,2,2,-1,5,0,2,2,0,5,0,2,2,1,5,0,2,2,2,5,0,2,2,3,5,0,2,2,4,5,0,2,2,5,-4,0,1,4,5,-3,0,1,3,5,-2,0,1,3,5,-1,0,1,3,5,0,0,1,3,5,1,0,1,3,5,2,0,1,3,5,3,0,1,3,5,4,0,1,3,5,5,0,13,2]} \ No newline at end of file +{"NavigationList":[{"Type":0,"Points":[-104,-40,88,-40,88,80,24,80,24,48,-56,48,-56,80,-104,80]}],"Floor":[-7,-3,0,0,8,-7,-2,0,0,8,-7,-1,0,0,8,-7,0,0,0,8,-7,1,0,0,8,-7,2,0,0,8,-7,3,0,0,8,-7,4,0,0,8,-6,-3,0,0,8,-6,-2,0,0,8,-6,-1,0,0,8,-6,0,0,0,8,-6,1,0,0,8,-6,2,0,0,8,-6,3,0,0,8,-6,4,0,0,8,5,-1,0,0,8,5,0,0,0,8,5,1,0,0,8,5,2,0,0,8,5,3,0,0,8,5,4,0,0,8,5,-2,0,0,8,5,-3,0,0,8,-5,-3,0,0,8,-5,-2,0,0,8,-5,-1,0,0,8,-5,0,0,0,8,-5,1,0,0,8,-5,2,0,0,8,-5,3,0,0,8,-5,4,0,0,8,1,4,0,0,8,1,3,0,0,8,1,2,0,0,8,1,1,0,0,8,1,0,0,0,8,1,-1,0,0,8,1,-2,0,0,8,1,-3,0,0,8,2,4,0,0,8,2,3,0,0,8,2,2,0,0,8,2,1,0,0,8,2,0,0,0,8,2,-1,0,0,8,2,-2,0,0,8,2,-3,0,0,8,3,4,0,0,8,3,3,0,0,8,3,2,0,0,8,3,1,0,0,8,3,0,0,0,8,3,-1,0,0,8,3,-2,0,0,8,3,-3,0,0,8,4,4,0,0,8,4,3,0,0,8,4,2,0,0,8,4,1,0,0,8,4,0,0,0,8,4,-1,0,0,8,4,-2,0,0,8,4,-3,0,0,8,0,2,0,0,8,0,1,0,0,8,0,0,0,0,8,0,-1,0,0,8,0,-2,0,0,8,0,-3,0,0,8,-1,2,0,0,8,-1,1,0,0,8,-1,0,0,0,8,-1,-1,0,0,8,-1,-2,0,0,8,-1,-3,0,0,8,-2,2,0,0,8,-2,1,0,0,8,-2,0,0,0,8,-2,-1,0,0,8,-2,-2,0,0,8,-2,-3,0,0,8,-3,2,0,0,8,-3,1,0,0,8,-3,0,0,0,8,-3,-1,0,0,8,-3,-2,0,0,8,-3,-3,0,0,8,-4,4,0,0,8,-4,3,0,0,8,-4,2,0,0,8,-4,1,0,0,8,-4,0,0,0,8,-4,-1,0,0,8,-4,-2,0,0,8,-4,-3,0,0,8],"Middle":[-7,-4,0,2,7,-6,-4,0,2,7,-5,-4,0,2,7,-4,-4,0,2,7,-3,-4,0,2,7,-2,-4,0,2,7,-1,-4,0,2,7,0,-4,0,2,7,1,-4,0,2,7,2,-4,0,2,7,3,-4,0,2,7,4,-4,0,2,7,5,-4,0,2,7],"Top":[-8,-4,0,3,4,-8,-3,0,3,3,-8,-2,0,3,3,-8,-1,0,3,3,-8,0,0,3,3,-8,1,0,3,3,-8,2,0,3,3,-8,3,0,3,3,-8,4,0,3,3,-8,5,0,11,2,-7,5,0,2,2,-6,5,0,2,2,-5,5,0,2,2,-4,5,0,2,2,-3,3,0,1,2,-3,4,0,1,3,-3,5,0,13,2,-2,3,0,2,2,-1,3,0,2,2,0,3,0,3,2,0,4,0,3,3,0,5,0,11,2,1,5,0,2,2,2,5,0,2,2,3,5,0,2,2,4,5,0,2,2,5,5,0,2,2,6,-4,0,1,4,6,-3,0,1,3,6,-2,0,1,3,6,-1,0,1,3,6,0,0,1,3,6,1,0,1,3,6,2,0,1,3,6,3,0,1,3,6,4,0,1,3,6,5,0,13,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preinstall.json new file mode 100644 index 0000000..2af15f7 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preinstall.json @@ -0,0 +1 @@ +[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":0,"Y":0},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":0,"Y":26},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preview.png new file mode 100644 index 0000000..6d2fd01 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preview.png.import new file mode 100644 index 0000000..68d306b --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preview.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cr5tlhxfjetuf" +path="res://.godot/imported/Preview.png-8fbf34b154290497f5a1f19b421f568c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/map/tileMaps/TestGroup1/inlet/Start2/Preview.png" +dest_files=["res://.godot/imported/Preview.png-8fbf34b154290497f5a1f19b421f568c.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/map/tileMaps/TestGroup1/inlet/Start2/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/RoomInfo.json new file mode 100644 index 0000000..27eaead --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/RoomInfo.json @@ -0,0 +1 @@ +{"Position":{"X":-5,"Y":-5},"Size":{"X":10,"Y":12},"DoorAreaInfos":[{"Direction":3,"Start":0,"End":128},{"Direction":0,"Start":0,"End":160},{"Direction":1,"Start":0,"End":160}],"GroupName":"TestGroup1","RoomType":1,"RoomName":"Start2","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/TileInfo.json new file mode 100644 index 0000000..60689b8 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/TileInfo.json @@ -0,0 +1 @@ +{"NavigationList":[{"Type":0,"Points":[-56,-56,56,-56,56,96,40,96,40,48,-40,48,-40,96,-56,96]}],"Floor":[-3,-4,0,0,8,-3,-3,0,0,8,-3,-2,0,0,8,-3,-1,0,0,8,-3,0,0,0,8,-3,1,0,0,8,-3,2,0,0,8,-3,3,0,0,8,-3,4,0,0,8,-3,5,0,0,8,-2,-2,0,0,8,-2,-4,0,0,8,-2,-3,0,0,8,-2,-1,0,0,8,-2,0,0,0,8,-2,1,0,0,8,-2,2,0,0,8,-1,-1,0,0,8,-1,-4,0,0,8,-1,-3,0,0,8,-1,-2,0,0,8,-1,0,0,0,8,-1,1,0,0,8,-1,2,0,0,8,0,0,0,0,8,0,-4,0,0,8,0,-3,0,0,8,0,-2,0,0,8,0,-1,0,0,8,0,1,0,0,8,0,2,0,0,8,1,1,0,0,8,1,-4,0,0,8,1,-3,0,0,8,1,-2,0,0,8,1,-1,0,0,8,1,0,0,0,8,1,2,0,0,8,2,1,0,0,8,2,-4,0,0,8,2,-3,0,0,8,2,-2,0,0,8,2,-1,0,0,8,2,0,0,0,8,2,2,0,0,8,2,3,0,0,8,2,4,0,0,8,2,5,0,0,8,-4,-4,0,0,8,-4,-3,0,0,8,-4,-2,0,0,8,-4,-1,0,0,8,-4,0,0,0,8,-4,1,0,0,8,-4,2,0,0,8,-4,3,0,0,8,-4,4,0,0,8,-4,5,0,0,8,3,-4,0,0,8,3,-3,0,0,8,3,-2,0,0,8,3,-1,0,0,8,3,0,0,0,8,3,1,0,0,8,3,2,0,0,8,3,3,0,0,8,3,4,0,0,8,3,5,0,0,8],"Middle":[-4,-5,0,2,7,-3,-5,0,2,7,-2,-5,0,2,7,-1,-5,0,2,7,0,-5,0,2,7,1,-5,0,2,7,2,-5,0,2,7,3,-5,0,2,7],"Top":[-5,-5,0,3,4,-5,-4,0,3,3,-5,-3,0,3,3,-5,-2,0,3,3,-5,-1,0,3,3,-5,0,0,3,3,-5,1,0,3,3,-5,2,0,3,3,-5,3,0,3,3,-5,4,0,3,3,-5,5,0,3,3,-5,6,0,11,2,-4,6,0,2,2,-3,6,0,2,2,-2,3,0,1,2,-2,4,0,1,3,-2,5,0,1,3,-2,6,0,13,2,-1,3,0,2,2,0,3,0,2,2,1,3,0,3,2,1,4,0,3,3,1,5,0,3,3,1,6,0,11,2,2,6,0,2,2,3,6,0,2,2,4,-5,0,1,4,4,-4,0,1,3,4,-3,0,1,3,4,-2,0,1,3,4,-1,0,1,3,4,0,0,1,3,4,1,0,1,3,4,2,0,1,3,4,3,0,1,3,4,4,0,1,3,4,5,0,1,3,4,6,0,13,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/outlet/End1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/outlet/End1/Preview.png index 8e0a47a..6224d08 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/outlet/End1/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/outlet/End1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileSet/TileSet1.tres b/DungeonShooting_Godot/resource/map/tileSet/TileSet1.tres deleted file mode 100644 index 5173fe2..0000000 --- a/DungeonShooting_Godot/resource/map/tileSet/TileSet1.tres +++ /dev/null @@ -1,609 +0,0 @@ -[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://b00g22o1cqhe8"] - -[ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="1_e0f3i"] - -[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_yvgyd"] -texture = ExtResource("1_e0f3i") -0:0/0 = 0 -0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:0/0/physics_layer_0/angular_velocity = 0.0 -1:0/0 = 0 -1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:0/0/physics_layer_0/angular_velocity = 0.0 -2:0/0 = 0 -2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:0/0/physics_layer_0/angular_velocity = 0.0 -3:0/0 = 0 -3:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:0/0/physics_layer_0/angular_velocity = 0.0 -4:0/0 = 0 -4:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:0/0/physics_layer_0/angular_velocity = 0.0 -5:0/0 = 0 -5:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:0/0/physics_layer_0/angular_velocity = 0.0 -6:0/0 = 0 -6:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:0/0/physics_layer_0/angular_velocity = 0.0 -7:0/0 = 0 -7:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:0/0/physics_layer_0/angular_velocity = 0.0 -8:0/0 = 0 -8:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -8:0/0/physics_layer_0/angular_velocity = 0.0 -9:0/0 = 0 -9:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -9:0/0/physics_layer_0/angular_velocity = 0.0 -10:0/0 = 0 -10:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:0/0/physics_layer_0/angular_velocity = 0.0 -11:0/next_alternative_id = 2 -11:0/0 = 0 -11:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:0/0/physics_layer_0/angular_velocity = 0.0 -12:0/0 = 0 -12:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:0/0/physics_layer_0/angular_velocity = 0.0 -13:0/next_alternative_id = 2 -13:0/0 = 0 -13:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:0/0/physics_layer_0/angular_velocity = 0.0 -14:0/0 = 0 -14:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:0/0/physics_layer_0/angular_velocity = 0.0 -15:0/0 = 0 -15:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:0/0/physics_layer_0/angular_velocity = 0.0 -0:1/0 = 0 -0:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:1/0/physics_layer_0/angular_velocity = 0.0 -1:1/0 = 0 -1:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:1/0/physics_layer_0/angular_velocity = 0.0 -2:1/0 = 0 -2:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:1/0/physics_layer_0/angular_velocity = 0.0 -3:1/0 = 0 -3:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:1/0/physics_layer_0/angular_velocity = 0.0 -4:1/0 = 0 -4:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:1/0/physics_layer_0/angular_velocity = 0.0 -5:1/0 = 0 -5:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:1/0/physics_layer_0/angular_velocity = 0.0 -6:1/0 = 0 -6:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:1/0/physics_layer_0/angular_velocity = 0.0 -7:1/0 = 0 -7:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:1/0/physics_layer_0/angular_velocity = 0.0 -8:1/0 = 0 -8:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -8:1/0/physics_layer_0/angular_velocity = 0.0 -9:1/0 = 0 -9:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -9:1/0/physics_layer_0/angular_velocity = 0.0 -10:1/0 = 0 -10:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:1/0/physics_layer_0/angular_velocity = 0.0 -11:1/0 = 0 -11:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:1/0/physics_layer_0/angular_velocity = 0.0 -12:1/0 = 0 -12:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:1/0/physics_layer_0/angular_velocity = 0.0 -13:1/0 = 0 -13:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:1/0/physics_layer_0/angular_velocity = 0.0 -14:1/0 = 0 -14:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:1/0/physics_layer_0/angular_velocity = 0.0 -15:1/0 = 0 -15:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:1/0/physics_layer_0/angular_velocity = 0.0 -0:2/0 = 0 -0:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:2/0/physics_layer_0/angular_velocity = 0.0 -1:2/0 = 0 -1:2/0/terrain_set = 0 -1:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:2/0/physics_layer_0/angular_velocity = 0.0 -1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8) -1:2/0/terrains_peering_bit/bottom_left_corner = 0 -1:2/0/terrains_peering_bit/top_left_corner = 0 -1:2/0/terrains_peering_bit/top_right_corner = 0 -2:2/0 = 0 -2:2/0/terrain_set = 0 -2:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:2/0/physics_layer_0/angular_velocity = 0.0 -2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8) -2:2/0/terrains_peering_bit/top_left_corner = 0 -2:2/0/terrains_peering_bit/top_right_corner = 0 -3:2/0 = 0 -3:2/0/terrain_set = 0 -3:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:2/0/physics_layer_0/angular_velocity = 0.0 -3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8) -3:2/0/terrains_peering_bit/bottom_right_corner = 0 -3:2/0/terrains_peering_bit/top_left_corner = 0 -3:2/0/terrains_peering_bit/top_right_corner = 0 -4:2/0 = 0 -4:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:2/0/physics_layer_0/angular_velocity = 0.0 -5:2/0 = 0 -5:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:2/0/physics_layer_0/angular_velocity = 0.0 -6:2/0 = 0 -6:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:2/0/physics_layer_0/angular_velocity = 0.0 -7:2/0 = 0 -7:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:2/0/physics_layer_0/angular_velocity = 0.0 -8:2/0 = 0 -8:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -8:2/0/physics_layer_0/angular_velocity = 0.0 -9:2/0 = 0 -9:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -9:2/0/physics_layer_0/angular_velocity = 0.0 -10:2/0 = 0 -10:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:2/0/physics_layer_0/angular_velocity = 0.0 -11:2/0 = 0 -11:2/0/terrain_set = 0 -11:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:2/0/physics_layer_0/angular_velocity = 0.0 -11:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -11:2/0/terrains_peering_bit/top_right_corner = 0 -12:2/0 = 0 -12:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:2/0/physics_layer_0/angular_velocity = 0.0 -13:2/0 = 0 -13:2/0/terrain_set = 0 -13:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:2/0/physics_layer_0/angular_velocity = 0.0 -13:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -13:2/0/terrains_peering_bit/top_left_corner = 0 -14:2/0 = 0 -14:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:2/0/physics_layer_0/angular_velocity = 0.0 -15:2/0 = 0 -15:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:2/0/physics_layer_0/angular_velocity = 0.0 -0:3/0 = 0 -0:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:3/0/physics_layer_0/angular_velocity = 0.0 -1:3/0 = 0 -1:3/0/terrain_set = 0 -1:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:3/0/physics_layer_0/angular_velocity = 0.0 -1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -1:3/0/terrains_peering_bit/bottom_left_corner = 0 -1:3/0/terrains_peering_bit/top_left_corner = 0 -2:3/0 = 0 -2:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:3/0/physics_layer_0/angular_velocity = 0.0 -2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -3:3/0 = 0 -3:3/0/terrain_set = 0 -3:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:3/0/physics_layer_0/angular_velocity = 0.0 -3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -3:3/0/terrains_peering_bit/bottom_right_corner = 0 -3:3/0/terrains_peering_bit/top_right_corner = 0 -4:3/0 = 0 -4:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:3/0/physics_layer_0/angular_velocity = 0.0 -5:3/0 = 0 -5:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:3/0/physics_layer_0/angular_velocity = 0.0 -6:3/0 = 0 -6:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:3/0/physics_layer_0/angular_velocity = 0.0 -7:3/0 = 0 -7:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:3/0/physics_layer_0/angular_velocity = 0.0 -8:3/0 = 0 -8:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -8:3/0/physics_layer_0/angular_velocity = 0.0 -9:3/0 = 0 -9:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -9:3/0/physics_layer_0/angular_velocity = 0.0 -10:3/0 = 0 -10:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:3/0/physics_layer_0/angular_velocity = 0.0 -11:3/0 = 0 -11:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:3/0/physics_layer_0/angular_velocity = 0.0 -12:3/0 = 0 -12:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:3/0/physics_layer_0/angular_velocity = 0.0 -13:3/0 = 0 -13:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:3/0/physics_layer_0/angular_velocity = 0.0 -14:3/0 = 0 -14:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:3/0/physics_layer_0/angular_velocity = 0.0 -15:3/0 = 0 -15:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:3/0/physics_layer_0/angular_velocity = 0.0 -0:4/0 = 0 -0:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:4/0/physics_layer_0/angular_velocity = 0.0 -1:4/0 = 0 -1:4/0/terrain_set = 0 -1:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:4/0/physics_layer_0/angular_velocity = 0.0 -1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -1:4/0/terrains_peering_bit/bottom_left_corner = 0 -2:4/0 = 0 -2:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:4/0/physics_layer_0/angular_velocity = 0.0 -2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -3:4/0 = 0 -3:4/0/terrain_set = 0 -3:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:4/0/physics_layer_0/angular_velocity = 0.0 -3:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -3:4/0/terrains_peering_bit/bottom_right_corner = 0 -4:4/0 = 0 -4:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:4/0/physics_layer_0/angular_velocity = 0.0 -5:4/0 = 0 -5:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:4/0/physics_layer_0/angular_velocity = 0.0 -6:4/0 = 0 -6:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:4/0/physics_layer_0/angular_velocity = 0.0 -7:4/0 = 0 -7:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:4/0/physics_layer_0/angular_velocity = 0.0 -8:4/0 = 0 -8:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -8:4/0/physics_layer_0/angular_velocity = 0.0 -9:4/0 = 0 -9:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -9:4/0/physics_layer_0/angular_velocity = 0.0 -10:4/0 = 0 -10:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:4/0/physics_layer_0/angular_velocity = 0.0 -11:4/0 = 0 -11:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:4/0/physics_layer_0/angular_velocity = 0.0 -12:4/0 = 0 -12:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:4/0/physics_layer_0/angular_velocity = 0.0 -13:4/0 = 0 -13:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:4/0/physics_layer_0/angular_velocity = 0.0 -14:4/0 = 0 -14:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:4/0/physics_layer_0/angular_velocity = 0.0 -15:4/0 = 0 -15:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:4/0/physics_layer_0/angular_velocity = 0.0 -0:5/0 = 0 -0:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:5/0/physics_layer_0/angular_velocity = 0.0 -1:5/0 = 0 -1:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:5/0/physics_layer_0/angular_velocity = 0.0 -1:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -2:5/0 = 0 -2:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:5/0/physics_layer_0/angular_velocity = 0.0 -2:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -3:5/0 = 0 -3:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:5/0/physics_layer_0/angular_velocity = 0.0 -3:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -4:5/0 = 0 -4:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:5/0/physics_layer_0/angular_velocity = 0.0 -5:5/0 = 0 -5:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:5/0/physics_layer_0/angular_velocity = 0.0 -6:5/0 = 0 -6:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:5/0/physics_layer_0/angular_velocity = 0.0 -7:5/0 = 0 -7:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:5/0/physics_layer_0/angular_velocity = 0.0 -8:5/0 = 0 -8:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -8:5/0/physics_layer_0/angular_velocity = 0.0 -9:5/0 = 0 -9:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -9:5/0/physics_layer_0/angular_velocity = 0.0 -10:5/0 = 0 -10:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:5/0/physics_layer_0/angular_velocity = 0.0 -11:5/0 = 0 -11:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:5/0/physics_layer_0/angular_velocity = 0.0 -12:5/0 = 0 -12:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:5/0/physics_layer_0/angular_velocity = 0.0 -13:5/0 = 0 -13:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:5/0/physics_layer_0/angular_velocity = 0.0 -14:5/0 = 0 -14:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:5/0/physics_layer_0/angular_velocity = 0.0 -15:5/0 = 0 -15:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:5/0/physics_layer_0/angular_velocity = 0.0 -0:6/0 = 0 -0:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:6/0/physics_layer_0/angular_velocity = 0.0 -1:6/next_alternative_id = 3 -1:6/0 = 0 -1:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:6/0/physics_layer_0/angular_velocity = 0.0 -1:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -2:6/next_alternative_id = 3 -2:6/0 = 0 -2:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:6/0/physics_layer_0/angular_velocity = 0.0 -2:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -3:6/next_alternative_id = 3 -3:6/0 = 0 -3:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:6/0/physics_layer_0/angular_velocity = 0.0 -3:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -4:6/0 = 0 -4:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:6/0/physics_layer_0/angular_velocity = 0.0 -5:6/0 = 0 -5:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:6/0/physics_layer_0/angular_velocity = 0.0 -6:6/0 = 0 -6:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:6/0/physics_layer_0/angular_velocity = 0.0 -7:6/0 = 0 -7:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:6/0/physics_layer_0/angular_velocity = 0.0 -8:6/0 = 0 -8:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -8:6/0/physics_layer_0/angular_velocity = 0.0 -9:6/0 = 0 -9:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -9:6/0/physics_layer_0/angular_velocity = 0.0 -10:6/0 = 0 -10:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:6/0/physics_layer_0/angular_velocity = 0.0 -11:6/0 = 0 -11:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:6/0/physics_layer_0/angular_velocity = 0.0 -12:6/0 = 0 -12:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:6/0/physics_layer_0/angular_velocity = 0.0 -13:6/0 = 0 -13:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:6/0/physics_layer_0/angular_velocity = 0.0 -14:6/0 = 0 -14:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:6/0/physics_layer_0/angular_velocity = 0.0 -15:6/0 = 0 -15:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:6/0/physics_layer_0/angular_velocity = 0.0 -0:7/0 = 0 -0:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:7/0/physics_layer_0/angular_velocity = 0.0 -1:7/0 = 0 -1:7/0/terrain_set = 0 -1:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:7/0/physics_layer_0/angular_velocity = 0.0 -1:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -1:7/0/terrains_peering_bit/bottom_right_corner = 0 -1:7/0/terrains_peering_bit/bottom_left_corner = 0 -1:7/0/terrains_peering_bit/top_left_corner = 0 -2:7/0 = 0 -2:7/0/terrain_set = 0 -2:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:7/0/physics_layer_0/angular_velocity = 0.0 -2:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -2:7/0/terrains_peering_bit/bottom_right_corner = 0 -2:7/0/terrains_peering_bit/bottom_left_corner = 0 -3:7/0 = 0 -3:7/0/terrain_set = 0 -3:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:7/0/physics_layer_0/angular_velocity = 0.0 -3:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -3:7/0/terrains_peering_bit/bottom_right_corner = 0 -3:7/0/terrains_peering_bit/bottom_left_corner = 0 -3:7/0/terrains_peering_bit/top_right_corner = 0 -4:7/0 = 0 -4:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:7/0/physics_layer_0/angular_velocity = 0.0 -5:7/0 = 0 -5:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:7/0/physics_layer_0/angular_velocity = 0.0 -6:7/0 = 0 -6:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:7/0/physics_layer_0/angular_velocity = 0.0 -7:7/0 = 0 -7:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:7/0/physics_layer_0/angular_velocity = 0.0 -8:7/0 = 0 -8:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -8:7/0/physics_layer_0/angular_velocity = 0.0 -9:7/0 = 0 -9:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -9:7/0/physics_layer_0/angular_velocity = 0.0 -10:7/0 = 0 -10:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:7/0/physics_layer_0/angular_velocity = 0.0 -11:7/0 = 0 -11:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:7/0/physics_layer_0/angular_velocity = 0.0 -12:7/0 = 0 -12:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:7/0/physics_layer_0/angular_velocity = 0.0 -13:7/0 = 0 -13:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:7/0/physics_layer_0/angular_velocity = 0.0 -14:7/0 = 0 -14:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:7/0/physics_layer_0/angular_velocity = 0.0 -15:7/0 = 0 -15:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:7/0/physics_layer_0/angular_velocity = 0.0 -0:8/0 = 0 -0:8/0/terrain_set = 0 -0:8/0/terrain = 0 -0:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:8/0/physics_layer_0/angular_velocity = 0.0 -0:8/0/terrains_peering_bit/bottom_right_corner = 0 -0:8/0/terrains_peering_bit/bottom_left_corner = 0 -0:8/0/terrains_peering_bit/top_left_corner = 0 -0:8/0/terrains_peering_bit/top_right_corner = 0 -1:8/0 = 0 -1:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:8/0/physics_layer_0/angular_velocity = 0.0 -2:8/0 = 0 -2:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:8/0/physics_layer_0/angular_velocity = 0.0 -3:8/0 = 0 -3:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:8/0/physics_layer_0/angular_velocity = 0.0 -4:8/0 = 0 -4:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:8/0/physics_layer_0/angular_velocity = 0.0 -5:8/0 = 0 -5:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:8/0/physics_layer_0/angular_velocity = 0.0 -6:8/0 = 0 -6:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:8/0/physics_layer_0/angular_velocity = 0.0 -7:8/0 = 0 -7:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:8/0/physics_layer_0/angular_velocity = 0.0 -8:8/0 = 0 -8:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -8:8/0/physics_layer_0/angular_velocity = 0.0 -9:8/0 = 0 -9:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -9:8/0/physics_layer_0/angular_velocity = 0.0 -10:8/0 = 0 -10:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:8/0/physics_layer_0/angular_velocity = 0.0 -11:8/0 = 0 -11:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:8/0/physics_layer_0/angular_velocity = 0.0 -12:8/0 = 0 -12:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:8/0/physics_layer_0/angular_velocity = 0.0 -13:8/0 = 0 -13:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:8/0/physics_layer_0/angular_velocity = 0.0 -14:8/0 = 0 -14:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:8/0/physics_layer_0/angular_velocity = 0.0 -15:8/0 = 0 -15:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:8/0/physics_layer_0/angular_velocity = 0.0 -0:9/0 = 0 -0:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:9/0/physics_layer_0/angular_velocity = 0.0 -1:9/0 = 0 -1:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:9/0/physics_layer_0/angular_velocity = 0.0 -2:9/0 = 0 -2:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:9/0/physics_layer_0/angular_velocity = 0.0 -3:9/0 = 0 -3:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:9/0/physics_layer_0/angular_velocity = 0.0 -4:9/0 = 0 -4:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:9/0/physics_layer_0/angular_velocity = 0.0 -5:9/0 = 0 -5:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:9/0/physics_layer_0/angular_velocity = 0.0 -6:9/0 = 0 -6:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:9/0/physics_layer_0/angular_velocity = 0.0 -7:9/0 = 0 -7:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:9/0/physics_layer_0/angular_velocity = 0.0 -10:9/0 = 0 -10:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -10:9/0/physics_layer_0/angular_velocity = 0.0 -11:9/0 = 0 -11:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -11:9/0/physics_layer_0/angular_velocity = 0.0 -12:9/0 = 0 -12:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -12:9/0/physics_layer_0/angular_velocity = 0.0 -13:9/0 = 0 -13:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:9/0/physics_layer_0/angular_velocity = 0.0 -14:9/0 = 0 -14:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:9/0/physics_layer_0/angular_velocity = 0.0 -15:9/0 = 0 -15:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:9/0/physics_layer_0/angular_velocity = 0.0 -0:10/0 = 0 -0:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:10/0/physics_layer_0/angular_velocity = 0.0 -1:10/0 = 0 -1:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:10/0/physics_layer_0/angular_velocity = 0.0 -2:10/0 = 0 -2:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:10/0/physics_layer_0/angular_velocity = 0.0 -3:10/0 = 0 -3:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:10/0/physics_layer_0/angular_velocity = 0.0 -5:10/0 = 0 -5:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -5:10/0/physics_layer_0/angular_velocity = 0.0 -6:10/0 = 0 -6:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -6:10/0/physics_layer_0/angular_velocity = 0.0 -7:10/0 = 0 -7:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -7:10/0/physics_layer_0/angular_velocity = 0.0 -13:10/0 = 0 -13:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:10/0/physics_layer_0/angular_velocity = 0.0 -14:10/0 = 0 -14:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:10/0/physics_layer_0/angular_velocity = 0.0 -15:10/0 = 0 -15:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:10/0/physics_layer_0/angular_velocity = 0.0 -0:11/0 = 0 -0:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) -0:11/0/physics_layer_0/angular_velocity = 0.0 -1:11/0 = 0 -1:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) -1:11/0/physics_layer_0/angular_velocity = 0.0 -2:11/0 = 0 -2:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) -2:11/0/physics_layer_0/angular_velocity = 0.0 -3:11/0 = 0 -3:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) -3:11/0/physics_layer_0/angular_velocity = 0.0 -4:11/0 = 0 -4:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) -4:11/0/physics_layer_0/angular_velocity = 0.0 -13:11/0 = 0 -13:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) -13:11/0/physics_layer_0/angular_velocity = 0.0 -14:11/0 = 0 -14:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) -14:11/0/physics_layer_0/angular_velocity = 0.0 -15:11/0 = 0 -15:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) -15:11/0/physics_layer_0/angular_velocity = 0.0 - -[resource] -physics_layer_0/collision_layer = 1 -physics_layer_0/collision_mask = 0 -terrain_set_0/mode = 1 -terrain_set_0/terrain_0/name = "Terrain 0" -terrain_set_0/terrain_0/color = Color(0.886275, 0.0980392, 0.0980392, 1) -sources/0 = SubResource("TileSetAtlasSource_yvgyd") diff --git a/DungeonShooting_Godot/resource/map/tileSet/TileSet_old.tres b/DungeonShooting_Godot/resource/map/tileSet/TileSet_old.tres index b082db6..e63012e 100644 --- a/DungeonShooting_Godot/resource/map/tileSet/TileSet_old.tres +++ b/DungeonShooting_Godot/resource/map/tileSet/TileSet_old.tres @@ -1,6 +1,7 @@ [gd_resource type="TileSet" load_steps=3 format=3 uid="uid://bn21mn0gu6jel"] -[ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="1_vqd0o"] +[ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="1_vqd0o"] + [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_rkmbu"] texture = ExtResource("1_vqd0o") diff --git a/DungeonShooting_Godot/resource/map/tileSet/map1/TileSet1.tres b/DungeonShooting_Godot/resource/map/tileSet/map1/TileSet1.tres new file mode 100644 index 0000000..0cb7129 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileSet/map1/TileSet1.tres @@ -0,0 +1,609 @@ +[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://b00g22o1cqhe8"] + +[ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="1_aqcu3"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_yvgyd"] +texture = ExtResource("1_aqcu3") +0:0/0 = 0 +0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:0/0/physics_layer_0/angular_velocity = 0.0 +1:0/0 = 0 +1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:0/0/physics_layer_0/angular_velocity = 0.0 +2:0/0 = 0 +2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:0/0/physics_layer_0/angular_velocity = 0.0 +3:0/0 = 0 +3:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:0/0/physics_layer_0/angular_velocity = 0.0 +4:0/0 = 0 +4:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:0/0/physics_layer_0/angular_velocity = 0.0 +5:0/0 = 0 +5:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:0/0/physics_layer_0/angular_velocity = 0.0 +6:0/0 = 0 +6:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:0/0/physics_layer_0/angular_velocity = 0.0 +7:0/0 = 0 +7:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:0/0/physics_layer_0/angular_velocity = 0.0 +8:0/0 = 0 +8:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:0/0/physics_layer_0/angular_velocity = 0.0 +9:0/0 = 0 +9:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:0/0/physics_layer_0/angular_velocity = 0.0 +10:0/0 = 0 +10:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:0/0/physics_layer_0/angular_velocity = 0.0 +11:0/next_alternative_id = 2 +11:0/0 = 0 +11:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:0/0/physics_layer_0/angular_velocity = 0.0 +12:0/0 = 0 +12:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:0/0/physics_layer_0/angular_velocity = 0.0 +13:0/next_alternative_id = 2 +13:0/0 = 0 +13:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:0/0/physics_layer_0/angular_velocity = 0.0 +14:0/0 = 0 +14:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:0/0/physics_layer_0/angular_velocity = 0.0 +15:0/0 = 0 +15:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:0/0/physics_layer_0/angular_velocity = 0.0 +0:1/0 = 0 +0:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:1/0/physics_layer_0/angular_velocity = 0.0 +1:1/0 = 0 +1:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:1/0/physics_layer_0/angular_velocity = 0.0 +2:1/0 = 0 +2:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:1/0/physics_layer_0/angular_velocity = 0.0 +3:1/0 = 0 +3:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:1/0/physics_layer_0/angular_velocity = 0.0 +4:1/0 = 0 +4:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:1/0/physics_layer_0/angular_velocity = 0.0 +5:1/0 = 0 +5:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:1/0/physics_layer_0/angular_velocity = 0.0 +6:1/0 = 0 +6:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:1/0/physics_layer_0/angular_velocity = 0.0 +7:1/0 = 0 +7:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:1/0/physics_layer_0/angular_velocity = 0.0 +8:1/0 = 0 +8:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:1/0/physics_layer_0/angular_velocity = 0.0 +9:1/0 = 0 +9:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:1/0/physics_layer_0/angular_velocity = 0.0 +10:1/0 = 0 +10:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:1/0/physics_layer_0/angular_velocity = 0.0 +11:1/0 = 0 +11:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:1/0/physics_layer_0/angular_velocity = 0.0 +12:1/0 = 0 +12:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:1/0/physics_layer_0/angular_velocity = 0.0 +13:1/0 = 0 +13:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:1/0/physics_layer_0/angular_velocity = 0.0 +14:1/0 = 0 +14:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:1/0/physics_layer_0/angular_velocity = 0.0 +15:1/0 = 0 +15:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:1/0/physics_layer_0/angular_velocity = 0.0 +0:2/0 = 0 +0:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:2/0/physics_layer_0/angular_velocity = 0.0 +1:2/0 = 0 +1:2/0/terrain_set = 0 +1:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:2/0/physics_layer_0/angular_velocity = 0.0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8) +1:2/0/terrains_peering_bit/bottom_left_corner = 0 +1:2/0/terrains_peering_bit/top_left_corner = 0 +1:2/0/terrains_peering_bit/top_right_corner = 0 +2:2/0 = 0 +2:2/0/terrain_set = 0 +2:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:2/0/physics_layer_0/angular_velocity = 0.0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8) +2:2/0/terrains_peering_bit/top_left_corner = 0 +2:2/0/terrains_peering_bit/top_right_corner = 0 +3:2/0 = 0 +3:2/0/terrain_set = 0 +3:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:2/0/physics_layer_0/angular_velocity = 0.0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8) +3:2/0/terrains_peering_bit/bottom_right_corner = 0 +3:2/0/terrains_peering_bit/top_left_corner = 0 +3:2/0/terrains_peering_bit/top_right_corner = 0 +4:2/0 = 0 +4:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:2/0/physics_layer_0/angular_velocity = 0.0 +5:2/0 = 0 +5:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:2/0/physics_layer_0/angular_velocity = 0.0 +6:2/0 = 0 +6:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:2/0/physics_layer_0/angular_velocity = 0.0 +7:2/0 = 0 +7:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:2/0/physics_layer_0/angular_velocity = 0.0 +8:2/0 = 0 +8:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:2/0/physics_layer_0/angular_velocity = 0.0 +9:2/0 = 0 +9:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:2/0/physics_layer_0/angular_velocity = 0.0 +10:2/0 = 0 +10:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:2/0/physics_layer_0/angular_velocity = 0.0 +11:2/0 = 0 +11:2/0/terrain_set = 0 +11:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:2/0/physics_layer_0/angular_velocity = 0.0 +11:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +11:2/0/terrains_peering_bit/top_right_corner = 0 +12:2/0 = 0 +12:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:2/0/physics_layer_0/angular_velocity = 0.0 +13:2/0 = 0 +13:2/0/terrain_set = 0 +13:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:2/0/physics_layer_0/angular_velocity = 0.0 +13:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +13:2/0/terrains_peering_bit/top_left_corner = 0 +14:2/0 = 0 +14:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:2/0/physics_layer_0/angular_velocity = 0.0 +15:2/0 = 0 +15:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:2/0/physics_layer_0/angular_velocity = 0.0 +0:3/0 = 0 +0:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:3/0/physics_layer_0/angular_velocity = 0.0 +1:3/0 = 0 +1:3/0/terrain_set = 0 +1:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:3/0/physics_layer_0/angular_velocity = 0.0 +1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +1:3/0/terrains_peering_bit/bottom_left_corner = 0 +1:3/0/terrains_peering_bit/top_left_corner = 0 +2:3/0 = 0 +2:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:3/0/physics_layer_0/angular_velocity = 0.0 +2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:3/0 = 0 +3:3/0/terrain_set = 0 +3:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:3/0/physics_layer_0/angular_velocity = 0.0 +3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:3/0/terrains_peering_bit/bottom_right_corner = 0 +3:3/0/terrains_peering_bit/top_right_corner = 0 +4:3/0 = 0 +4:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:3/0/physics_layer_0/angular_velocity = 0.0 +5:3/0 = 0 +5:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:3/0/physics_layer_0/angular_velocity = 0.0 +6:3/0 = 0 +6:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:3/0/physics_layer_0/angular_velocity = 0.0 +7:3/0 = 0 +7:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:3/0/physics_layer_0/angular_velocity = 0.0 +8:3/0 = 0 +8:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:3/0/physics_layer_0/angular_velocity = 0.0 +9:3/0 = 0 +9:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:3/0/physics_layer_0/angular_velocity = 0.0 +10:3/0 = 0 +10:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:3/0/physics_layer_0/angular_velocity = 0.0 +11:3/0 = 0 +11:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:3/0/physics_layer_0/angular_velocity = 0.0 +12:3/0 = 0 +12:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:3/0/physics_layer_0/angular_velocity = 0.0 +13:3/0 = 0 +13:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:3/0/physics_layer_0/angular_velocity = 0.0 +14:3/0 = 0 +14:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:3/0/physics_layer_0/angular_velocity = 0.0 +15:3/0 = 0 +15:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:3/0/physics_layer_0/angular_velocity = 0.0 +0:4/0 = 0 +0:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:4/0/physics_layer_0/angular_velocity = 0.0 +1:4/0 = 0 +1:4/0/terrain_set = 0 +1:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:4/0/physics_layer_0/angular_velocity = 0.0 +1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +1:4/0/terrains_peering_bit/bottom_left_corner = 0 +2:4/0 = 0 +2:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:4/0/physics_layer_0/angular_velocity = 0.0 +2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:4/0 = 0 +3:4/0/terrain_set = 0 +3:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:4/0/physics_layer_0/angular_velocity = 0.0 +3:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:4/0/terrains_peering_bit/bottom_right_corner = 0 +4:4/0 = 0 +4:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:4/0/physics_layer_0/angular_velocity = 0.0 +5:4/0 = 0 +5:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:4/0/physics_layer_0/angular_velocity = 0.0 +6:4/0 = 0 +6:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:4/0/physics_layer_0/angular_velocity = 0.0 +7:4/0 = 0 +7:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:4/0/physics_layer_0/angular_velocity = 0.0 +8:4/0 = 0 +8:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:4/0/physics_layer_0/angular_velocity = 0.0 +9:4/0 = 0 +9:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:4/0/physics_layer_0/angular_velocity = 0.0 +10:4/0 = 0 +10:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:4/0/physics_layer_0/angular_velocity = 0.0 +11:4/0 = 0 +11:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:4/0/physics_layer_0/angular_velocity = 0.0 +12:4/0 = 0 +12:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:4/0/physics_layer_0/angular_velocity = 0.0 +13:4/0 = 0 +13:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:4/0/physics_layer_0/angular_velocity = 0.0 +14:4/0 = 0 +14:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:4/0/physics_layer_0/angular_velocity = 0.0 +15:4/0 = 0 +15:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:4/0/physics_layer_0/angular_velocity = 0.0 +0:5/0 = 0 +0:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:5/0/physics_layer_0/angular_velocity = 0.0 +1:5/0 = 0 +1:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:5/0/physics_layer_0/angular_velocity = 0.0 +1:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +2:5/0 = 0 +2:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:5/0/physics_layer_0/angular_velocity = 0.0 +2:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:5/0 = 0 +3:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:5/0/physics_layer_0/angular_velocity = 0.0 +3:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +4:5/0 = 0 +4:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:5/0/physics_layer_0/angular_velocity = 0.0 +5:5/0 = 0 +5:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:5/0/physics_layer_0/angular_velocity = 0.0 +6:5/0 = 0 +6:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:5/0/physics_layer_0/angular_velocity = 0.0 +7:5/0 = 0 +7:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:5/0/physics_layer_0/angular_velocity = 0.0 +8:5/0 = 0 +8:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:5/0/physics_layer_0/angular_velocity = 0.0 +9:5/0 = 0 +9:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:5/0/physics_layer_0/angular_velocity = 0.0 +10:5/0 = 0 +10:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:5/0/physics_layer_0/angular_velocity = 0.0 +11:5/0 = 0 +11:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:5/0/physics_layer_0/angular_velocity = 0.0 +12:5/0 = 0 +12:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:5/0/physics_layer_0/angular_velocity = 0.0 +13:5/0 = 0 +13:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:5/0/physics_layer_0/angular_velocity = 0.0 +14:5/0 = 0 +14:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:5/0/physics_layer_0/angular_velocity = 0.0 +15:5/0 = 0 +15:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:5/0/physics_layer_0/angular_velocity = 0.0 +0:6/0 = 0 +0:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:6/0/physics_layer_0/angular_velocity = 0.0 +1:6/next_alternative_id = 3 +1:6/0 = 0 +1:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:6/0/physics_layer_0/angular_velocity = 0.0 +1:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +2:6/next_alternative_id = 3 +2:6/0 = 0 +2:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:6/0/physics_layer_0/angular_velocity = 0.0 +2:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:6/next_alternative_id = 3 +3:6/0 = 0 +3:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:6/0/physics_layer_0/angular_velocity = 0.0 +3:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +4:6/0 = 0 +4:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:6/0/physics_layer_0/angular_velocity = 0.0 +5:6/0 = 0 +5:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:6/0/physics_layer_0/angular_velocity = 0.0 +6:6/0 = 0 +6:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:6/0/physics_layer_0/angular_velocity = 0.0 +7:6/0 = 0 +7:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:6/0/physics_layer_0/angular_velocity = 0.0 +8:6/0 = 0 +8:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:6/0/physics_layer_0/angular_velocity = 0.0 +9:6/0 = 0 +9:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:6/0/physics_layer_0/angular_velocity = 0.0 +10:6/0 = 0 +10:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:6/0/physics_layer_0/angular_velocity = 0.0 +11:6/0 = 0 +11:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:6/0/physics_layer_0/angular_velocity = 0.0 +12:6/0 = 0 +12:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:6/0/physics_layer_0/angular_velocity = 0.0 +13:6/0 = 0 +13:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:6/0/physics_layer_0/angular_velocity = 0.0 +14:6/0 = 0 +14:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:6/0/physics_layer_0/angular_velocity = 0.0 +15:6/0 = 0 +15:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:6/0/physics_layer_0/angular_velocity = 0.0 +0:7/0 = 0 +0:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:7/0/physics_layer_0/angular_velocity = 0.0 +1:7/0 = 0 +1:7/0/terrain_set = 0 +1:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:7/0/physics_layer_0/angular_velocity = 0.0 +1:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +1:7/0/terrains_peering_bit/bottom_right_corner = 0 +1:7/0/terrains_peering_bit/bottom_left_corner = 0 +1:7/0/terrains_peering_bit/top_left_corner = 0 +2:7/0 = 0 +2:7/0/terrain_set = 0 +2:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:7/0/physics_layer_0/angular_velocity = 0.0 +2:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +2:7/0/terrains_peering_bit/bottom_right_corner = 0 +2:7/0/terrains_peering_bit/bottom_left_corner = 0 +3:7/0 = 0 +3:7/0/terrain_set = 0 +3:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:7/0/physics_layer_0/angular_velocity = 0.0 +3:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:7/0/terrains_peering_bit/bottom_right_corner = 0 +3:7/0/terrains_peering_bit/bottom_left_corner = 0 +3:7/0/terrains_peering_bit/top_right_corner = 0 +4:7/0 = 0 +4:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:7/0/physics_layer_0/angular_velocity = 0.0 +5:7/0 = 0 +5:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:7/0/physics_layer_0/angular_velocity = 0.0 +6:7/0 = 0 +6:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:7/0/physics_layer_0/angular_velocity = 0.0 +7:7/0 = 0 +7:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:7/0/physics_layer_0/angular_velocity = 0.0 +8:7/0 = 0 +8:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:7/0/physics_layer_0/angular_velocity = 0.0 +9:7/0 = 0 +9:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:7/0/physics_layer_0/angular_velocity = 0.0 +10:7/0 = 0 +10:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:7/0/physics_layer_0/angular_velocity = 0.0 +11:7/0 = 0 +11:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:7/0/physics_layer_0/angular_velocity = 0.0 +12:7/0 = 0 +12:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:7/0/physics_layer_0/angular_velocity = 0.0 +13:7/0 = 0 +13:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:7/0/physics_layer_0/angular_velocity = 0.0 +14:7/0 = 0 +14:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:7/0/physics_layer_0/angular_velocity = 0.0 +15:7/0 = 0 +15:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:7/0/physics_layer_0/angular_velocity = 0.0 +0:8/0 = 0 +0:8/0/terrain_set = 0 +0:8/0/terrain = 0 +0:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:8/0/physics_layer_0/angular_velocity = 0.0 +0:8/0/terrains_peering_bit/bottom_right_corner = 0 +0:8/0/terrains_peering_bit/bottom_left_corner = 0 +0:8/0/terrains_peering_bit/top_left_corner = 0 +0:8/0/terrains_peering_bit/top_right_corner = 0 +1:8/0 = 0 +1:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:8/0/physics_layer_0/angular_velocity = 0.0 +2:8/0 = 0 +2:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:8/0/physics_layer_0/angular_velocity = 0.0 +3:8/0 = 0 +3:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:8/0/physics_layer_0/angular_velocity = 0.0 +4:8/0 = 0 +4:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:8/0/physics_layer_0/angular_velocity = 0.0 +5:8/0 = 0 +5:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:8/0/physics_layer_0/angular_velocity = 0.0 +6:8/0 = 0 +6:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:8/0/physics_layer_0/angular_velocity = 0.0 +7:8/0 = 0 +7:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:8/0/physics_layer_0/angular_velocity = 0.0 +8:8/0 = 0 +8:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +8:8/0/physics_layer_0/angular_velocity = 0.0 +9:8/0 = 0 +9:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:8/0/physics_layer_0/angular_velocity = 0.0 +10:8/0 = 0 +10:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:8/0/physics_layer_0/angular_velocity = 0.0 +11:8/0 = 0 +11:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:8/0/physics_layer_0/angular_velocity = 0.0 +12:8/0 = 0 +12:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:8/0/physics_layer_0/angular_velocity = 0.0 +13:8/0 = 0 +13:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:8/0/physics_layer_0/angular_velocity = 0.0 +14:8/0 = 0 +14:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:8/0/physics_layer_0/angular_velocity = 0.0 +15:8/0 = 0 +15:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:8/0/physics_layer_0/angular_velocity = 0.0 +0:9/0 = 0 +0:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:9/0/physics_layer_0/angular_velocity = 0.0 +1:9/0 = 0 +1:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:9/0/physics_layer_0/angular_velocity = 0.0 +2:9/0 = 0 +2:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:9/0/physics_layer_0/angular_velocity = 0.0 +3:9/0 = 0 +3:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:9/0/physics_layer_0/angular_velocity = 0.0 +4:9/0 = 0 +4:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:9/0/physics_layer_0/angular_velocity = 0.0 +5:9/0 = 0 +5:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:9/0/physics_layer_0/angular_velocity = 0.0 +6:9/0 = 0 +6:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:9/0/physics_layer_0/angular_velocity = 0.0 +7:9/0 = 0 +7:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:9/0/physics_layer_0/angular_velocity = 0.0 +10:9/0 = 0 +10:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:9/0/physics_layer_0/angular_velocity = 0.0 +11:9/0 = 0 +11:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +11:9/0/physics_layer_0/angular_velocity = 0.0 +12:9/0 = 0 +12:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:9/0/physics_layer_0/angular_velocity = 0.0 +13:9/0 = 0 +13:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:9/0/physics_layer_0/angular_velocity = 0.0 +14:9/0 = 0 +14:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:9/0/physics_layer_0/angular_velocity = 0.0 +15:9/0 = 0 +15:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:9/0/physics_layer_0/angular_velocity = 0.0 +0:10/0 = 0 +0:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:10/0/physics_layer_0/angular_velocity = 0.0 +1:10/0 = 0 +1:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:10/0/physics_layer_0/angular_velocity = 0.0 +2:10/0 = 0 +2:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:10/0/physics_layer_0/angular_velocity = 0.0 +3:10/0 = 0 +3:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:10/0/physics_layer_0/angular_velocity = 0.0 +5:10/0 = 0 +5:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:10/0/physics_layer_0/angular_velocity = 0.0 +6:10/0 = 0 +6:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:10/0/physics_layer_0/angular_velocity = 0.0 +7:10/0 = 0 +7:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:10/0/physics_layer_0/angular_velocity = 0.0 +13:10/0 = 0 +13:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:10/0/physics_layer_0/angular_velocity = 0.0 +14:10/0 = 0 +14:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:10/0/physics_layer_0/angular_velocity = 0.0 +15:10/0 = 0 +15:10/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:10/0/physics_layer_0/angular_velocity = 0.0 +0:11/0 = 0 +0:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:11/0/physics_layer_0/angular_velocity = 0.0 +1:11/0 = 0 +1:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:11/0/physics_layer_0/angular_velocity = 0.0 +2:11/0 = 0 +2:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:11/0/physics_layer_0/angular_velocity = 0.0 +3:11/0 = 0 +3:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:11/0/physics_layer_0/angular_velocity = 0.0 +4:11/0 = 0 +4:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:11/0/physics_layer_0/angular_velocity = 0.0 +13:11/0 = 0 +13:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:11/0/physics_layer_0/angular_velocity = 0.0 +14:11/0 = 0 +14:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) +14:11/0/physics_layer_0/angular_velocity = 0.0 +15:11/0 = 0 +15:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:11/0/physics_layer_0/angular_velocity = 0.0 + +[resource] +physics_layer_0/collision_layer = 1 +physics_layer_0/collision_mask = 0 +terrain_set_0/mode = 1 +terrain_set_0/terrain_0/name = "Terrain 0" +terrain_set_0/terrain_0/color = Color(0.886275, 0.0980392, 0.0980392, 1) +sources/0 = SubResource("TileSetAtlasSource_yvgyd") diff --git a/DungeonShooting_Godot/resource/map/tileSet/map1/website.txt b/DungeonShooting_Godot/resource/map/tileSet/map1/website.txt new file mode 100644 index 0000000..bb6d4d7 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileSet/map1/website.txt @@ -0,0 +1 @@ +https://aekae13.itch.io/16x16-dungeon-walls-reconfig diff --git a/DungeonShooting_Godot/resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png b/DungeonShooting_Godot/resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png new file mode 100644 index 0000000..26c54b7 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png.import b/DungeonShooting_Godot/resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png.import new file mode 100644 index 0000000..2a14084 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dj8nrd5od4fcl" +path="res://.godot/imported/16x16 dungeon ii wall reconfig v04 spritesheet.png-c062adcaebcfa511f8bb4f73bd30ea6f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" +dest_files=["res://.godot/imported/16x16 dungeon ii wall reconfig v04 spritesheet.png-c062adcaebcfa511f8bb4f73bd30ea6f.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/material/SmokeParticleMaterial.tres b/DungeonShooting_Godot/resource/material/SmokeParticleMaterial.tres index 1bbb83e..95ae1df 100644 --- a/DungeonShooting_Godot/resource/material/SmokeParticleMaterial.tres +++ b/DungeonShooting_Godot/resource/material/SmokeParticleMaterial.tres @@ -1,7 +1,13 @@ -[gd_resource type="ParticleProcessMaterial" load_steps=2 format=3 uid="uid://c1chld6lkpgji"] +[gd_resource type="ParticleProcessMaterial" load_steps=4 format=3 uid="uid://c1chld6lkpgji"] [ext_resource type="Texture2D" uid="uid://bs1lan5uwxyfg" path="res://resource/curve/Curve1.tres" id="1_yr5l8"] +[sub_resource type="Gradient" id="Gradient_ryemi"] +colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0.537255) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_4mhw0"] +gradient = SubResource("Gradient_ryemi") + [resource] particle_flag_disable_z = true spread = 180.0 @@ -13,5 +19,5 @@ scale_min = 0.8 scale_max = 0.8 scale_curve = ExtResource("1_yr5l8") -color = Color(1, 1, 1, 0.533333) +color_ramp = SubResource("GradientTexture1D_4mhw0") anim_offset_max = 1.0 diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png index afa441e..5b488de 100644 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png +++ b/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png index fc38c20..a76c266 100644 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png +++ b/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png index cbda060..14a69ff 100644 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png +++ b/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/effects/weapon/MeleeAttack1.png b/DungeonShooting_Godot/resource/sprite/effects/weapon/MeleeAttack1.png index c22890a..aaa2799 100644 --- a/DungeonShooting_Godot/resource/sprite/effects/weapon/MeleeAttack1.png +++ b/DungeonShooting_Godot/resource/sprite/effects/weapon/MeleeAttack1.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/PreviewTransition.png b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition.png new file mode 100644 index 0000000..13d2000 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/PreviewTransition.png.import b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition.png.import new file mode 100644 index 0000000..be87349 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://womb24ctpfbs" +path="res://.godot/imported/PreviewTransition.png-b83b4ced379d583acb727e75fbc9fb96.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/PreviewTransition.png" +dest_files=["res://.godot/imported/PreviewTransition.png-b83b4ced379d583acb727e75fbc9fb96.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/map/PreviewTransition2.png b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition2.png new file mode 100644 index 0000000..4c71a5f --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition2.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/PreviewTransition2.png.import b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition2.png.import new file mode 100644 index 0000000..b6b8603 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://unjhskw8mgdy" +path="res://.godot/imported/PreviewTransition2.png-ee017f2654dd639c4b784a54b4e7b40c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/PreviewTransition2.png" +dest_files=["res://.godot/imported/PreviewTransition2.png-ee017f2654dd639c4b784a54b4e7b40c.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/map/WallTransition1.png b/DungeonShooting_Godot/resource/sprite/map/WallTransition1.png new file mode 100644 index 0000000..420ef2c --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/WallTransition1.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/WallTransition1.png.import b/DungeonShooting_Godot/resource/sprite/map/WallTransition1.png.import new file mode 100644 index 0000000..7141f43 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/WallTransition1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ddkx5x25fges7" +path="res://.godot/imported/WallTransition1.png-290006472c94b57424b8ec3bd229ce8b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/WallTransition1.png" +dest_files=["res://.godot/imported/WallTransition1.png-290006472c94b57424b8ec3bd229ce8b.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/map/WallTransition2.png b/DungeonShooting_Godot/resource/sprite/map/WallTransition2.png new file mode 100644 index 0000000..f01f30b --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/WallTransition2.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/WallTransition2.png.import b/DungeonShooting_Godot/resource/sprite/map/WallTransition2.png.import new file mode 100644 index 0000000..5f256b8 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/WallTransition2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b751rowqecctj" +path="res://.godot/imported/WallTransition2.png-43446d8d92d11ce7c994737780ed01a3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/WallTransition2.png" +dest_files=["res://.godot/imported/WallTransition2.png-43446d8d92d11ce7c994737780ed01a3.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/map/WallTransition3.png b/DungeonShooting_Godot/resource/sprite/map/WallTransition3.png new file mode 100644 index 0000000..430aba3 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/WallTransition3.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/WallTransition3.png.import b/DungeonShooting_Godot/resource/sprite/map/WallTransition3.png.import new file mode 100644 index 0000000..1bbeb6d --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/WallTransition3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://civvboe078gcc" +path="res://.godot/imported/WallTransition3.png-db21c2408170d6ada2e3c9da5f2912c8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/WallTransition3.png" +dest_files=["res://.godot/imported/WallTransition3.png-db21c2408170d6ada2e3c9da5f2912c8.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/map/door1_down.png b/DungeonShooting_Godot/resource/sprite/map/door1_down.png new file mode 100644 index 0000000..faeba59 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/door1_down.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/door1_down.png.import b/DungeonShooting_Godot/resource/sprite/map/door1_down.png.import new file mode 100644 index 0000000..de95af2 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/door1_down.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dviv44fhwvkb1" +path="res://.godot/imported/door1_down.png-59ffc0993731fd627318f9402b22d199.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/door1_down.png" +dest_files=["res://.godot/imported/door1_down.png-59ffc0993731fd627318f9402b22d199.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/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png b/DungeonShooting_Godot/resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png deleted file mode 100644 index 26c54b7..0000000 --- a/DungeonShooting_Godot/resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png.import b/DungeonShooting_Godot/resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png.import deleted file mode 100644 index 2f22127..0000000 --- a/DungeonShooting_Godot/resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dj8nrd5od4fcl" -path="res://.godot/imported/16x16 dungeon ii wall reconfig v04 spritesheet.png-ff78c744bd80f7a90af72583d38712d5.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" -dest_files=["res://.godot/imported/16x16 dungeon ii wall reconfig v04 spritesheet.png-ff78c744bd80f7a90af72583d38712d5.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/map/map1/door1_down.png b/DungeonShooting_Godot/resource/sprite/map/map1/door1_down.png deleted file mode 100644 index faeba59..0000000 --- a/DungeonShooting_Godot/resource/sprite/map/map1/door1_down.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/map1/door1_down.png.import b/DungeonShooting_Godot/resource/sprite/map/map1/door1_down.png.import deleted file mode 100644 index b7e352f..0000000 --- a/DungeonShooting_Godot/resource/sprite/map/map1/door1_down.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dviv44fhwvkb1" -path="res://.godot/imported/door1_down.png-0738db3503e6a0f8ce04f89dbe063801.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/map/map1/door1_down.png" -dest_files=["res://.godot/imported/door1_down.png-0738db3503e6a0f8ce04f89dbe063801.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/map/map1/website.txt b/DungeonShooting_Godot/resource/sprite/map/map1/website.txt deleted file mode 100644 index cea76c3..0000000 --- a/DungeonShooting_Godot/resource/sprite/map/map1/website.txt +++ /dev/null @@ -1 +0,0 @@ -https://aekae13.itch.io/16x16-dungeon-walls-reconfig \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/spriteFrames/effect/KnifeHit1.tres b/DungeonShooting_Godot/resource/spriteFrames/effect/KnifeHit1.tres index e519ec9..69b6d5a 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/effect/KnifeHit1.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/effect/KnifeHit1.tres @@ -47,7 +47,7 @@ "duration": 1.0, "texture": SubResource("6") }], -"loop": true, +"loop": false, "name": &"default", "speed": 30.0 }] diff --git a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_EW.tres b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_EW.tres index 8fa6c2a..2c7c77e 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_EW.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_EW.tres @@ -1,85 +1,85 @@ [gd_resource type="SpriteFrames" load_steps=22 format=3 uid="uid://3ps6h2f54qa5"] -[ext_resource type="Texture2D" uid="uid://dviv44fhwvkb1" path="res://resource/sprite/map/map1/door1_down.png" id="1_7f8h7"] +[ext_resource type="Texture2D" uid="uid://dviv44fhwvkb1" path="res://resource/sprite/map/door1_down.png" id="1_peglf"] [sub_resource type="AtlasTexture" id="AtlasTexture_5m6ya"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(144, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_kmhtl"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(128, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_umaop"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(112, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_aqex7"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(96, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_hdocg"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(80, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_aiymw"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(64, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_8f7dv"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(32, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_iv82l"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(16, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_ycmnv"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(0, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_o7xw0"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(144, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_j8iw2"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(0, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_823if"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(16, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_7hyae"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(32, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_6lhu3"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(48, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_a026j"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(64, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_wfjf7"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(80, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_rhj60"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(96, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_06y08"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(112, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_1200j"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(128, 48, 16, 48) [sub_resource type="AtlasTexture" id="AtlasTexture_mbnbx"] -atlas = ExtResource("1_7f8h7") +atlas = ExtResource("1_peglf") region = Rect2(144, 48, 16, 48) [resource] diff --git a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_NS.tres b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_NS.tres index 48f90e2..dfc5109 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_NS.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_NS.tres @@ -1,6 +1,7 @@ [gd_resource type="SpriteFrames" load_steps=21 format=3 uid="uid://xs72aopsgpg6"] -[ext_resource type="Texture2D" uid="uid://dviv44fhwvkb1" path="res://resource/sprite/map/map1/door1_down.png" id="1_ugffo"] +[ext_resource type="Texture2D" uid="uid://dviv44fhwvkb1" path="res://resource/sprite/map/door1_down.png" id="1_ugffo"] + [sub_resource type="AtlasTexture" id="AtlasTexture_77i3w"] atlas = ExtResource("1_ugffo") diff --git a/DungeonShooting_Godot/scene/Main.tscn b/DungeonShooting_Godot/scene/Main.tscn index b034a25..877b1ff 100644 --- a/DungeonShooting_Godot/scene/Main.tscn +++ b/DungeonShooting_Godot/scene/Main.tscn @@ -39,8 +39,9 @@ [node name="SubViewport" type="SubViewport" parent="ViewCanvas/SubViewportContainer"] handle_input_locally = false +use_hdr_2d = true canvas_item_default_texture_filter = 0 -size = Vector2i(480, 270) +size = Vector2i(320, 180) render_target_update_mode = 4 [node name="SceneRoot" type="Node2D" parent="ViewCanvas/SubViewportContainer/SubViewport"] diff --git a/DungeonShooting_Godot/scene/World.tscn b/DungeonShooting_Godot/scene/World.tscn index 23a0ef2..69e07d3 100644 --- a/DungeonShooting_Godot/scene/World.tscn +++ b/DungeonShooting_Godot/scene/World.tscn @@ -1,20 +1,29 @@ [gd_scene load_steps=3 format=3 uid="uid://bqf2vks5ggnsp"] [ext_resource type="Script" path="res://src/game/room/World.cs" id="1_kt3mm"] -[ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileSet/TileSet1.tres" id="2_p6iui"] -[node name="World" type="Node2D" node_paths=PackedStringArray("NormalLayer", "YSortLayer", "TileRoot", "StaticSpriteRoot", "AffiliationAreaRoot")] +[sub_resource type="Environment" id="Environment_g06jj"] +background_mode = 3 +glow_enabled = true +glow_normalized = true +glow_strength = 1.05 +glow_blend_mode = 1 + +[node name="World" type="CanvasModulate" node_paths=PackedStringArray("NormalLayer", "YSortLayer", "TileRoot", "StaticSpriteRoot", "AffiliationAreaRoot", "FogMaskRoot")] +color = Color(0, 0, 0, 1) script = ExtResource("1_kt3mm") NormalLayer = NodePath("NormalLayer") YSortLayer = NodePath("YSortLayer") TileRoot = NodePath("TileRoot") StaticSpriteRoot = NodePath("StaticSpriteRoot") AffiliationAreaRoot = NodePath("AffiliationAreaRoot") +FogMaskRoot = NodePath("FogMaskRoot") metadata/_edit_vertical_guides_ = [] +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_g06jj") + [node name="TileRoot" type="TileMap" parent="."] -y_sort_enabled = true -tile_set = ExtResource("2_p6iui") format = 2 layer_0/name = "Floor" layer_0/z_index = -10 @@ -35,7 +44,7 @@ layer_3/name = "AisleFloor" layer_3/enabled = true layer_3/modulate = Color(1, 1, 1, 1) -layer_3/y_sort_enabled = true +layer_3/y_sort_enabled = false layer_3/y_sort_origin = 0 layer_3/z_index = -10 layer_3/tile_data = PackedInt32Array() @@ -50,3 +59,5 @@ y_sort_enabled = true [node name="AffiliationAreaRoot" type="Node2D" parent="."] + +[node name="FogMaskRoot" type="Node2D" parent="."] diff --git a/DungeonShooting_Godot/scene/test/TestCreateSector.tscn b/DungeonShooting_Godot/scene/test/TestCreateSector.tscn new file mode 100644 index 0000000..795fc2e --- /dev/null +++ b/DungeonShooting_Godot/scene/test/TestCreateSector.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=4 format=3 uid="uid://d4axmwaqk1f55"] + +[ext_resource type="Script" path="res://src/test/TestCreateSector.cs" id="1_ieqp4"] +[ext_resource type="Texture2D" uid="uid://uhhfgdhpk7i4" path="res://icon.png" id="2_73jok"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_42m3w"] + +[node name="TestCreateSector" type="Node2D"] +script = ExtResource("1_ieqp4") + +[node name="Area2D" type="Area2D" parent="."] +position = Vector2(959, 505) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Area2D"] + +[node name="Sprite2D" type="Sprite2D" parent="Area2D/CollisionPolygon2D"] +texture = ExtResource("2_73jok") + +[node name="Area2D2" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D2"] +shape = SubResource("CircleShape2D_42m3w") diff --git a/DungeonShooting_Godot/scene/test/TestGenerateDungeon.tscn b/DungeonShooting_Godot/scene/test/TestGenerateDungeon.tscn index da0143e..2b694f5 100644 --- a/DungeonShooting_Godot/scene/test/TestGenerateDungeon.tscn +++ b/DungeonShooting_Godot/scene/test/TestGenerateDungeon.tscn @@ -1,7 +1,8 @@ [gd_scene load_steps=5 format=3 uid="uid://5bbx1u0od3jm"] [ext_resource type="Script" path="res://src/test/TestGenerateDungeon.cs" id="1"] -[ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="2"] +[ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="2"] + [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_rvg0t"] diff --git a/DungeonShooting_Godot/scene/test/TestNewTileMap.tscn b/DungeonShooting_Godot/scene/test/TestNewTileMap.tscn index 357fb18..7d954b0 100644 --- a/DungeonShooting_Godot/scene/test/TestNewTileMap.tscn +++ b/DungeonShooting_Godot/scene/test/TestNewTileMap.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=3 format=3 uid="uid://dr72ij0rwlafo"] -[ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileSet/TileSet1.tres" id="1_oisp3"] +[ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileSet/map1/TileSet1.tres" id="1_oisp3"] + [sub_resource type="CircleShape2D" id="CircleShape2D_wsquq"] diff --git a/DungeonShooting_Godot/scene/test/TestRoomFog.tscn b/DungeonShooting_Godot/scene/test/TestRoomFog.tscn new file mode 100644 index 0000000..87a0c1e --- /dev/null +++ b/DungeonShooting_Godot/scene/test/TestRoomFog.tscn @@ -0,0 +1,31 @@ +[gd_scene load_steps=3 format=3 uid="uid://bgbjg8virrams"] + +[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="1_bty2r"] +[ext_resource type="Texture2D" uid="uid://uhhfgdhpk7i4" path="res://icon.png" id="1_d62vx"] + +[node name="TestRoomFog" type="Node2D"] + +[node name="PointLight2D" type="PointLight2D" parent="."] +position = Vector2(705, -196) +scale = Vector2(50, 50) +color = Color(1, 1, 1, 0.180392) +blend_mode = 2 +range_item_cull_mask = 3 +texture = ExtResource("1_bty2r") + +[node name="PointLight2D2" type="PointLight2D" parent="."] +position = Vector2(372, 65) +scale = Vector2(50, 50) +blend_mode = 2 +texture = ExtResource("1_bty2r") + +[node name="CanvasModulate" type="CanvasModulate" parent="."] +light_mask = 3 +position = Vector2(-16, 33) +color = Color(0, 0, 0, 1) + +[node name="Sprite2D" type="Sprite2D" parent="CanvasModulate"] +light_mask = 3 +position = Vector2(117, 318) +scale = Vector2(50, 46.168) +texture = ExtResource("1_d62vx") diff --git a/DungeonShooting_Godot/scene/test/TestTileLayer.tscn b/DungeonShooting_Godot/scene/test/TestTileLayer.tscn index f386634..43c3ad7 100644 --- a/DungeonShooting_Godot/scene/test/TestTileLayer.tscn +++ b/DungeonShooting_Godot/scene/test/TestTileLayer.tscn @@ -1,12 +1,13 @@ [gd_scene load_steps=13 format=3 uid="uid://d1m4kunwifxax"] -[ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="1"] -[ext_resource type="Texture2D" uid="uid://chd2vtesap5cf" path="res://resource/sprite/role/enemy0001/Enemy0001.png" id="2"] +[ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="1"] +[ext_resource type="Texture2D" uid="uid://ddhkhfaos2w1g" path="res://resource/sprite/role/enemy0001/enemy0001.png" id="2"] [ext_resource type="Texture2D" uid="uid://5geiuvv6hyov" path="res://resource/sprite/weapon/gun2.png" id="3"] [ext_resource type="Texture2D" uid="uid://dto03bc2qbhnj" path="res://resource/sprite/shell/Shell0001.png" id="4"] + [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ch2b5"] texture = ExtResource("1") margins = Vector2i(80, 144) diff --git a/DungeonShooting_Godot/src/config/ExcelConfig.cs b/DungeonShooting_Godot/src/config/ExcelConfig.cs index b0abf46..86550d4 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig.cs @@ -64,7 +64,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); throw new Exception("初始化表'ActivityObject'失败!"); } } @@ -82,7 +82,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); throw new Exception("初始化表'Sound'失败!"); } } @@ -100,7 +100,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); throw new Exception("初始化表'Weapon'失败!"); } } @@ -153,7 +153,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); throw new Exception("初始化'Weapon'引用其他表数据失败, 当前行id: " + item.Id); } } diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs b/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs index 8f2f8ec..2496449 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs @@ -131,7 +131,7 @@ public float BeLoadedTime; /// - /// 连续发射次数范围, 仅当 'ContinuousShoot' 为 false 时生效
+ /// 连续发射次数区间, 仅当 'ContinuousShoot' 为 false 时生效
/// 格式为[value]或者[min,max] ///
[JsonInclude] @@ -168,7 +168,7 @@ public float FiringSpeedBackSpeed; /// - /// 单次开火发射子弹数量范围
+ /// 单次开火发射子弹数量区间
/// 格式为[value]或者[min,max] ///
[JsonInclude] @@ -211,7 +211,13 @@ public float ScatteringRangeBackDelayTime; /// - /// 后坐力范围 (仅用于开火后武器身抖动)
+ /// 开火后相机抖动强度,只有玩家拾起武器开火才会抖动相机 + ///
+ [JsonInclude] + public float CameraShake; + + /// + /// 后坐力区间 (仅用于开火后武器身抖动)
/// 格式为[value]或者[min,max] ///
[JsonInclude] @@ -248,14 +254,22 @@ public string BulletId; /// - /// 子弹造成的伤害范围
+ /// 造成的伤害区间
/// 格式为[value]或者[min,max] ///
[JsonInclude] - public int[] BulletHarmRange; + public int[] HarmRange; /// - /// 子弹偏移角度范围
+ /// 造成伤害后击退值区间
+ /// 如果发射子弹,则按每发子弹算击退
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] RepelRnage; + + /// + /// 子弹偏移角度区间
/// 用于设置子弹偏移朝向, 该属性和射半径效果类似, 但与其不同的是, 散射半径是用来控制枪口朝向的, 而该属性是控制子弹朝向的, 可用于制作霰弹枪子弹效果
/// 格式为[value]或者[min,max] ///
@@ -263,14 +277,14 @@ public float[] BulletDeviationAngleRange; /// - /// 子弹初速度范围
+ /// 子弹初速度区间
/// 格式为[value]或者[min,max] ///
[JsonInclude] public float[] BulletSpeedRange; /// - /// 子弹飞行距离范围
+ /// 子弹飞行距离区间
/// 格式为[value]或者[min,max] ///
[JsonInclude] @@ -302,13 +316,20 @@ public bool CanMeleeAttack; /// - /// 近战攻击伤害范围
+ /// 近战攻击伤害区间
/// 格式为格式为[value]或者[min,max] ///
[JsonInclude] public int[] MeleeAttackHarmRange; /// + /// 近战攻击造成伤害后击退值区间
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] MeleeAttackRepelRnage; + + /// /// 射击音效 /// public Sound ShootSound; @@ -430,13 +451,15 @@ inst.ScatteringRangeAddValue = ScatteringRangeAddValue; inst.ScatteringRangeBackSpeed = ScatteringRangeBackSpeed; inst.ScatteringRangeBackDelayTime = ScatteringRangeBackDelayTime; + inst.CameraShake = CameraShake; inst.BacklashRange = BacklashRange; inst.BacklashRegressionSpeed = BacklashRegressionSpeed; inst.UpliftAngle = UpliftAngle; inst.DefaultAngle = DefaultAngle; inst.UpliftAngleRestore = UpliftAngleRestore; inst.BulletId = BulletId; - inst.BulletHarmRange = BulletHarmRange; + inst.HarmRange = HarmRange; + inst.RepelRnage = RepelRnage; inst.BulletDeviationAngleRange = BulletDeviationAngleRange; inst.BulletSpeedRange = BulletSpeedRange; inst.BulletDistanceRange = BulletDistanceRange; @@ -445,6 +468,7 @@ inst.ThrowCollisionSize = ThrowCollisionSize; inst.CanMeleeAttack = CanMeleeAttack; inst.MeleeAttackHarmRange = MeleeAttackHarmRange; + inst.MeleeAttackRepelRnage = MeleeAttackRepelRnage; inst.ShootSound = ShootSound; inst.BeginReloadSound = BeginReloadSound; inst.BeginReloadSoundDelayTime = BeginReloadSoundDelayTime; diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityMaterial.cs b/DungeonShooting_Godot/src/framework/activity/ActivityMaterial.cs new file mode 100644 index 0000000..2d561fc --- /dev/null +++ b/DungeonShooting_Godot/src/framework/activity/ActivityMaterial.cs @@ -0,0 +1,8 @@ + +/// +/// 物体材质 +/// +public class ActivityMaterial +{ + +} \ 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 fd0bd6d..3a6a47a 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs @@ -115,7 +115,7 @@ public bool IsThrowing => _throwForce != null && !_isFallOver; /// - /// 当前物体的海拔高度, 如果大于0, 则会做自由落体运动, 也就是执行投抛代码 + /// 当前物体的海拔高度, 如果大于0, 则会做自由落体运动, 也就是执行投抛逻辑 /// public float Altitude { @@ -143,11 +143,6 @@ } private float _verticalSpeed; - - /// - /// 物体投抛时旋转速度, 角度制 - /// - public float ThrowRotationDegreesSpeed { get; set; } /// /// 落地之后是否回弹 @@ -163,6 +158,11 @@ /// 物体下坠回弹后的运动速度衰减量 /// public float BounceSpeed { get; set; } = 0.75f; + + /// + /// 物体下坠回弹后的旋转速度衰减量 + /// + public float BounceRotationSpeed { get; set; } = 0.5f; /// /// 投抛状态下物体碰撞器大小, 如果 (x, y) 都小于 0, 则默认使用 AnimatedSprite 的默认动画第一帧的大小 @@ -207,6 +207,11 @@ public bool EnableCustomBehavior { get; set; } = true; /// + /// 物体材质数据 + /// + public ActivityMaterial ActivityMaterial { get; private set; } + + /// /// 所在的 World 对象 /// public World World { get; private set; } @@ -703,14 +708,15 @@ Altitude = altitude; //Position = Position + new Vector2(0, altitude); VerticalSpeed = verticalSpeed; - ThrowRotationDegreesSpeed = rotateSpeed; + //ThrowRotationDegreesSpeed = rotateSpeed; if (_throwForce != null) { MoveController.RemoveForce(_throwForce); } - _throwForce = new ExternalForce("throw"); + _throwForce = new ExternalForce(ForceNames.Throw); _throwForce.Velocity = velocity; + _throwForce.RotationSpeed = Mathf.DegToRad(rotateSpeed); MoveController.AddForce(_throwForce); InitThrowData(); @@ -909,7 +915,7 @@ { if (EnableVerticalMotion) //如果启用了纵向运动, 则更新运动 { - GlobalRotationDegrees = GlobalRotationDegrees + ThrowRotationDegreesSpeed * newDelta; + //GlobalRotationDegrees = GlobalRotationDegrees + ThrowRotationDegreesSpeed * newDelta; var ysp = VerticalSpeed; @@ -944,7 +950,15 @@ OnFirstFallToGround(); } - MoveController.ScaleAllForce(BounceSpeed); + if (_throwForce != null) + { + //缩放移动速度 + //MoveController.ScaleAllForce(BounceSpeed); + _throwForce.Velocity *= BounceSpeed; + //缩放旋转速度 + //MoveController.ScaleAllRotationSpeed(BounceStrength); + _throwForce.RotationSpeed *= BounceRotationSpeed; + } //如果落地高度不够低, 再抛一次 if (Bounce && (!_hasResilienceVerticalSpeed || _resilienceVerticalSpeed > 5)) { @@ -965,7 +979,6 @@ } } _verticalSpeed = _resilienceVerticalSpeed; - ThrowRotationDegreesSpeed = ThrowRotationDegreesSpeed * BounceStrength; _isFallOver = false; OnFallToGround(); @@ -1120,14 +1133,17 @@ if (IsDebug) { DebugDraw(); - var arr = _components.ToArray(); - for (int i = 0; i < arr.Length; i++) + if (_components.Count > 0) { - if (IsDestroyed) return; - var temp = arr[i].Value; - if (temp != null && temp.ActivityInstance == this && temp.Enable) + var arr = _components.ToArray(); + for (int i = 0; i < arr.Length; i++) { - temp.DebugDraw(); + if (IsDestroyed) return; + var temp = arr[i].Value; + if (temp != null && temp.ActivityInstance == this && temp.Enable) + { + temp.DebugDraw(); + } } } } @@ -1444,7 +1460,7 @@ if (AffiliationArea == null) { - GD.PrintErr($"调用函数: BecomesStaticImage() 失败, 物体{Name}没有归属区域, 无法确定绘制到哪个ImageCanvas上, 直接执行销毁"); + Debug.LogError($"调用函数: BecomesStaticImage() 失败, 物体{Name}没有归属区域, 无法确定绘制到哪个ImageCanvas上, 直接执行销毁"); Destroy(); return; } diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs index 9c82e49..28a5d5a 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs @@ -53,7 +53,7 @@ instance._InitNode(config, world); return instance; } - GD.PrintErr("创建实例失败, 未找到id为'" + itemId + "'的物体!"); + Debug.LogError("创建实例失败, 未找到id为'" + itemId + "'的物体!"); return null; } diff --git a/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs b/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs index 25a62a3..02ee215 100644 --- a/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs +++ b/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs @@ -17,26 +17,36 @@ public bool Enable { get; set; } = true; /// - /// 阻力大小, 也就是速度每秒衰减的量 - /// - public float Resistance { get; set; } = 0; - - /// /// 是否在空中也会受到阻力 /// public bool EnableResistanceInTheAir { get; set; } = true; /// - /// 当速度到达 0 后是否自动销毁, 默认 true + /// 当速度( Velocity 和 RotationSpeed )到达 0 后是否自动销毁, 默认 true /// public bool AutoDestroy { get; set; } = true; /// + /// 速率的阻力大小, 也就是速度每秒衰减的量 + /// + public float VelocityResistance { get; set; } + + /// /// 当前力的速率 /// public Vector2 Velocity { get; set; } = Vector2.Zero; /// + /// 当前力对物体造成的旋转速度, 弧度制 + /// + public float RotationSpeed { get; set; } + + /// + /// 旋转速率阻力大小, 也就是速度每秒衰减的量 + /// + public float RotationResistance { get; set; } + + /// /// 物理帧更新 /// public virtual void PhysicsProcess(float delta) diff --git a/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs b/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs index 67dff7f..36167b1 100644 --- a/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs +++ b/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs @@ -32,9 +32,9 @@ private Vector2 _basisVelocity = Vector2.Zero; /// - /// 缩放所有力对象, 包括基础速率 + /// 缩放所有外力对象的速率, 包括基础速率 /// - public void ScaleAllForce(float scale) + public void ScaleAllVelocity(float scale) { foreach (var externalForce in _forceList) { @@ -43,9 +43,20 @@ BasisVelocity *= scale; } + + /// + /// 缩放所有外力对象的旋转速率 + /// + public void ScaleAllRotationSpeed(float scale) + { + foreach (var externalForce in _forceList) + { + externalForce.RotationSpeed *= scale; + } + } /// - /// 给当前控制器添加指定外力速率, 并且平均分配给所有外力速率 + /// 添加外力速率, 并且平均分配给所有外力速率 /// public void AddVelocity(Vector2 velocity) { @@ -68,9 +79,28 @@ } /// - /// 设置所有力对象, 包括基础速率 + /// 添加外力旋转速率, 并且平均分配给所有外力旋转速率 /// - public void SetAllForce(Vector2 value) + public void AddRotationSpeed(float speed) + { + if (speed != 0) + { + var forceCount = GetForceCount(); + if (forceCount > 0) + { + var tempS = speed / forceCount; + for (var i = 0; i < _forceList.Count; i++) + { + _forceList[i].RotationSpeed += tempS; + } + } + } + } + + /// + /// 设置所有外力对象的速率 + /// + public void SetAllVelocity(Vector2 value) { foreach (var externalForce in _forceList) { @@ -81,6 +111,17 @@ } /// + /// 设置所有外力对象的旋转速率 + /// + public void SetAllRotationSpeed(float speed) + { + foreach (var externalForce in _forceList) + { + externalForce.RotationSpeed = speed; + } + } + + /// /// 获取所有外力对象 /// public ExternalForce[] GetAllForce() @@ -97,19 +138,34 @@ } /// - /// 快速创建一个外力, 该外力为匿名外力, 当速率变为 0 时自动销毁 + /// 快速创建一个速率外力, 该外力为匿名外力, 当速率变为 0 时自动销毁 /// /// 外力速率 /// 阻力大小 public ExternalForce AddForce(Vector2 velocity, float resistance) { var force = AddForce("_anonymity_" + _index++); + force.AutoDestroy = true; force.Velocity = velocity; - force.Resistance = resistance; + force.VelocityResistance = resistance; return force; } /// + /// 快速创建一个旋转外力, 该外力为匿名外力, 当速率变为 0 时自动销毁 + /// + /// 外力旋转速率, 弧度制 + /// 阻力大小 + public ExternalForce AddForce(float rotationSpeed, float resistance) + { + var force = AddForce("_anonymity_" + _index++); + force.AutoDestroy = true; + force.RotationSpeed = rotationSpeed; + force.RotationResistance = resistance; + return force; + } + + /// /// 快速创建一个外力, 该外力为匿名外力, 当速率变为 0 时自动销毁 /// /// 外力速率 @@ -215,34 +271,54 @@ return; } + //外力总和 + var finallyEf = new Vector2(); + //旋转速率总和 + var rotationSpeed = 0f; + //先调用更新 - var externalForces = _forceList.ToArray(); - for (var i = 0; i < externalForces.Length; i++) + if (_forceList.Count > 0) { - var force = externalForces[i]; - if (force.Enable) + var externalForces = _forceList.ToArray(); + for (var i = 0; i < externalForces.Length; i++) { - force.PhysicsProcess(delta); - //自动销毁 - if (force.AutoDestroy && force.Velocity == Vector2.Zero) + var force = externalForces[i]; + if (force.Enable) { - _forceList.Remove(force); - externalForces[i] = null; + force.PhysicsProcess(delta); + //自动销毁 + if (CheckAutoDestroy(force)) + { + _forceList.Remove(force); + externalForces[i] = null; + } + else + { + finallyEf += force.Velocity; + rotationSpeed += force.RotationSpeed; + } } } } - //外力总和 - var finallyEf = new Vector2(); - foreach (var force in externalForces) + //处理旋转 + if (rotationSpeed != 0) { - if (force != null && force.Enable) - finallyEf += force.Velocity; + ActivityInstance.Rotation += rotationSpeed * delta; + } + //衰减旋转速率 + for (var i = 0; i < _forceList.Count; i++) + { + var force = _forceList[i]; + if (force.RotationResistance != 0 && (force.EnableResistanceInTheAir || !ActivityInstance.IsThrowing)) + { + force.RotationSpeed = Mathf.MoveToward(force.RotationSpeed, 0, force.RotationResistance * delta); + } } //最终速率 var finallyVelocity = _basisVelocity + finallyEf; - + //处理移动 if (finallyVelocity != Vector2.Zero) { //计算移动 @@ -289,15 +365,9 @@ ); //力速度衰减 - if (force.Resistance != 0 && (force.EnableResistanceInTheAir || !ActivityInstance.IsThrowing)) + if (force.VelocityResistance != 0 && (force.EnableResistanceInTheAir || !ActivityInstance.IsThrowing)) { - force.Velocity = force.Velocity.MoveToward(Vector2.Zero, force.Resistance * delta); - } - - //自动销毁 - if (force.AutoDestroy && force.Velocity == Vector2.Zero) - { - _forceList.RemoveAt(i--); + force.Velocity = force.Velocity.MoveToward(Vector2.Zero, force.VelocityResistance * delta); } } } @@ -309,6 +379,12 @@ } } + //检测是否达到自动销毁的条件 + private bool CheckAutoDestroy(ExternalForce force) + { + return force.AutoDestroy && force.Velocity == Vector2.Zero && force.RotationSpeed == 0; + } + public override void DebugDraw() { //绘制力大小和方向 diff --git a/DungeonShooting_Godot/src/framework/activity/components/StateController.cs b/DungeonShooting_Godot/src/framework/activity/components/StateController.cs index ecb69be..d3c1e20 100644 --- a/DungeonShooting_Godot/src/framework/activity/components/StateController.cs +++ b/DungeonShooting_Godot/src/framework/activity/components/StateController.cs @@ -56,7 +56,7 @@ { if (GetStateInstance(stateBase.State) != null) { - GD.PrintErr("当前状态已经在状态机中注册:", stateBase); + Debug.LogError("当前状态已经在状态机中注册:", stateBase); return; } @@ -124,7 +124,7 @@ var newState = GetStateInstance(next); if (newState == null) { - GD.PrintErr("当前状态机未找到相应状态:" + next); + Debug.LogError("当前状态机未找到相应状态:" + next); return; } diff --git a/DungeonShooting_Godot/src/framework/common/NodeExtend.cs b/DungeonShooting_Godot/src/framework/common/NodeExtend.cs index ebc149f..deee5c1 100644 --- a/DungeonShooting_Godot/src/framework/common/NodeExtend.cs +++ b/DungeonShooting_Godot/src/framework/common/NodeExtend.cs @@ -73,6 +73,22 @@ { return (control.SizeFlagsHorizontal & Control.SizeFlags.Expand) != 0; } + + /// + /// 设置是否启用节点 + /// + public static void SetActive(this Node node, bool value) + { + if (node is CanvasItem canvasItem) + { + canvasItem.Visible = value; + } + node.SetProcess(value); + node.SetPhysicsProcess(value); + node.SetProcessInput(value); + node.SetPhysicsProcessInternal(value); + node.SetProcessInput(value); + } /// /// 延时指定时间调用一个回调函数 diff --git a/DungeonShooting_Godot/src/framework/common/Utils.cs b/DungeonShooting_Godot/src/framework/common/Utils.cs index 762dad8..d139167 100644 --- a/DungeonShooting_Godot/src/framework/common/Utils.cs +++ b/DungeonShooting_Godot/src/framework/common/Utils.cs @@ -13,11 +13,11 @@ static Utils() { Random = new SeedRandom(); - GD.Print("随机种子为: ", Random.Seed); + Debug.Log("随机种子为: ", Random.Seed); } /// - /// 根据四个点计算出矩形 + /// 根据两个点计算出矩形 /// public static Rect2 CalcRect(float start1, float end1, float start2, float end2) { @@ -28,6 +28,17 @@ } /// + /// 根据两个点计算出矩形 + /// + public static Rect2I CalcRect(int start1, int end1, int start2, int end2) + { + return new Rect2I( + Mathf.Min(start1, start2), Mathf.Min(end1, end2), + Mathf.Abs(start1 - start2), Mathf.Abs(end1 - end2) + ); + } + + /// /// 返回碰撞层 mask 是否会检测 layer /// public static bool CollisionMaskWithLayer(uint mask, uint layer) @@ -211,4 +222,43 @@ return range[0]; } + + /// + /// 创建扇形多边形区域数据, 返回坐标点 + /// + /// 中心角度, 角度制 + /// 扇形半径 + /// 扇形开口角度, 角度制 + /// 扇形弧度边的数量 + /// 整体偏移坐标, 默认0 + public static Vector2[] CreateSectorPolygon(float centerAngle, float radius, float range, uint edgesCount, Vector2? offset = null) + { + var point = new Vector2[edgesCount + 2]; + var edgesAngle = range / edgesCount; + var startAngle = centerAngle - range * 0.5f; + var temp = new Vector2(radius, 0); + + for (var i = 0; i <= edgesCount; i++) + { + if (offset == null) + { + point[i] = temp.Rotated(Mathf.DegToRad(startAngle + edgesAngle * i)); + } + else + { + point[i] = temp.Rotated(Mathf.DegToRad(startAngle + edgesAngle * i)) + offset.Value; + } + } + + if (offset == null) + { + point[point.Length - 1] = Vector2.Zero; + } + else + { + point[point.Length - 1] = offset.Value; + } + + return point; + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/coroutine/ProxyCoroutineHandler.cs b/DungeonShooting_Godot/src/framework/coroutine/ProxyCoroutineHandler.cs index 5592d76..8db3fd8 100644 --- a/DungeonShooting_Godot/src/framework/coroutine/ProxyCoroutineHandler.cs +++ b/DungeonShooting_Godot/src/framework/coroutine/ProxyCoroutineHandler.cs @@ -15,6 +15,10 @@ /// public static void ProxyUpdateCoroutine(ref List coroutineList, float delta) { + if (coroutineList.Count == 0) + { + return; + } var pairs = coroutineList.ToArray(); for (var i = 0; i < pairs.Length; i++) { @@ -77,17 +81,7 @@ if (item.Enumerator.MoveNext()) { var next = item.Enumerator.Current; - if (next is IEnumerable enumerable) //嵌套协程 - { - if (item.EnumeratorStack == null) - { - item.EnumeratorStack = new Stack(); - } - - item.EnumeratorStack.Push(item.Enumerator); - item.Enumerator = enumerable.GetEnumerator(); - } - else if (next is IEnumerator enumerator) //嵌套协程 + if (next is IEnumerator enumerator) //嵌套协程 { if (item.EnumeratorStack == null) { @@ -97,6 +91,16 @@ item.EnumeratorStack.Push(item.Enumerator); item.Enumerator = enumerator; } + else if (next is IEnumerable enumerable) //嵌套协程 + { + if (item.EnumeratorStack == null) + { + item.EnumeratorStack = new Stack(); + } + + item.EnumeratorStack.Push(item.Enumerator); + item.Enumerator = enumerable.GetEnumerator(); + } else if (next is WaitForSeconds seconds) //等待秒数 { item.WaitFor(seconds); @@ -129,7 +133,7 @@ } catch (Exception e) { - GD.PrintErr("执行协程发生异常: \n" + e); + Debug.LogError("执行协程发生异常: \n" + e); ProxyStopCoroutine(ref coroutineList, item.Id); } } diff --git a/DungeonShooting_Godot/src/framework/debug/Debug.cs b/DungeonShooting_Godot/src/framework/debug/Debug.cs new file mode 100644 index 0000000..a40a1c6 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/debug/Debug.cs @@ -0,0 +1,65 @@ + +using Godot; + +/// +/// 调试日志输出 +/// +public static class Debug +{ + /// + /// 所有日志信息,包括log和error + /// + public static string AllLogMessage { get; private set; } = ""; + + /// + /// 输出日志 + /// + public static void Log(params object[] message) + { + var str = "[log]"; + foreach (var m in message) + { + if (m is null) + { + str += "null"; + } + else + { + str += m; + } + } + + GD.Print(str); + AllLogMessage = str + "\n" + AllLogMessage; + } + + /// + /// 输出错误日志 + /// + public static void LogError(params object[] message) + { + var str = "[error]"; + foreach (var m in message) + { + if (m is null) + { + str += "null"; + } + else + { + str += m; + } + } + + GD.PrintErr(str); + AllLogMessage = str + "\n" + AllLogMessage; + } + + /// + /// 清除log + /// + public static void Clear() + { + AllLogMessage = ""; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/generator/DungeonRoomGenerator.cs b/DungeonShooting_Godot/src/framework/generator/DungeonRoomGenerator.cs index e7d8da2..28229bc 100644 --- a/DungeonShooting_Godot/src/framework/generator/DungeonRoomGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/DungeonRoomGenerator.cs @@ -74,7 +74,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); return false; } @@ -86,7 +86,7 @@ /// public static bool GenerateRoomConfig() { - GD.Print("生成RoomConfig.json流程得改"); + Debug.Log("生成RoomConfig.json流程得改"); // try // { // //地图路径 @@ -162,7 +162,7 @@ // var filePath = tileDataDir + path + ".json"; // if (File.Exists(filePath)) // { - // GD.Print($"未找到'{tileDir + path}.tscn', 删除配置文件: {filePath}"); + // Debug.Log($"未找到'{tileDir + path}.tscn', 删除配置文件: {filePath}"); // File.Delete(filePath); // } // } @@ -218,11 +218,11 @@ // var text = JsonSerializer.Serialize(roomGroupMap, config); // File.WriteAllText(GameConfig.RoomTileConfigFile, text); // - // GD.Print("地牢房间配置, 重新打包完成!"); + // Debug.Log("地牢房间配置, 重新打包完成!"); // } // catch (Exception e) // { - // GD.PrintErr(e.ToString()); + // Debug.LogError(e.ToString()); // return false; // } diff --git a/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs b/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs index 13e21ce..cd72216 100644 --- a/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs @@ -19,17 +19,17 @@ OS.Execute("excel/DungeonShooting_ExcelTool.exe", new string[] { excelPath, jsonPath, codePath }, arr); foreach (var message in arr) { - GD.Print(message); + Debug.Log(message); } try { GeneratorActivityObjectInit(); - GD.Print("生成'src/framework/activity/ActivityObject_Init.cs'成功!"); + Debug.Log("生成'src/framework/activity/ActivityObject_Init.cs'成功!"); } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); } } diff --git a/DungeonShooting_Godot/src/framework/generator/ResourcePathGenerator.cs b/DungeonShooting_Godot/src/framework/generator/ResourcePathGenerator.cs index c824d0f..739d9da 100644 --- a/DungeonShooting_Godot/src/framework/generator/ResourcePathGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/ResourcePathGenerator.cs @@ -66,18 +66,18 @@ "public class ResourcePath\n" + "{\n"; - GD.Print("更新 ResourcePath..."); + Debug.Log("更新 ResourcePath..."); var directoryInfo = new DirectoryInfo(System.Environment.CurrentDirectory); EachDir(directoryInfo); resultStr += "}"; File.WriteAllText(savePath, resultStr); - GD.Print("ResourcePath.cs 写出完成!"); + Debug.Log("ResourcePath.cs 写出完成!"); } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); return false; } @@ -92,7 +92,7 @@ path = path.Replace('\\', '/'); if (exclude.Contains(path)) { - GD.Print("扫描排除路径: " + path); + Debug.Log("扫描排除路径: " + path); return; } } diff --git a/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs b/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs index 98dfa86..3a84f2a 100644 --- a/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs @@ -86,7 +86,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); return false; } @@ -117,7 +117,7 @@ var uiName = control.Name.ToString(); var path = GameConfig.UiCodeDir + uiName.FirstToLower() + "/" + uiName + ".cs"; - GD.Print("重新生成ui代码: " + path); + Debug.Log("重新生成ui代码: " + path); var uiNode = EachNodeFromEditor(control.Name, control); var code = GenerateClassCode(uiNode); @@ -126,7 +126,7 @@ { if (pair.Value > 1) { - GD.Print($"检测到同名节点: '{pair.Key}', 使用该名称的节点将无法生成唯一节点属性!"); + Debug.Log($"检测到同名节点: '{pair.Key}', 使用该名称的节点将无法生成唯一节点属性!"); } } @@ -134,7 +134,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); return false; } diff --git a/DungeonShooting_Godot/src/framework/generator/UiManagerMethodsGenerator.cs b/DungeonShooting_Godot/src/framework/generator/UiManagerMethodsGenerator.cs index a13de3d..3af101e 100644 --- a/DungeonShooting_Godot/src/framework/generator/UiManagerMethodsGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/UiManagerMethodsGenerator.cs @@ -108,7 +108,7 @@ } catch (Exception e) { - GD.PrintErr(e.ToString()); + Debug.LogError(e.ToString()); return false; } diff --git a/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs b/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs index a2cb922..1972ec2 100644 --- a/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs +++ b/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs @@ -4,7 +4,7 @@ using Godot; /// -/// 归属区域 +/// 房间归属区域 /// public partial class AffiliationArea : Area2D, IDestroy { @@ -37,7 +37,7 @@ /// /// 根据矩形区域初始化归属区域 /// - public void Init(RoomInfo roomInfo, Rect2 rect2) + public void Init(RoomInfo roomInfo, Rect2I rect2) { if (_init) { @@ -89,7 +89,7 @@ //如果是玩家 if (activityObject == Player.Current) { - OnPlayerEnterRoom(); + OnPlayerInsertRoom(); } } @@ -251,14 +251,14 @@ } //玩家进入房间 - private void OnPlayerEnterRoom() + private void OnPlayerInsertRoom() { if (IsFirstEnterFlag) { EventManager.EmitEvent(EventEnum.OnPlayerFirstEnterRoom, RoomInfo); - IsFirstEnterFlag = false; } EventManager.EmitEvent(EventEnum.OnPlayerEnterRoom, RoomInfo); + IsFirstEnterFlag = false; } diff --git a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs index 5c83e0b..ff9605b 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs @@ -1,5 +1,6 @@ using System; +using System.Collections; using System.Collections.Generic; using Godot; @@ -27,11 +28,11 @@ /// boss房间 /// public List BossRoom { get; } = new List(); - + /// /// 随机数对象 /// - public SeedRandom Random { get; } + private SeedRandom _random; //用于标记地图上的坐标是否被占用 private Grid _roomGrid { get; } = new Grid(); @@ -51,10 +52,14 @@ //房间横轴分散程度 private float _roomHorizontalMinDispersion = 0f; private float _roomHorizontalMaxDispersion = 0.5f; + // private float _roomHorizontalMinDispersion = 0f; + // private float _roomHorizontalMaxDispersion = 2f; //房间纵轴分散程度 private float _roomVerticalMinDispersion = 0f; private float _roomVerticalMaxDispersion = 0.5f; + // private float _roomVerticalMinDispersion = 0f; + // private float _roomVerticalMaxDispersion = 2f; //区域限制 private bool _enableLimitRange = true; @@ -86,9 +91,10 @@ // NoProperDoor, } - public DungeonGenerator(DungeonConfig config) + public DungeonGenerator(DungeonConfig config, SeedRandom seedRandom) { _config = config; + _random = seedRandom; _roomGroup = GameApplication.Instance.RoomConfig[config.GroupName]; //验证该组是否满足生成地牢的条件 @@ -98,9 +104,8 @@ throw new Exception("当前组'" + config.GroupName + "'" + result.ErrorMessage + ", 不能生成地牢!"); } - Random = new SeedRandom(); - GD.Print("创建地牢生成器, 随机种子: " + Random.Seed); - _roomGroup.InitWeight(Random); + Debug.Log("创建地牢生成器, 随机种子: " + _random.Seed); + _roomGroup.InitWeight(_random); } /// @@ -124,6 +129,28 @@ EachRoom(next, cb); } } + + /// + /// 用于协程中的遍历所有房间 + /// + public IEnumerator EachRoomCoroutine(Action cb) + { + return EachRoomCoroutine(StartRoomInfo, cb); + } + + private IEnumerator EachRoomCoroutine(RoomInfo roomInfo, Action cb) + { + if (roomInfo == null) + { + yield break; + } + + cb(roomInfo); + foreach (var next in roomInfo.Next) + { + yield return EachRoomCoroutine(next, cb); + } + } /// /// 生成房间 @@ -175,12 +202,12 @@ } else { - tempPrevRoomInfo = Random.RandomChoose(RoomInfos); + tempPrevRoomInfo = _random.RandomChoose(RoomInfos); } } else { - tempPrevRoomInfo = Random.RandomChoose(RoomInfos); + tempPrevRoomInfo = _random.RandomChoose(RoomInfos); } //生成下一个房间 @@ -205,7 +232,7 @@ else if (nextRoomType == DungeonRoomType.Battle) { chainTryCount = 0; - chainMaxTryCount = Random.RandomRangeInt(1, 3); + chainMaxTryCount = _random.RandomRangeInt(1, 3); } prevRoomInfo = nextRoom; CalcNextRoomType(prevRoomInfo); @@ -239,22 +266,22 @@ chainTryCount++; } - GD.Print("生成第" + (_count + 1) + "个房间失败! 失败原因: " + errorCode); + Debug.Log("生成第" + (_count + 1) + "个房间失败! 失败原因: " + errorCode); if (errorCode == GenerateRoomErrorCode.OutArea) { _failCount++; - GD.Print("超出区域失败次数: " + _failCount); + Debug.Log("超出区域失败次数: " + _failCount); if (_failCount >= _maxFailCount) { _enableLimitRange = false; - GD.Print("生成房间失败次数过多, 关闭区域限制!"); + Debug.Log("生成房间失败次数过多, 关闭区域限制!"); } } } } _roomGrid.Clear(); - GD.Print("房间总数: " + RoomInfos.Count); + Debug.Log("房间总数: " + RoomInfos.Count); } //生成房间 @@ -269,7 +296,7 @@ DungeonRoomSplit roomSplit; if (_config.HasDesignatedRoom && _config.DesignatedType == roomType) //执行指定了房间 { - roomSplit = Random.RandomChoose(_config.DesignatedRoom); + roomSplit = _random.RandomChoose(_config.DesignatedRoom); } else //没有指定房间 { @@ -310,19 +337,19 @@ } for (; tryCount < maxTryCount; tryCount++) { - var direction = Random.RandomRangeInt(0, 3); + var direction = _random.RandomRangeInt(0, 3); //房间间隔 - var space = Random.RandomRangeInt(_roomMinInterval, _roomMaxInterval); + var space = _random.RandomRangeInt(_roomMinInterval, _roomMaxInterval); //中心偏移 int offset; if (direction == 0 || direction == 2) { - offset = Random.RandomRangeInt(-(int)(prevRoomInfo.Size.X * _roomVerticalMinDispersion), + offset = _random.RandomRangeInt(-(int)(prevRoomInfo.Size.X * _roomVerticalMinDispersion), (int)(prevRoomInfo.Size.X * _roomVerticalMaxDispersion)); } else { - offset = Random.RandomRangeInt(-(int)(prevRoomInfo.Size.Y * _roomHorizontalMinDispersion), + offset = _random.RandomRangeInt(-(int)(prevRoomInfo.Size.Y * _roomHorizontalMinDispersion), (int)(prevRoomInfo.Size.Y * _roomHorizontalMaxDispersion)); } @@ -451,7 +478,7 @@ { if (roomInfo.Next.Count > 0) { - GD.PrintErr("当前房间还有连接的子房间, 不能回滚!"); + Debug.LogError("当前房间还有连接的子房间, 不能回滚!"); return false; } //退掉占用的房间区域和过道占用区域 @@ -521,7 +548,7 @@ } } - return Random.RandomChoose(list); + return _random.RandomChoose(list); } /// @@ -533,6 +560,7 @@ var roomDoor = new RoomDoorInfo(); var nextRoomDoor = new RoomDoorInfo(); roomDoor.RoomInfo = roomInfo; + roomDoor.IsForward = true; nextRoomDoor.RoomInfo = nextRoomInfo; roomDoor.ConnectRoom = nextRoomInfo; roomDoor.ConnectDoor = nextRoomDoor; @@ -540,7 +568,7 @@ nextRoomDoor.ConnectDoor = roomDoor; //先寻找直通门 - if (Random.RandomBoolean()) + if (_random.RandomBoolean()) { //直行通道, 优先横轴 if (TryConnectHorizontalDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor) @@ -580,8 +608,8 @@ while (rangeList.Count > 0) { //找到重叠区域 - var range = Random.RandomChooseAndRemove(rangeList); - var x = Random.RandomRangeInt(range.X, range.Y); + var range = _random.RandomChooseAndRemove(rangeList); + var x = _random.RandomRangeInt(range.X, range.Y); if (roomInfo.GetVerticalStart() < nextRoomInfo.GetVerticalStart()) //room在上, nextRoom在下 { @@ -632,8 +660,8 @@ while (rangeList.Count > 0) { //找到重叠区域 - var range = Random.RandomChooseAndRemove(rangeList); - var y = Random.RandomRangeInt(range.X, range.Y); + var range = _random.RandomChooseAndRemove(rangeList); + var y = _random.RandomRangeInt(range.X, range.Y); if (roomInfo.GetHorizontalStart() < nextRoomInfo.GetHorizontalStart()) //room在左, nextRoom在右 { @@ -679,7 +707,7 @@ { if (roomInfo.GetVerticalStart() > nextRoomInfo.GetVerticalStart()) { - if (Random.RandomBoolean()) //↑ //→ + if (_random.RandomBoolean()) //↑ //→ { if (!TryConnect_NE_Door(roomInfo, nextRoomInfo, roomDoor, nextRoomDoor, ref cross) && !TryConnect_WS_Door(roomInfo, nextRoomInfo, roomDoor, nextRoomDoor, ref cross)) @@ -698,7 +726,7 @@ } else { - if (Random.RandomBoolean()) //↓ //→ + if (_random.RandomBoolean()) //↓ //→ { if (!TryConnect_SE_Door(roomInfo, nextRoomInfo, roomDoor, nextRoomDoor, ref cross) && !TryConnect_WN_Door(roomInfo, nextRoomInfo, roomDoor, nextRoomDoor, ref cross)) @@ -720,7 +748,7 @@ { if (roomInfo.GetVerticalStart() > nextRoomInfo.GetVerticalStart()) //→ //↓ { - if (Random.RandomBoolean()) + if (_random.RandomBoolean()) { if (!TryConnect_ES_Door(roomInfo, nextRoomInfo, roomDoor, nextRoomDoor, ref cross) && !TryConnect_NW_Door(roomInfo, nextRoomInfo, roomDoor, nextRoomDoor, ref cross)) @@ -739,7 +767,7 @@ } else { - if (Random.RandomBoolean()) //→ //↑ + if (_random.RandomBoolean()) //→ //↑ { if (!TryConnect_EN_Door(roomInfo, nextRoomInfo, roomDoor, nextRoomDoor, ref cross) && !TryConnect_SW_Door(roomInfo, nextRoomInfo, roomDoor, nextRoomDoor, ref cross)) diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs index ffdb00d..cd1414f 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs @@ -1,4 +1,5 @@ +using System.Collections; using System.Collections.Generic; using System.Linq; using Godot; @@ -33,23 +34,23 @@ } /// - /// 根据 startRoom 和 config 数据自动填充 tileMap 参数中的地图数据 + /// 根据 startRoom 和 config 数据自动填充 tileMap 参数中的地图数据, 该函数为协程函数 /// - public void AutoFillRoomTile(AutoTileConfig config, RoomInfo startRoomInfo, SeedRandom random) + public IEnumerator AutoFillRoomTile(AutoTileConfig config, RoomInfo startRoomInfo, SeedRandom random) { _connectNavigationItemList.Clear(); - _AutoFillRoomTile(config, startRoomInfo, random); + yield return _AutoFillRoomTile(config, startRoomInfo, random); } - private void _AutoFillRoomTile(AutoTileConfig config, RoomInfo roomInfo, SeedRandom random) + private IEnumerator _AutoFillRoomTile(AutoTileConfig config, RoomInfo roomInfo, SeedRandom random) { foreach (var info in roomInfo.Next) { - _AutoFillRoomTile(config, info, random); + yield return _AutoFillRoomTile(config, info, random); } //铺房间 - if (roomInfo.RoomSplit == null) + if (roomInfo.RoomSplit == null) //自动填充的矩形房间, 现已经弃用 { FillRect(GameConfig.FloorMapLayer, config.Floor, roomInfo.Position + Vector2.One, roomInfo.Size - new Vector2(2, 2)); @@ -79,6 +80,7 @@ //填充tile操作 var tileInfo = roomInfo.RoomSplit.TileInfo; + //底层 for (var i = 0; i < tileInfo.Floor.Count; i += 5) { var posX = tileInfo.Floor[i]; @@ -89,6 +91,7 @@ var pos = new Vector2I(roomInfo.Position.X + posX - rectPos.X, roomInfo.Position.Y + posY - rectPos.Y); _tileRoot.SetCell(GameConfig.FloorMapLayer, pos, sourceId, new Vector2I(atlasCoordsX, atlasCoordsY)); } + //中层 for (var i = 0; i < tileInfo.Middle.Count; i += 5) { var posX = tileInfo.Middle[i]; @@ -99,6 +102,7 @@ var pos = new Vector2I(roomInfo.Position.X + posX - rectPos.X, roomInfo.Position.Y + posY - rectPos.Y); _tileRoot.SetCell(GameConfig.MiddleMapLayer, pos, sourceId, new Vector2I(atlasCoordsX, atlasCoordsY)); } + //顶层 for (var i = 0; i < tileInfo.Top.Count; i += 5) { var posX = tileInfo.Top[i]; @@ -109,6 +113,7 @@ var pos = new Vector2I(roomInfo.Position.X + posX - rectPos.X, roomInfo.Position.Y + posY - rectPos.Y); _tileRoot.SetCell(GameConfig.TopMapLayer, pos, sourceId, new Vector2I(atlasCoordsX, atlasCoordsY)); } + //随机选择预设 RoomPreinstallInfo preinstallInfo; if (EditorPlayManager.IsPlay && roomInfo.RoomType == GameApplication.Instance.DungeonManager.CurrConfig.DesignatedType) //编辑器模式, 指定预设 @@ -134,339 +139,287 @@ roomInfo.RoomPreinstall = roomPreinstall; //执行预处理操作 roomPreinstall.Pretreatment(random); - - //初始化标记 - //roomInfo.RoomSplit.Preinstall. - - //roomInfo.RoomSplit.TileInfo. - // var template = ResourceManager.Load(roomInfo.RoomSplit.ScenePath); - // var tileInstance = template.Instantiate(); - // - // //其它物体 - // var childCount = tileInstance.GetChildCount(); - // for (var i = 0; i < childCount; i++) - // { - // var item = tileInstance.GetChild(i); - // if (!(item is ActivityMark)) - // { - // item.GetParent().RemoveChild(item); - // item.Owner = null; - // _tileRoot.AddChild(item); - // if (item is Node2D node) - // { - // node.Position = roomInfo.GetWorldPosition() + (node.GlobalPosition - offset); - // } - // - // i--; - // childCount--; - // } - // } - // - // //物体标记 - // var activityMarks = tileInstance.GetMarks(); - // foreach (var activityMark in activityMarks) - // { - // var pos = activityMark.Position; - // activityMark.GetParent().RemoveChild(activityMark); - // activityMark.Owner = null; - // //_tileRoot.AddChild(activityMark); - // activityMark.Position = roomInfo.GetWorldPosition() + (pos - offset); - // activityMark.TileRoot = _tileRoot; - // //执行预处理操作 - // activityMark.Pretreatment(random); - // } - // roomInfo.ActivityMarks.AddRange(activityMarks); - // - // //填充tile操作 - // for (int i = 0; i < rectSize.X; i++) - // { - // for (int j = 0; j < rectSize.Y; j++) - // { - // var coords = new Vector2I((int)(rectPos.X + i), (int)(rectPos.Y + j)); - // var atlasCoords = tileInstance.GetCellAtlasCoords(0, coords); - // if (atlasCoords.X != -1 && atlasCoords.Y != -1) - // { - // // 在 Godot 4.0 中使用以下这段代码区分层级, 会导致游戏关闭时有概率报错卡死, 目前尚不清楚原因 - // //获取自定义层级 - // // var customData = tileInstance.GetCellTileData(0, coords).GetCustomData(CustomTileLayerName); - // // var layer = customData.AsInt32(); - // // layer = Mathf.Clamp(layer, GameConfig.FloorMapLayer, GameConfig.TopMapLayer); - // - // var layer = config.GetLayer(atlasCoords); - // _tileRoot.SetCell(layer, new Vector2I(roomInfo.Position.X + i, roomInfo.Position.Y + j), - // 0, atlasCoords); - // } - // } - // } - // - // tileInstance.CallDeferred(Node.MethodName.QueueFree); } //铺过道 foreach (var doorInfo in roomInfo.Doors) { - if (doorInfo.ConnectRoom.Id > roomInfo.Id) + //必须是正向门 + if (!doorInfo.IsForward) { - //普通的直线连接 - var doorDir1 = doorInfo.Direction; - var doorDir2 = doorInfo.ConnectDoor.Direction; - if (!doorInfo.HasCross) + continue; + } + //普通的直线连接 + var doorDir1 = doorInfo.Direction; + var doorDir2 = doorInfo.ConnectDoor.Direction; + if (!doorInfo.HasCross) + { + var rect = doorInfo.GetAisleRect(); + switch (doorDir1) { - var rect = Utils.CalcRect( - doorInfo.OriginPosition.X, - doorInfo.OriginPosition.Y, - doorInfo.ConnectDoor.OriginPosition.X, - doorInfo.ConnectDoor.OriginPosition.Y - ); - - switch (doorDir1) - { - case DoorDirection.E: - rect.Size = new Vector2(rect.Size.X, GameConfig.CorridorWidth); - FullHorizontalAisle(config, rect); - FullHorizontalAisleLeft(config, rect, doorInfo); - FullHorizontalAisleRight(config, rect, doorInfo.ConnectDoor); - break; - case DoorDirection.W: - rect.Size = new Vector2(rect.Size.X, GameConfig.CorridorWidth); - FullHorizontalAisle(config, rect); - FullHorizontalAisleLeft(config, rect, doorInfo.ConnectDoor); - FullHorizontalAisleRight(config, rect, doorInfo); - break; - - case DoorDirection.S: - rect.Size = new Vector2(GameConfig.CorridorWidth, rect.Size.Y); - FullVerticalAisle(config, rect); - FullVerticalAisleUp(config, rect, doorInfo); - FullVerticalAisleDown(config, rect, doorInfo.ConnectDoor); - break; - case DoorDirection.N: - rect.Size = new Vector2(GameConfig.CorridorWidth, rect.Size.Y); - FullVerticalAisle(config, rect); - FullVerticalAisleUp(config, rect, doorInfo.ConnectDoor); - FullVerticalAisleDown(config, rect, doorInfo); - break; - } - } - else //带交叉点 - { - //方向, 0横向, 1纵向 - var dir1 = 0; - var dir2 = 0; - - Rect2 rect; - Rect2 rect2; - - //计算范围 - switch (doorDir1) - { - case DoorDirection.E: //→ - rect = new Rect2( - doorInfo.OriginPosition.X, - doorInfo.OriginPosition.Y, - doorInfo.Cross.X - doorInfo.OriginPosition.X, - GameConfig.CorridorWidth - ); - break; - case DoorDirection.W: //← - rect = new Rect2( - doorInfo.Cross.X + GameConfig.CorridorWidth, - doorInfo.Cross.Y, - doorInfo.OriginPosition.X - (doorInfo.Cross.X + GameConfig.CorridorWidth), - GameConfig.CorridorWidth - ); - break; - case DoorDirection.S: //↓ - dir1 = 1; - rect = new Rect2( - doorInfo.OriginPosition.X, - doorInfo.OriginPosition.Y, - GameConfig.CorridorWidth, - doorInfo.Cross.Y - doorInfo.OriginPosition.Y - ); - break; - case DoorDirection.N: //↑ - dir1 = 1; - rect = new Rect2( - doorInfo.Cross.X, - doorInfo.Cross.Y + GameConfig.CorridorWidth, - GameConfig.CorridorWidth, - doorInfo.OriginPosition.Y - (doorInfo.Cross.Y + GameConfig.CorridorWidth) - ); - break; - default: - rect = new Rect2(); - break; - } - - switch (doorDir2) - { - case DoorDirection.E: //→ - rect2 = new Rect2( - doorInfo.ConnectDoor.OriginPosition.X, - doorInfo.ConnectDoor.OriginPosition.Y, - doorInfo.Cross.X - doorInfo.ConnectDoor.OriginPosition.X, - GameConfig.CorridorWidth - ); - break; - case DoorDirection.W: //← - rect2 = new Rect2( - doorInfo.Cross.X + GameConfig.CorridorWidth, - doorInfo.Cross.Y, - doorInfo.ConnectDoor.OriginPosition.X - - (doorInfo.Cross.X + GameConfig.CorridorWidth), - GameConfig.CorridorWidth - ); - break; - case DoorDirection.S: //↓ - dir2 = 1; - rect2 = new Rect2( - doorInfo.ConnectDoor.OriginPosition.X, - doorInfo.ConnectDoor.OriginPosition.Y, - GameConfig.CorridorWidth, - doorInfo.Cross.Y - doorInfo.ConnectDoor.OriginPosition.Y - ); - break; - case DoorDirection.N: //↑ - dir2 = 1; - rect2 = new Rect2( - doorInfo.Cross.X, - doorInfo.Cross.Y + GameConfig.CorridorWidth, - GameConfig.CorridorWidth, - doorInfo.ConnectDoor.OriginPosition.Y - - (doorInfo.Cross.Y + GameConfig.CorridorWidth) - ); - break; - default: - rect2 = new Rect2(); - break; - } - - FillRect(GameConfig.AisleFloorMapLayer, config.Floor, doorInfo.Cross + Vector2.One, - new Vector2(GameConfig.CorridorWidth - 2, GameConfig.CorridorWidth - 2)); - - //墙壁, 0横向, 1纵向 - if (dir1 == 0) - { + case DoorDirection.E: FullHorizontalAisle(config, rect); - FullHorizontalAisleLeft(config, rect, doorDir1 == DoorDirection.E ? doorInfo : null); - FullHorizontalAisleRight(config, rect, doorDir1 == DoorDirection.W ? doorInfo : null); - } - else - { + FullHorizontalAisleLeft(config, rect, doorInfo); + FullHorizontalAisleRight(config, rect, doorInfo.ConnectDoor); + break; + case DoorDirection.W: + FullHorizontalAisle(config, rect); + FullHorizontalAisleLeft(config, rect, doorInfo.ConnectDoor); + FullHorizontalAisleRight(config, rect, doorInfo); + break; + + case DoorDirection.S: FullVerticalAisle(config, rect); - FullVerticalAisleUp(config, rect, doorDir1 == DoorDirection.S ? doorInfo : null); - FullVerticalAisleDown(config, rect, doorDir1 == DoorDirection.N ? doorInfo : null); - } - - if (dir2 == 0) - { - FullHorizontalAisle(config, rect2); - FullHorizontalAisleLeft(config, rect2, doorDir2 == DoorDirection.E ? doorInfo.ConnectDoor : null); - FullHorizontalAisleRight(config, rect2, doorDir2 == DoorDirection.W ? doorInfo.ConnectDoor : null); - } - else - { - FullVerticalAisle(config, rect2); - FullVerticalAisleUp(config, rect2, doorDir2 == DoorDirection.S ? doorInfo.ConnectDoor : null); - FullVerticalAisleDown(config, rect2, doorDir2 == DoorDirection.N ? doorInfo.ConnectDoor : null); - } - - if ((doorDir1 == DoorDirection.N && doorDir2 == DoorDirection.E) || //↑→ - (doorDir2 == DoorDirection.N && doorDir1 == DoorDirection.E)) - { - FillRect(GameConfig.TopMapLayer, config.OUT_RT, - doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), - Vector2.One); - FillRect(GameConfig.TopMapLayer, config.IN_RT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), - Vector2.One); - FillRect(GameConfig.MiddleMapLayer, config.T, doorInfo.Cross, new Vector2(GameConfig.CorridorWidth - 1, 1)); - FillRect(GameConfig.TopMapLayer, config.R, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 1), - new Vector2(1, GameConfig.CorridorWidth - 1)); - } - else if ((doorDir1 == DoorDirection.E && doorDir2 == DoorDirection.S) || //→↓ - (doorDir2 == DoorDirection.E && doorDir1 == DoorDirection.S)) - { - FillRect(GameConfig.MiddleMapLayer, config.OUT_RB, doorInfo.Cross, Vector2.One); - FillRect(GameConfig.TopMapLayer, config.IN_RB, - doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, - GameConfig.CorridorWidth - 1), - Vector2.One); - FillRect(GameConfig.TopMapLayer, config.R, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), - new Vector2(1, GameConfig.CorridorWidth - 1)); - FillRect(GameConfig.TopMapLayer, config.B, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), - new Vector2(GameConfig.CorridorWidth - 1, 1)); - } - else if ((doorDir1 == DoorDirection.S && doorDir2 == DoorDirection.W) || //↓← - (doorDir2 == DoorDirection.S && doorDir1 == DoorDirection.W)) - { - FillRect(GameConfig.MiddleMapLayer, config.OUT_LB, - doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.IN_LB, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), - Vector2.One); - FillRect(GameConfig.TopMapLayer, config.L, doorInfo.Cross, new Vector2(1, GameConfig.CorridorWidth - 1)); - FillRect(GameConfig.TopMapLayer, config.B, doorInfo.Cross + new Vector2(1, GameConfig.CorridorWidth - 1), - new Vector2(GameConfig.CorridorWidth - 1, 1)); - } - else if ((doorDir1 == DoorDirection.W && doorDir2 == DoorDirection.N) || //←↑ - (doorDir2 == DoorDirection.W && doorDir1 == DoorDirection.N)) - { - FillRect(GameConfig.TopMapLayer, config.OUT_LT, - doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, - GameConfig.CorridorWidth - 1), - Vector2.One); - FillRect(GameConfig.TopMapLayer, config.IN_LT, doorInfo.Cross, Vector2.One); - FillRect(GameConfig.MiddleMapLayer, config.T, doorInfo.Cross + new Vector2(1, 0), - new Vector2(GameConfig.CorridorWidth - 1, 1)); - FillRect(GameConfig.TopMapLayer, config.L, doorInfo.Cross + new Vector2(0, 1), - new Vector2(1, GameConfig.CorridorWidth - 1)); - } - - //在房间墙上开洞 - switch (doorDir1) - { - case DoorDirection.E: //→ - ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(-1, 1), - new Vector2(1, rect.Size.Y - 2)); - break; - case DoorDirection.W: //← - ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(0, 1), - new Vector2(1, rect.Size.Y - 2)); - break; - case DoorDirection.S: //↓ - ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(1, -1), - new Vector2(rect.Size.X - 2, 1)); - break; - case DoorDirection.N: //↑ - ClearRect(GameConfig.MiddleMapLayer, doorInfo.OriginPosition + new Vector2(1, 2), - new Vector2(rect.Size.X - 2, 1)); - break; - } - - switch (doorDir2) - { - case DoorDirection.E: //→ - ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(-1, 1), - new Vector2(1, rect2.Size.Y - 2)); - break; - case DoorDirection.W: //← - ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(0, 1), - new Vector2(1, rect2.Size.Y - 2)); - break; - case DoorDirection.S: //↓ - ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, -1), - new Vector2(rect2.Size.X - 2, 1)); - break; - case DoorDirection.N: //↑ - ClearRect(GameConfig.MiddleMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, 0), - new Vector2(rect2.Size.X - 2, 1)); - break; - } + FullVerticalAisleUp(config, rect, doorInfo); + FullVerticalAisleDown(config, rect, doorInfo.ConnectDoor); + break; + case DoorDirection.N: + FullVerticalAisle(config, rect); + FullVerticalAisleUp(config, rect, doorInfo.ConnectDoor); + FullVerticalAisleDown(config, rect, doorInfo); + break; + } + } + else //带交叉点 + { + //方向, 0横向, 1纵向 + var dir1 = 0; + var dir2 = 0; + + var aisleRect = doorInfo.GetCrossAisleRect(); + var rect = aisleRect.Rect1; + var rect2 = aisleRect.Rect2; + + //计算范围 + switch (doorDir1) + { + case DoorDirection.E: //→ + break; + case DoorDirection.W: //← + break; + case DoorDirection.S: //↓ + dir1 = 1; + break; + case DoorDirection.N: //↑ + dir1 = 1; + break; + } + + switch (doorDir2) + { + case DoorDirection.E: //→ + break; + case DoorDirection.W: //← + break; + case DoorDirection.S: //↓ + dir2 = 1; + break; + case DoorDirection.N: //↑ + dir2 = 1; + break; + } + + //填充交叉点 + FillRect(GameConfig.AisleFloorMapLayer, config.Floor, aisleRect.Cross.Position, aisleRect.Cross.Size); + + //墙壁, 0横向, 1纵向 + if (dir1 == 0) + { + FullHorizontalAisle(config, rect); + FullHorizontalAisleLeft(config, rect, doorDir1 == DoorDirection.E ? doorInfo : null); + FullHorizontalAisleRight(config, rect, doorDir1 == DoorDirection.W ? doorInfo : null); + } + else + { + FullVerticalAisle(config, rect); + FullVerticalAisleUp(config, rect, doorDir1 == DoorDirection.S ? doorInfo : null); + FullVerticalAisleDown(config, rect, doorDir1 == DoorDirection.N ? doorInfo : null); + } + + if (dir2 == 0) + { + FullHorizontalAisle(config, rect2); + FullHorizontalAisleLeft(config, rect2, doorDir2 == DoorDirection.E ? doorInfo.ConnectDoor : null); + FullHorizontalAisleRight(config, rect2, doorDir2 == DoorDirection.W ? doorInfo.ConnectDoor : null); + } + else + { + FullVerticalAisle(config, rect2); + FullVerticalAisleUp(config, rect2, doorDir2 == DoorDirection.S ? doorInfo.ConnectDoor : null); + FullVerticalAisleDown(config, rect2, doorDir2 == DoorDirection.N ? doorInfo.ConnectDoor : null); + } + + if ((doorDir1 == DoorDirection.N && doorDir2 == DoorDirection.E) || //↑→ + (doorDir2 == DoorDirection.N && doorDir1 == DoorDirection.E)) + { + FillRect(GameConfig.TopMapLayer, config.OUT_RT, + doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), + Vector2.One); + FillRect(GameConfig.TopMapLayer, config.IN_RT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), + Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.T, doorInfo.Cross, new Vector2(GameConfig.CorridorWidth - 1, 1)); + FillRect(GameConfig.TopMapLayer, config.R, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 1), + new Vector2(1, GameConfig.CorridorWidth - 1)); + } + else if ((doorDir1 == DoorDirection.E && doorDir2 == DoorDirection.S) || //→↓ + (doorDir2 == DoorDirection.E && doorDir1 == DoorDirection.S)) + { + FillRect(GameConfig.MiddleMapLayer, config.OUT_RB, doorInfo.Cross, Vector2.One); + FillRect(GameConfig.TopMapLayer, config.IN_RB, + doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, + GameConfig.CorridorWidth - 1), + Vector2.One); + FillRect(GameConfig.TopMapLayer, config.R, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), + new Vector2(1, GameConfig.CorridorWidth - 1)); + FillRect(GameConfig.TopMapLayer, config.B, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), + new Vector2(GameConfig.CorridorWidth - 1, 1)); + } + else if ((doorDir1 == DoorDirection.S && doorDir2 == DoorDirection.W) || //↓← + (doorDir2 == DoorDirection.S && doorDir1 == DoorDirection.W)) + { + FillRect(GameConfig.MiddleMapLayer, config.OUT_LB, + doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), Vector2.One); + FillRect(GameConfig.TopMapLayer, config.IN_LB, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), + Vector2.One); + FillRect(GameConfig.TopMapLayer, config.L, doorInfo.Cross, new Vector2(1, GameConfig.CorridorWidth - 1)); + FillRect(GameConfig.TopMapLayer, config.B, doorInfo.Cross + new Vector2(1, GameConfig.CorridorWidth - 1), + new Vector2(GameConfig.CorridorWidth - 1, 1)); + } + else if ((doorDir1 == DoorDirection.W && doorDir2 == DoorDirection.N) || //←↑ + (doorDir2 == DoorDirection.W && doorDir1 == DoorDirection.N)) + { + FillRect(GameConfig.TopMapLayer, config.OUT_LT, + doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, + GameConfig.CorridorWidth - 1), + Vector2.One); + FillRect(GameConfig.TopMapLayer, config.IN_LT, doorInfo.Cross, Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.T, doorInfo.Cross + new Vector2(1, 0), + new Vector2(GameConfig.CorridorWidth - 1, 1)); + FillRect(GameConfig.TopMapLayer, config.L, doorInfo.Cross + new Vector2(0, 1), + new Vector2(1, GameConfig.CorridorWidth - 1)); + } + + //在房间墙上开洞 + switch (doorDir1) + { + case DoorDirection.E: //→ + ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(-1, 1), + new Vector2(1, rect.Size.Y - 2)); + break; + case DoorDirection.W: //← + ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(0, 1), + new Vector2(1, rect.Size.Y - 2)); + break; + case DoorDirection.S: //↓ + ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(1, -1), + new Vector2(rect.Size.X - 2, 1)); + break; + case DoorDirection.N: //↑ + ClearRect(GameConfig.MiddleMapLayer, doorInfo.OriginPosition + new Vector2(1, 2), + new Vector2(rect.Size.X - 2, 1)); + break; + } + + switch (doorDir2) + { + case DoorDirection.E: //→ + ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(-1, 1), + new Vector2(1, rect2.Size.Y - 2)); + break; + case DoorDirection.W: //← + ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(0, 1), + new Vector2(1, rect2.Size.Y - 2)); + break; + case DoorDirection.S: //↓ + ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, -1), + new Vector2(rect2.Size.X - 2, 1)); + break; + case DoorDirection.N: //↑ + ClearRect(GameConfig.MiddleMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, 0), + new Vector2(rect2.Size.X - 2, 1)); + break; } } } } + /// + /// 给TileMap添加轮廓, 该函数为协程函数 + /// + /// 描轮廓的Tile + public IEnumerator AddOutlineTile(TileCellInfo tileCellInfo) + { + var c = 0; + var rect = _tileRoot.GetUsedRect(); + var endX = rect.End.X + 1; + var endY = rect.End.Y + 1; + for (int x = rect.Position.X - 1; x <= endX; x++) + { + for (int y = rect.Position.Y - 1; y <= endY; y++) + { + if (c++ > 1000) //份帧处理, 不要挤在一帧 + { + c = 0; + yield return 0; + } + var pos = new Vector2I(x, y); + var flag1 = _tileRoot.GetCellSourceId(GameConfig.FloorMapLayer, pos) != -1 || + _tileRoot.GetCellSourceId(GameConfig.MiddleMapLayer, pos) != -1 || + _tileRoot.GetCellSourceId(GameConfig.AisleFloorMapLayer, pos) != -1 || + (_tileRoot.GetCellSourceId(GameConfig.TopMapLayer, pos) != -1 && _tileRoot.GetCellAtlasCoords(GameConfig.TopMapLayer, pos) != tileCellInfo.AutoTileCoord); + if (!flag1) //空地 + { + var posDown = new Vector2I(pos.X, pos.Y + 1); + var posTop = new Vector2I(pos.X, pos.Y - 1); + var posLeft = new Vector2I(pos.X - 1, pos.Y); + var posRight = new Vector2I(pos.X + 1, pos.Y); + + var posLD = new Vector2I(pos.X - 1, pos.Y + 1); + var posLT = new Vector2I(pos.X - 1, pos.Y - 1); + var posRD = new Vector2I(pos.X + 1, pos.Y + 1); + var posRT = new Vector2I(pos.X + 1, pos.Y - 1); + + var flag2 = _tileRoot.GetCellSourceId(GameConfig.FloorMapLayer, posDown) != -1 || + _tileRoot.GetCellSourceId(GameConfig.MiddleMapLayer, posDown) != -1 || + (_tileRoot.GetCellSourceId(GameConfig.TopMapLayer, posDown) != -1 && _tileRoot.GetCellAtlasCoords(GameConfig.TopMapLayer, posDown) != tileCellInfo.AutoTileCoord) || + + _tileRoot.GetCellSourceId(GameConfig.FloorMapLayer, posTop) != -1 || + _tileRoot.GetCellSourceId(GameConfig.MiddleMapLayer, posTop) != -1 || + (_tileRoot.GetCellSourceId(GameConfig.TopMapLayer, posTop) != -1 && _tileRoot.GetCellAtlasCoords(GameConfig.TopMapLayer, posTop) != tileCellInfo.AutoTileCoord) || + + _tileRoot.GetCellSourceId(GameConfig.FloorMapLayer, posLeft) != -1 || + _tileRoot.GetCellSourceId(GameConfig.MiddleMapLayer, posLeft) != -1 || + (_tileRoot.GetCellSourceId(GameConfig.TopMapLayer, posLeft) != -1 && _tileRoot.GetCellAtlasCoords(GameConfig.TopMapLayer, posLeft) != tileCellInfo.AutoTileCoord) || + + _tileRoot.GetCellSourceId(GameConfig.FloorMapLayer, posRight) != -1 || + _tileRoot.GetCellSourceId(GameConfig.MiddleMapLayer, posRight) != -1 || + (_tileRoot.GetCellSourceId(GameConfig.TopMapLayer, posRight) != -1 && _tileRoot.GetCellAtlasCoords(GameConfig.TopMapLayer, posRight) != tileCellInfo.AutoTileCoord) || + // + _tileRoot.GetCellSourceId(GameConfig.FloorMapLayer, posLD) != -1 || + _tileRoot.GetCellSourceId(GameConfig.MiddleMapLayer, posLD) != -1 || + (_tileRoot.GetCellSourceId(GameConfig.TopMapLayer, posLD) != -1 && _tileRoot.GetCellAtlasCoords(GameConfig.TopMapLayer, posLD) != tileCellInfo.AutoTileCoord) || + + _tileRoot.GetCellSourceId(GameConfig.FloorMapLayer, posLT) != -1 || + _tileRoot.GetCellSourceId(GameConfig.MiddleMapLayer, posLT) != -1 || + (_tileRoot.GetCellSourceId(GameConfig.TopMapLayer, posLT) != -1 && _tileRoot.GetCellAtlasCoords(GameConfig.TopMapLayer, posLT) != tileCellInfo.AutoTileCoord) || + + _tileRoot.GetCellSourceId(GameConfig.FloorMapLayer, posRD) != -1 || + _tileRoot.GetCellSourceId(GameConfig.MiddleMapLayer, posRD) != -1 || + (_tileRoot.GetCellSourceId(GameConfig.TopMapLayer, posRD) != -1 && _tileRoot.GetCellAtlasCoords(GameConfig.TopMapLayer, posRD) != tileCellInfo.AutoTileCoord) || + + _tileRoot.GetCellSourceId(GameConfig.FloorMapLayer, posRT) != -1 || + _tileRoot.GetCellSourceId(GameConfig.MiddleMapLayer, posRT) != -1 || + (_tileRoot.GetCellSourceId(GameConfig.TopMapLayer, posRT) != -1 && _tileRoot.GetCellAtlasCoords(GameConfig.TopMapLayer, posRT) != tileCellInfo.AutoTileCoord); + + if (flag2) //非空地, 那么说明这个点需要填充 WALL_BLOCK + { + _tileRoot.SetCell(GameConfig.TopMapLayer, pos, tileCellInfo.Id, tileCellInfo.AutoTileCoord); + } + } + } + } + } + //填充tile区域 private void FillRect(int layer, TileCellInfo info, Vector2 pos, Vector2 size) { @@ -671,7 +624,7 @@ try { - var size = new Vector2(_tileRoot.CellQuadrantSize, _tileRoot.CellQuadrantSize); + var size = new Vector2(GameConfig.TileCellSize, GameConfig.TileCellSize); var rect = _tileRoot.GetUsedRect(); @@ -714,7 +667,7 @@ { _usePoints.Clear(); _polygonDataList.Clear(); - GD.Print(e.Message); + Debug.Log(e.Message); _generateNavigationResult = new GenerateNavigationResult(false, e); } } @@ -824,7 +777,7 @@ { if (_floorAtlasCoords == null || _floorAtlasCoords.Count == 0) { - return _tileRoot.GetCellTileData(layer, new Vector2I(x, y)) != null; + return _tileRoot.GetCellSourceId(layer, new Vector2I(x, y)) != -1; } var result = _tileRoot.GetCellAtlasCoords(layer, new Vector2I(x, y)); diff --git a/DungeonShooting_Godot/src/framework/map/TileCellInfo.cs b/DungeonShooting_Godot/src/framework/map/TileCellInfo.cs index b892d38..bd120a6 100644 --- a/DungeonShooting_Godot/src/framework/map/TileCellInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/TileCellInfo.cs @@ -13,7 +13,7 @@ } /// - /// 在TileSet中的图块id + /// 在TileSet中的图块id, 也就是sourceId /// public int Id; diff --git a/DungeonShooting_Godot/src/framework/map/fog/AisleFogArea.cs b/DungeonShooting_Godot/src/framework/map/fog/AisleFogArea.cs new file mode 100644 index 0000000..3712c8b --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/fog/AisleFogArea.cs @@ -0,0 +1,94 @@ + +using Godot; + +/// +/// 过道迷雾区域碰撞器, 用于检测玩家是否进入过道 +/// +public partial class AisleFogArea : Area2D, IDestroy +{ + public bool IsDestroyed { get; private set; } + + /// + /// 所属连接的门 (起始门) + /// + public RoomDoorInfo RoomDoorInfo { get; private set; } + + private bool _init = false; + private RectangleShape2D _shape; + + /// + /// 根据矩形区域初始化归属区域 + /// + public void Init(RoomDoorInfo doorInfo, Rect2I rect2) + { + if (_init) + { + return; + } + + _init = true; + + RoomDoorInfo = doorInfo; + var collisionShape = new CollisionShape2D(); + collisionShape.GlobalPosition = rect2.Position + rect2.Size / 2; + var shape = new RectangleShape2D(); + _shape = shape; + shape.Size = rect2.Size; + collisionShape.Shape = shape; + AddChild(collisionShape); + _Init(); + } + + private void _Init() + { + Monitoring = true; + Monitorable = false; + CollisionLayer = PhysicsLayer.None; + CollisionMask = PhysicsLayer.Player; + + BodyEntered += OnBodyEntered; + //BodyExited += OnBodyExited; + } + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + IsDestroyed = true; + QueueFree(); + } + + private void OnBodyEntered(Node2D body) + { + if (body == Player.Current) + { + //注意需要延时调用 + CallDeferred(nameof(InsertItem)); + } + } + + // private void OnBodyExited(Node2D body) + // { + // if (body == Player.Current) + // { + // //注意需要延时调用 + // CallDeferred(nameof(LeavePlayer)); + // } + // } + + private void InsertItem() + { + //Debug.Log("玩家进入过道"); + //RoomDoorInfo.ClearFog(); + FogMaskHandler.RefreshAisleFog(RoomDoorInfo); + } + + // private void LeavePlayer() + // { + // //Debug.Log("玩家离开过道"); + // //RoomDoorInfo.DarkFog(); + // } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/fog/FogMask.cs b/DungeonShooting_Godot/src/framework/map/fog/FogMask.cs new file mode 100644 index 0000000..e2061fb --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/fog/FogMask.cs @@ -0,0 +1,247 @@ + +using System; +using System.Collections; +using Godot; + +/// +/// 迷雾遮罩 +/// +public partial class FogMask : FogMaskBase +{ + /// + /// 迷雾宽度 + /// + public int FogWidth { get; private set; } + /// + /// 迷雾高度 + /// + public int FogHeight { get; private set; } + + private bool _init = false; + + private static Image _leftTransition; + private static Image _rightTransition; + private static Image _topTransition; + private static Image _downTransition; + + private static Image _leftTopTransition; + private static Image _rightTopTransition; + private static Image _leftDownTransition; + private static Image _rightDownTransition; + + private static Image _inLeftTopTransition; + private static Image _inRightTopTransition; + private static Image _inLeftDownTransition; + private static Image _inRightDownTransition; + + private static bool _initSprite = false; + + private static void InitSprite() + { + if (_initSprite) + { + return; + } + _initSprite = false; + + var temp = ResourceManager.Load(ResourcePath.resource_sprite_map_WallTransition1_png, false); + _leftTransition = temp.GetImage(); + _rightTransition = temp.GetImage(); + _rightTransition.Rotate180(); + _topTransition = temp.GetImage(); + _topTransition.Rotate90(ClockDirection.Clockwise); + _downTransition = temp.GetImage(); + _downTransition.Rotate90(ClockDirection.Counterclockwise); + + var temp2 = ResourceManager.Load(ResourcePath.resource_sprite_map_WallTransition2_png, false); + _leftDownTransition = temp2.GetImage(); + _leftTopTransition = temp2.GetImage(); + _leftTopTransition.Rotate90(ClockDirection.Clockwise); + _rightDownTransition = temp2.GetImage(); + _rightDownTransition.Rotate90(ClockDirection.Counterclockwise); + _rightTopTransition = temp2.GetImage(); + _rightTopTransition.Rotate180(); + + var temp3 = ResourceManager.Load(ResourcePath.resource_sprite_map_WallTransition3_png, false); + _inLeftDownTransition = temp3.GetImage(); + _inLeftTopTransition = temp3.GetImage(); + _inLeftTopTransition.Rotate90(ClockDirection.Clockwise); + _inRightDownTransition = temp3.GetImage(); + _inRightDownTransition.Rotate90(ClockDirection.Counterclockwise); + _inRightTopTransition = temp3.GetImage(); + _inRightTopTransition.Rotate180(); + } + + /// + /// 初始化迷雾遮罩 + /// + /// 起始位置, 单位: 格 + /// 大小, 单位: 格 + /// 透明度 + public void InitFog(Vector2I position, Vector2I size, float alpha = 0) + { + if (_init) + { + return; + } + InitSprite(); + GlobalPosition = new Vector2( + (position.X + size.X / 2f) * GameConfig.TileCellSize, + (position.Y + size.Y / 2f) * GameConfig.TileCellSize + ); + + //创建光纹理 + FogWidth = (size.X + 2) * GameConfig.TileCellSize; + FogHeight = (size.Y + 2) * GameConfig.TileCellSize; + var img = Image.Create(FogWidth, FogHeight, false, Image.Format.Rgba8); + img.Fill(Colors.White); + + //处理边缘过渡 + HandlerTransition(position, size, img); + Texture = ImageTexture.CreateFromImage(img); + + var c = Color; + c.A = alpha; + Color = c; + TargetAlpha = alpha; + } + + private void HandlerTransition(Vector2I position, Vector2I size, Image image) + { + var tileMap = GameApplication.Instance.World.TileRoot; + var autoConfig = GameApplication.Instance.DungeonManager.AutoTileConfig; + var wallCoord = autoConfig.WALL_BLOCK.AutoTileCoord; + var (x, y) = position; + var (width, height) = size; + x -= 1; + y -= 1; + width += 2; + height += 2; + for (int i = 0; i < width; i++) + { + for (int j = 0; j < height; j++) + { + var pos = new Vector2I(i + x, j + y); + //说明是外层墙壁 + if (tileMap.GetCellAtlasCoords(GameConfig.TopMapLayer, pos) == wallCoord) + { + var left = IsEmptyCell(tileMap, new Vector2I(pos.X - 1, pos.Y)); + var right = IsEmptyCell(tileMap, new Vector2I(pos.X + 1, pos.Y)); + var top = IsEmptyCell(tileMap, new Vector2I(pos.X, pos.Y - 1)); + var down = IsEmptyCell(tileMap, new Vector2I(pos.X, pos.Y + 1)); + + var leftTop = IsEmptyCell(tileMap, new Vector2I(pos.X - 1, pos.Y - 1)); + var leftDown = IsEmptyCell(tileMap, new Vector2I(pos.X - 1, pos.Y + 1)); + var rightTop = IsEmptyCell(tileMap, new Vector2I(pos.X + 1, pos.Y - 1)); + var rightDown = IsEmptyCell(tileMap, new Vector2I(pos.X + 1, pos.Y + 1)); + + if (!left && !right && !top && !down && !leftTop && !leftDown && !rightTop && !rightDown) + { + continue; + } + else if (leftTop && left && top) //外轮廓, 左上 + { + FillTransitionImage(i, j, image, _leftTopTransition); + } + else if (leftDown && left && down) //外轮廓, 左下 + { + FillTransitionImage(i, j, image, _leftDownTransition); + } + else if (rightTop && right && top) //外轮廓, 右上 + { + FillTransitionImage(i, j, image, _rightTopTransition); + } + else if (rightDown && right && down) //外轮廓, 右下 + { + FillTransitionImage(i, j, image, _rightDownTransition); + } + //------------------------- + else if (left) //左 + { + FillTransitionImage(i, j, image, _leftTransition); + } + else if (right) //右 + { + FillTransitionImage(i, j, image, _rightTransition); + } + else if (top) //上 + { + FillTransitionImage(i, j, image, _topTransition); + } + else if (down) //下 + { + FillTransitionImage(i, j, image, _downTransition); + } + //-------------------------- + else if (leftTop) //内轮廓, 左上 + { + FillTransitionImage(i, j, image, _inLeftTopTransition); + } + else if (leftDown) //内轮廓, 左下 + { + FillTransitionImage(i, j, image, _inLeftDownTransition); + } + else if (rightTop) //内轮廓, 右上 + { + FillTransitionImage(i, j, image, _inRightTopTransition); + } + else if (rightDown) //内轮廓, 右下 + { + FillTransitionImage(i, j, image, _inRightDownTransition); + } + //------------------------ + else //全黑 + { + FillBlock(i, j, image); + } + } + } + } + } + + //填充一个16*16像素的区域 + private void FillBlock(int x, int y, Image image) + { + var endX = (x + 1) * GameConfig.TileCellSize; + var endY = (y + 1) * GameConfig.TileCellSize; + for (int i = x * GameConfig.TileCellSize; i < endX; i++) + { + for (int j = y * GameConfig.TileCellSize; j < endY; j++) + { + image.SetPixel(i, j, new Color(1, 1, 1, 0)); + } + } + } + + private void FillTransitionImage(int x, int y, Image image, Image transitionImage) + { + image.BlitRect(transitionImage, + new Rect2I(Vector2I.Zero, 16, 16), + new Vector2I(x * GameConfig.TileCellSize, y * GameConfig.TileCellSize) + ); + } + + private bool IsEmptyCell(TileMap tileMap, Vector2I pos) + { + return tileMap.GetCellSourceId(GameConfig.TopMapLayer, pos) == -1 && + tileMap.GetCellSourceId(GameConfig.MiddleMapLayer, pos) == -1; + } + + //判断是否是墙壁 + private bool IsNotWallCell(TileMap tileMap, Vector2I pos, Vector2I wallCoord) + { + return tileMap.GetCellAtlasCoords(GameConfig.TopMapLayer, pos) != wallCoord && + tileMap.GetCellAtlasCoords(GameConfig.MiddleMapLayer, pos) != wallCoord && + (tileMap.GetCellSourceId(GameConfig.TopMapLayer, pos) != -1 || + tileMap.GetCellSourceId(GameConfig.MiddleMapLayer, pos) != -1); + } + + //判断是否是任意类型的图块 + private bool IsAnyCell(TileMap tileMap, Vector2I pos) + { + return tileMap.GetCellSourceId(GameConfig.FloorMapLayer, pos) != -1 || + tileMap.GetCellSourceId(GameConfig.MiddleMapLayer, pos) != -1 || + tileMap.GetCellSourceId(GameConfig.TopMapLayer, pos) != -1 || + tileMap.GetCellSourceId(GameConfig.AisleFloorMapLayer, pos) != -1; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/fog/FogMaskBase.cs b/DungeonShooting_Godot/src/framework/map/fog/FogMaskBase.cs new file mode 100644 index 0000000..abfe0f0 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/fog/FogMaskBase.cs @@ -0,0 +1,110 @@ + +using System; +using System.Collections; +using Godot; + +public partial class FogMaskBase : PointLight2D, IDestroy +{ + public bool IsDestroyed { get; private set; } + + /// + /// 是否探索过迷雾 + /// + public bool IsExplored { get; set; } + + /// + /// 迷雾透明度值, 这个值在调用 TransitionAlpha() 时改变, 用于透明度判断 + /// + public float TargetAlpha { get; set; } + + private long _cid = -1; + + /// + /// 使颜色的 alpha 通道过渡到指定的值 + /// + /// 透明度值 + public void TransitionAlpha(float targetAlpha) + { + TargetAlpha = targetAlpha; + if (_cid >= 0) + { + World.Current.StopCoroutine(_cid); + } + + _cid = World.Current.StartCoroutine(RunTransitionAlpha(targetAlpha, GameConfig.FogTransitionTime, false)); + } + + /// + /// 使颜色的 alpha 通道过渡到指定的值 + /// + /// 初始透明度 + /// 透明度值 + public void TransitionAlpha(float tartAlpha, float targetAlpha) + { + Color = new Color(1, 1, 1, tartAlpha); + TransitionAlpha(targetAlpha); + } + + /// + /// 使颜色的 alpha 通道过渡到 GameConfig.DarkFogAlpha + /// + public void TransitionToDark() + { + TransitionAlpha(GameConfig.DarkFogAlpha); + } + + /// + /// 使颜色的 alpha 通道过渡到 1 + /// + public void TransitionToLight() + { + TransitionAlpha(1); + } + + /// + /// 使颜色的 alpha 通道过渡到 0, 然后隐藏该 Fog + /// + /// 过渡时间 + public void TransitionToHide(float time = GameConfig.FogTransitionTime) + { + TargetAlpha = 0; + if (Visible) + { + if (_cid >= 0) + { + World.Current.StopCoroutine(_cid); + } + + _cid = World.Current.StartCoroutine(RunTransitionAlpha(TargetAlpha, time, true)); + } + } + + private IEnumerator RunTransitionAlpha(float targetAlpha, float time, bool hide) + { + var originColor = Color; + var a = originColor.A; + var delta = Mathf.Abs(a - targetAlpha) / time; + while (Math.Abs(a - targetAlpha) > 0.001f) + { + a = Mathf.MoveToward(a, targetAlpha, delta * (float)World.Current.GetProcessDeltaTime()); + Color = new Color(1, 1, 1, a); + yield return null; + } + _cid = -1; + if (hide) + { + this.SetActive(false); + } + } + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + IsDestroyed = true; + QueueFree(); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/fog/FogMaskHandler.cs b/DungeonShooting_Godot/src/framework/map/fog/FogMaskHandler.cs new file mode 100644 index 0000000..cfa21e4 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/fog/FogMaskHandler.cs @@ -0,0 +1,232 @@ + +using System; +using Godot; + +public static class FogMaskHandler +{ + private static RoomInfo _prevRoomInfo; + private static RoomInfo _tempRoomInfo; + private static RoomDoorInfo _tempDoorInfo; + + public static void RefreshRoomFog(RoomInfo roomInfo) + { + _tempRoomInfo = roomInfo; + } + + public static void RefreshAisleFog(RoomDoorInfo doorInfo) + { + if (_prevRoomInfo != null) + { + if (doorInfo.RoomInfo == _prevRoomInfo) + { + _tempDoorInfo = doorInfo; + } + else if (doorInfo.ConnectDoor.RoomInfo == _prevRoomInfo) + { + _tempDoorInfo = doorInfo.ConnectDoor; + } + return; + } + _tempDoorInfo = doorInfo; + } + + public static void Update() + { + if (_tempRoomInfo != null) + { + //刷新房间会附带刷新过道 + _RefreshRoomFog(_tempRoomInfo); + } + else if (_tempDoorInfo != null) + { + //刷新过道 + _RefreshAisleFog(_tempDoorInfo); + } + + _tempRoomInfo = null; + _tempDoorInfo = null; + } + + private static void _RefreshRoomFog(RoomInfo roomInfo) + { + if (_prevRoomInfo != roomInfo) + { + Debug.Log($"切换房间: {_prevRoomInfo?.Id} => {roomInfo.Id}"); + if (_prevRoomInfo != null) + { + //房间变暗 + _prevRoomInfo.RoomFogMask.TransitionAlpha(GameConfig.DarkFogAlpha); + //刷新预览区域 + foreach (var roomInfoDoor in _prevRoomInfo.Doors) + { + //不是连接到当前房间的, 过道通通变暗 + if (roomInfoDoor.ConnectDoor.RoomInfo != roomInfo) + { + var prevAisleFog = roomInfoDoor.AisleFogMask; + if (!prevAisleFog.IsExplored) + { + roomInfoDoor.PreviewAisleFogMask.TransitionToDark(); + } + else + { + prevAisleFog.TransitionToDark(); + if (roomInfoDoor.ConnectDoor.PreviewRoomFogMask.Visible) + { + if (roomInfoDoor.ConnectDoor.RoomInfo.RoomFogMask.IsExplored) + { + roomInfoDoor.ConnectDoor.PreviewRoomFogMask.TransitionToHide(); + } + else + { + roomInfoDoor.ConnectDoor.PreviewRoomFogMask.TransitionToDark(); + } + } + } + } + } + } + + _prevRoomInfo = roomInfo; + } + Debug.Log("RefreshRoomFog: " + roomInfo.Id); + var fogMask = roomInfo.RoomFogMask; + + if (!fogMask.IsExplored) //未探索该区域 + { + fogMask.IsExplored = true; + fogMask.TransitionAlpha(0, 1); + + //刷新预览区域 + foreach (var roomInfoDoor in roomInfo.Doors) + { + if (roomInfoDoor.AisleFogMask.IsExplored) //探索过, 执行过道刷新逻辑 + { + _RefreshAisleFog(roomInfoDoor); + } + else //未探索 + { + //显示预览过道 + roomInfoDoor.PreviewRoomFogMask.SetActive(false); + roomInfoDoor.PreviewAisleFogMask.SetActive(true); + roomInfoDoor.PreviewAisleFogMask.TransitionAlpha(1); + } + } + } + else //已经探索过 + { + //变亮 + fogMask.TransitionAlpha(GameConfig.DarkFogAlpha, 1); + + foreach (var roomInfoDoor in roomInfo.Doors) + { + if (roomInfoDoor.AisleFogMask.IsExplored) //探索过, 执行过道刷新逻辑 + { + _RefreshAisleFog(roomInfoDoor); + } + else //未探索 + { + //显示预览过道 + roomInfoDoor.PreviewRoomFogMask.SetActive(false); + roomInfoDoor.PreviewAisleFogMask.SetActive(true); + roomInfoDoor.PreviewAisleFogMask.TransitionAlpha(1); + } + } + } + } + + private static void _RefreshAisleFog(RoomDoorInfo doorInfo) + { + Debug.Log("RefreshAisleFog: " + doorInfo.RoomInfo.Id + doorInfo.Direction); + var fogMask = doorInfo.AisleFogMask; + + var connectDoor = doorInfo.ConnectDoor; + if (!fogMask.IsExplored) //未探索该区域 + { + fogMask.IsExplored = true; + doorInfo.PreviewAisleFogMask.IsExplored = true; + doorInfo.PreviewRoomFogMask.IsExplored = true; + doorInfo.ConnectDoor.PreviewAisleFogMask.IsExplored = true; + doorInfo.ConnectDoor.PreviewRoomFogMask.IsExplored = true; + fogMask.TransitionAlpha(1); + + //隐藏预览 + if (doorInfo.PreviewAisleFogMask.Visible) + { + doorInfo.PreviewAisleFogMask.TransitionToHide(); + } + + //显示下一个房间预览 + if (!connectDoor.RoomInfo.RoomFogMask.IsExplored) + { + connectDoor.PreviewRoomFogMask.SetActive(true); + connectDoor.PreviewRoomFogMask.TransitionAlpha(0, 1); + } + } + else //已经探索过 + { + if (doorInfo.Door.IsClose) //房间已经关门 + { + //过道迷雾变暗 + fogMask.TransitionToDark(); + //隐藏房间预览 + if (doorInfo.PreviewRoomFogMask.Visible) + { + doorInfo.PreviewRoomFogMask.TransitionToHide(); + } + //显示过道预览 + if (!doorInfo.PreviewAisleFogMask.Visible) + { + doorInfo.PreviewAisleFogMask.SetActive(true); + doorInfo.PreviewAisleFogMask.TransitionAlpha(0, 1 - doorInfo.AisleFogMask.TargetAlpha); + } + } + else + { + //过道迷雾变亮 + fogMask.TransitionToLight(); + + //隐藏房间预览 + if (doorInfo.PreviewRoomFogMask.Visible) + { + doorInfo.PreviewRoomFogMask.TransitionToHide(); + } + //隐藏过道预览 + if (doorInfo.PreviewAisleFogMask.Visible) + { + doorInfo.PreviewAisleFogMask.TransitionToHide(); + } + //连接的房间显示房间预览 + if (!connectDoor.PreviewRoomFogMask.Visible) + { + connectDoor.PreviewRoomFogMask.SetActive(true); + } + + var tempA = 1 - connectDoor.RoomInfo.RoomFogMask.TargetAlpha; + if (Math.Abs(connectDoor.PreviewRoomFogMask.TargetAlpha - tempA) > 0.001f) + { + if (connectDoor.RoomInfo.RoomFogMask.IsExplored) + { + connectDoor.PreviewRoomFogMask.TransitionAlpha(0, tempA); + } + else + { + connectDoor.PreviewRoomFogMask.TransitionAlpha(tempA); + } + } + + //连接的房间隐藏过道预览 + if (connectDoor.PreviewAisleFogMask.Visible) + { + connectDoor.PreviewAisleFogMask.TransitionToHide(); + } + } + } + } + + public static void ClearRecordRoom() + { + _prevRoomInfo = null; + _tempDoorInfo = null; + _tempRoomInfo = null; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/fog/PreviewFogMask.cs b/DungeonShooting_Godot/src/framework/map/fog/PreviewFogMask.cs new file mode 100644 index 0000000..104fd66 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/fog/PreviewFogMask.cs @@ -0,0 +1,120 @@ + +using System; +using System.Collections; +using Godot; + +/// +/// 绑定在门上的预览迷雾 +/// +public partial class PreviewFogMask : FogMaskBase +{ + public enum PreviewFogType + { + Aisle, + Room + } + + private static bool _initTexture; + private static Texture2D _previewAisle; + private static Texture2D _previewRoom; + + /// + /// 房间门 + /// + public RoomDoorInfo DoorInfo; + + /// + /// 迷雾类型 + /// + public PreviewFogType FogType { get; private set; } + + // private float _previewAisleAngle; + // private float _previewRoomAngle; + // private Vector2 _previewAislePosition; + // private Vector2 _previewRoomPosition; + private long _cid; + + private static void InitTexture() + { + if (_initTexture) + { + return; + } + + _initTexture = true; + _previewAisle = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_map_PreviewTransition_png); + _previewRoom = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_map_PreviewTransition2_png); + } + + /// + /// 初始化迷雾 + /// + public void Init(RoomDoorInfo doorInfo, PreviewFogType fogType) + { + InitTexture(); + + DoorInfo = doorInfo; + FogType = fogType; + var globalPosition = doorInfo.Door.GlobalPosition; + if (doorInfo.Direction == DoorDirection.E) + { + if (fogType == PreviewFogType.Aisle) + { + Texture = _previewAisle; + Position = globalPosition + new Vector2(GameConfig.TileCellSize, 0); + RotationDegrees = 90; + } + else + { + Texture = _previewRoom; + Position = globalPosition + new Vector2(-GameConfig.TileCellSize, 0); + RotationDegrees = 270; + } + } + else if (doorInfo.Direction == DoorDirection.W) + { + if (fogType == PreviewFogType.Aisle) + { + Texture = _previewAisle; + Position = globalPosition + new Vector2(-GameConfig.TileCellSize, 0); + RotationDegrees = 270; + } + else + { + Texture = _previewRoom; + Position = globalPosition + new Vector2(GameConfig.TileCellSize, 0); + RotationDegrees = 90; + } + } + else if (doorInfo.Direction == DoorDirection.N) + { + if (fogType == PreviewFogType.Aisle) + { + Texture = _previewAisle; + Position = globalPosition + new Vector2(0, -GameConfig.TileCellSize); + RotationDegrees = 0; + } + else + { + Texture = _previewRoom; + Position = globalPosition + new Vector2(0, GameConfig.TileCellSize); + RotationDegrees = 180; + } + } + else if (doorInfo.Direction == DoorDirection.S) + { + if (fogType == PreviewFogType.Aisle) + { + Texture = _previewAisle; + Position = globalPosition; + RotationDegrees = 180; + } + else + { + Texture = _previewRoom; + Position = globalPosition + new Vector2(0, -GameConfig.TileCellSize * 2); + RotationDegrees = 0; + } + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/image/ImageCanvas.cs b/DungeonShooting_Godot/src/framework/map/image/ImageCanvas.cs index 4373220..d69c2e8 100644 --- a/DungeonShooting_Godot/src/framework/map/image/ImageCanvas.cs +++ b/DungeonShooting_Godot/src/framework/map/image/ImageCanvas.cs @@ -67,11 +67,11 @@ var height = item.SrcImage.GetHeight(); if (width > 128) { - GD.PrintErr("警告: 图像宽度大于 128, 旋转后像素点可能绘制到画布外导致像素丢失!"); + Debug.LogError("警告: 图像宽度大于 128, 旋转后像素点可能绘制到画布外导致像素丢失!"); } if (height > 128) { - GD.PrintErr("警告: 图像高度大于 128, 旋转后像素点可能绘制到画布外导致像素丢失!"); + Debug.LogError("警告: 图像高度大于 128, 旋转后像素点可能绘制到画布外导致像素丢失!"); } item.X = Mathf.RoundToInt(x); item.Y = Mathf.RoundToInt(y); @@ -105,7 +105,7 @@ if (item.RenderWidth >= RenderViewportSize.X) { - GD.PrintErr($"图像旋转后的宽度大于{RenderViewportSize.X}, 不支持绘制到 ImageCanvas 下!"); + Debug.LogError($"图像旋转后的宽度大于{RenderViewportSize.X}, 不支持绘制到 ImageCanvas 下!"); item.SrcImage.Dispose(); return; } diff --git a/DungeonShooting_Godot/src/framework/map/image/ImageCanvas_Static.cs b/DungeonShooting_Godot/src/framework/map/image/ImageCanvas_Static.cs index ffd97ec..32ea79f 100644 --- a/DungeonShooting_Godot/src/framework/map/image/ImageCanvas_Static.cs +++ b/DungeonShooting_Godot/src/framework/map/image/ImageCanvas_Static.cs @@ -121,7 +121,7 @@ { if (!_placeholders.Remove(placeholder)) { - GD.PrintErr("移除 AreaPlaceholder 失败!"); + Debug.LogError("移除 AreaPlaceholder 失败!"); } } @@ -212,7 +212,7 @@ } } while (_drawingQueueItems.Count > 0 && (DateTime.Now - startTime).TotalMilliseconds < step1Time); - //GD.Print($"当前帧绘制完成数量: {index}, 绘制队列数量: {_drawingQueueItems.Count}, 用时: {(DateTime.Now - startTime).TotalMilliseconds}毫秒"); + //Debug.Log($"当前帧绘制完成数量: {index}, 绘制队列数量: {_drawingQueueItems.Count}, 用时: {(DateTime.Now - startTime).TotalMilliseconds}毫秒"); } //重绘画布 @@ -231,7 +231,7 @@ } catch (Exception e) { - GD.PrintErr("在ImageCanvas中调用回调OnDrawingComplete()发生异常: " + e); + Debug.LogError("在ImageCanvas中调用回调OnDrawingComplete()发生异常: " + e); } } } @@ -276,7 +276,7 @@ } } - //GD.Print($"当前帧进入绘制绘队列数量: {index}, 待绘制队列数量: {_queueItems.Count}, 绘制队列数量: {_drawingQueueItems.Count}, 用时: {(DateTime.Now - startTime).TotalMilliseconds}毫秒"); + //Debug.Log($"当前帧进入绘制绘队列数量: {index}, 待绘制队列数量: {_queueItems.Count}, 绘制队列数量: {_drawingQueueItems.Count}, 用时: {(DateTime.Now - startTime).TotalMilliseconds}毫秒"); } } diff --git a/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs b/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs index c00452d..d390aef 100644 --- a/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs +++ b/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs @@ -146,7 +146,7 @@ } else { - GD.PrintErr("暂未支持的类型: " + markInfo.SpecialMarkType); + Debug.LogError("暂未支持的类型: " + markInfo.SpecialMarkType); continue; } @@ -250,8 +250,8 @@ { if (_currWaveIndex < WaveList.Count) { - GD.Print($"执行第{_currWaveIndex}波"); - _coroutineId = GameApplication.Instance.StartCoroutine(RunMark(WaveList[_currWaveIndex])); + Debug.Log($"执行第{_currWaveIndex}波"); + _coroutineId = GameApplication.Instance.World.StartCoroutine(RunMark(WaveList[_currWaveIndex])); _currWaveIndex++; } } @@ -267,8 +267,8 @@ return; } - GD.Print($"执行第{_currWaveIndex}波"); - _coroutineId = GameApplication.Instance.StartCoroutine(RunMark(WaveList[_currWaveIndex])); + Debug.Log($"执行第{_currWaveIndex}波"); + _coroutineId = GameApplication.Instance.World.StartCoroutine(RunMark(WaveList[_currWaveIndex])); _currWaveIndex++; } @@ -325,11 +325,8 @@ //禁用下坠 instance.EnableVerticalMotion = false; - for (var i = 0; i < 10; i++) - { - instance.SetBlendSchedule(a); - yield return 0; - } + instance.SetBlendSchedule(a); + yield return new WaitForFixedProcess(10); while (a > 0) { @@ -337,6 +334,7 @@ a -= 0.05f; yield return 0; } + instance.SetBlendSchedule(0); //启用自定义行为 instance.EnableCustomBehavior = true; diff --git a/DungeonShooting_Godot/src/framework/map/room/CrossAisleRectData.cs b/DungeonShooting_Godot/src/framework/map/room/CrossAisleRectData.cs new file mode 100644 index 0000000..385fc6e --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/room/CrossAisleRectData.cs @@ -0,0 +1,51 @@ + +using Godot; + +/// +/// 交叉过道数据 +/// +public class CrossAisleRectData +{ + /// + /// 第一道门连接的过道区域 + /// + public Rect2I Rect1; + /// + /// 交叉点区域 + /// + public Rect2I Cross; + /// + /// 第二道门连接的过道区域 + /// + public Rect2I Rect2; + + /// + /// 计算并返回过道所占矩形大小 + /// + public Rect2I CalcAisleRect() + { + int x, y, w, h; + if (Rect1.Position.X < Rect2.Position.X) + { + x = Rect1.Position.X; + w = Rect2.Position.X - Rect1.Position.X + Rect2.Size.X; + } + else + { + x = Rect2.Position.X; + w = Rect1.Position.X - Rect2.Position.X + Rect1.Size.X; + } + if (Rect1.Position.Y < Rect2.Position.Y) + { + y = Rect1.Position.Y; + h = Rect2.Position.Y - Rect1.Position.Y + Rect2.Size.Y; + } + else + { + y = Rect2.Position.Y; + h = Rect1.Position.Y - Rect2.Position.Y + Rect1.Size.Y; + } + + return new Rect2I(x, y, w, h); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/room/RoomDoorInfo.cs b/DungeonShooting_Godot/src/framework/map/room/RoomDoorInfo.cs index 6e029fa..9e73a1d 100644 --- a/DungeonShooting_Godot/src/framework/map/room/RoomDoorInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/room/RoomDoorInfo.cs @@ -1,17 +1,25 @@ +using System; using Godot; /// /// 房间的门 /// -public class RoomDoorInfo +public class RoomDoorInfo : IDestroy { + public bool IsDestroyed { get; private set; } + /// /// 所在墙面方向 /// public DoorDirection Direction; /// + /// 是否是正向的门 + /// + public bool IsForward; + + /// /// 所在的房间 /// public RoomInfo RoomInfo; @@ -52,6 +60,26 @@ public RoomDoor Door; /// + /// 过道的迷雾 + /// + public FogMask AisleFogMask; + + /// + /// 过道迷雾区域 + /// + public AisleFogArea AisleFogArea; + + /// + /// 门区域预览房间迷雾 + /// + public PreviewFogMask PreviewRoomFogMask; + + /// + /// 门区域预览过道迷雾 + /// + public PreviewFogMask PreviewAisleFogMask; + + /// /// 世界坐标下的原点坐标, 单位: 像素 /// public Vector2I GetWorldOriginPosition() @@ -61,4 +89,172 @@ OriginPosition.Y * GameConfig.TileCellSize ); } + + /// + /// 获取直连门过道区域数据, 单位: 格, 如果当前门连接区域带交叉点, 则报错 + /// + public Rect2I GetAisleRect() + { + if (HasCross) + { + throw new Exception("当前门连接的过道包含交叉点, 请改用 GetCrossAisleRect() 函数!"); + } + + var rect = Utils.CalcRect( + OriginPosition.X, + OriginPosition.Y, + ConnectDoor.OriginPosition.X, + ConnectDoor.OriginPosition.Y + ); + + switch (Direction) + { + case DoorDirection.E: + rect.Size = new Vector2I(rect.Size.X, GameConfig.CorridorWidth); + break; + case DoorDirection.W: + rect.Size = new Vector2I(rect.Size.X, GameConfig.CorridorWidth); + break; + + case DoorDirection.S: + rect.Size = new Vector2I(GameConfig.CorridorWidth, rect.Size.Y); + break; + case DoorDirection.N: + rect.Size = new Vector2I(GameConfig.CorridorWidth, rect.Size.Y); + break; + } + + return rect; + } + + /// + /// 获取交叉门过道区域数据, 单位: 格, 如果当前门连接区域不带交叉点, 则报错 + /// + public CrossAisleRectData GetCrossAisleRect() + { + if (!HasCross) + { + throw new Exception("当前门连接的过道不包含交叉点, 请改用 GetAisleRect() 函数!"); + } + + Rect2I rect; + Rect2I rect2; + + //计算范围 + switch (Direction) + { + case DoorDirection.E: //→ + rect = new Rect2I( + OriginPosition.X, + OriginPosition.Y, + Cross.X - OriginPosition.X, + GameConfig.CorridorWidth + ); + break; + case DoorDirection.W: //← + rect = new Rect2I( + Cross.X + GameConfig.CorridorWidth, + Cross.Y, + OriginPosition.X - (Cross.X + GameConfig.CorridorWidth), + GameConfig.CorridorWidth + ); + break; + case DoorDirection.S: //↓ + rect = new Rect2I( + OriginPosition.X, + OriginPosition.Y, + GameConfig.CorridorWidth, + Cross.Y - OriginPosition.Y + ); + break; + case DoorDirection.N: //↑ + rect = new Rect2I( + Cross.X, + Cross.Y + GameConfig.CorridorWidth, + GameConfig.CorridorWidth, + OriginPosition.Y - (Cross.Y + GameConfig.CorridorWidth) + ); + break; + default: + rect = new Rect2I(); + break; + } + + switch (ConnectDoor.Direction) + { + case DoorDirection.E: //→ + rect2 = new Rect2I( + ConnectDoor.OriginPosition.X, + ConnectDoor.OriginPosition.Y, + Cross.X - ConnectDoor.OriginPosition.X, + GameConfig.CorridorWidth + ); + break; + case DoorDirection.W: //← + rect2 = new Rect2I( + Cross.X + GameConfig.CorridorWidth, + Cross.Y, + ConnectDoor.OriginPosition.X - + (Cross.X + GameConfig.CorridorWidth), + GameConfig.CorridorWidth + ); + break; + case DoorDirection.S: //↓ + rect2 = new Rect2I( + ConnectDoor.OriginPosition.X, + ConnectDoor.OriginPosition.Y, + GameConfig.CorridorWidth, + Cross.Y - ConnectDoor.OriginPosition.Y + ); + break; + case DoorDirection.N: //↑ + rect2 = new Rect2I( + Cross.X, + Cross.Y + GameConfig.CorridorWidth, + GameConfig.CorridorWidth, + ConnectDoor.OriginPosition.Y - + (Cross.Y + GameConfig.CorridorWidth) + ); + break; + default: + rect2 = new Rect2I(); + break; + } + + return new CrossAisleRectData() + { + Rect1 = rect, + Rect2 = rect2, + Cross = new Rect2I(Cross + Vector2I.One, new Vector2I(GameConfig.CorridorWidth - 2, GameConfig.CorridorWidth - 2)) + }; + } + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + IsDestroyed = true; + if (AisleFogMask != null) + { + AisleFogMask.Destroy(); + } + + if (AisleFogArea != null) + { + AisleFogArea.Destroy(); + } + + if (PreviewRoomFogMask != null) + { + PreviewRoomFogMask.Destroy(); + } + + if (PreviewAisleFogMask != null) + { + PreviewAisleFogMask.Destroy(); + } + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs b/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs index 1d3b34a..93f52da 100644 --- a/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs @@ -1,4 +1,5 @@ +using System; using System.Collections.Generic; using Godot; @@ -80,6 +81,16 @@ public RoomStaticImageCanvas StaticImageCanvas; /// + /// 房间迷雾 + /// + public FogMask RoomFogMask; + + /// + /// 房间算上连接通道所占用的区域 + /// + public Rect2I OuterRange { get; private set; } + + /// /// 是否处于闭关状态, 也就是房间门没有主动打开 /// public bool IsSeclusion { get; private set; } = false; @@ -94,6 +105,96 @@ //private List _currActivityMarks = new List(); /// + /// 重新计算占用的区域 + /// + public void CalcOuterRange() + { + var worldPos = GetWorldPosition(); + var pos = new Vector2I(worldPos.X, worldPos.Y); + var minX = pos.X; + var minY = pos.Y; + var maxX = minX + GetWidth(); + var maxY = minY + GetHeight(); + + //遍历每一个连接的门, 计算计算canvas覆盖范围 + foreach (var doorInfo in Doors) + { + var connectDoor = doorInfo.ConnectDoor; + switch (connectDoor.Direction) + { + case DoorDirection.E: + case DoorDirection.W: + { + var (px1, py1) = connectDoor.GetWorldOriginPosition(); + var py2 = py1 + 4 * GameConfig.TileCellSize; + if (px1 < minX) + { + minX = px1; + } + else if (px1 > maxX) + { + maxX = px1; + } + + if (py1 < minY) + { + minY = py1; + } + else if (py1 > maxY) + { + maxY = py1; + } + + if (py2 < minY) + { + minY = py2; + } + else if (py2 > maxY) + { + maxY = py2; + } + } + break; + case DoorDirection.S: + case DoorDirection.N: + { + var (px1, py1) = connectDoor.GetWorldOriginPosition(); + var px2 = px1 + 4 * GameConfig.TileCellSize; + if (px1 < minX) + { + minX = px1; + } + else if (px1 > maxX) + { + maxX = px1; + } + + if (py1 < minY) + { + minY = py1; + } + else if (py1 > maxY) + { + maxY = py1; + } + + if (px2 < minX) + { + minX = px2; + } + else if (px2 > maxX) + { + maxX = px2; + } + } + break; + } + } + + OuterRange = new Rect2I(minX, minY, maxX - minX, maxY - minY); + } + + /// /// 获取房间的全局坐标, 单位: 像素 /// public Vector2I GetWorldPosition() @@ -170,22 +271,39 @@ } IsDestroyed = true; + //递归销毁下一个房间 foreach (var nextRoom in Next) { nextRoom.Destroy(); } Next.Clear(); + + //销毁连接的门 + foreach (var roomDoorInfo in Doors) + { + roomDoorInfo.Destroy(); + } + + //销毁预设 if (RoomPreinstall != null) { RoomPreinstall.Destroy(); RoomPreinstall = null; } + //销毁画布 if (StaticImageCanvas != null) { StaticImageCanvas.Destroy(); } + //销毁迷雾 + if (RoomFogMask != null) + { + RoomFogMask.Destroy(); + } + + //销毁所属区域对象 if (AffiliationArea != null) { AffiliationArea.Destroy(); @@ -222,7 +340,7 @@ { hasEnemy = true; } - + if (!hasEnemy) //没有敌人, 不关门 { IsSeclusion = false; @@ -275,6 +393,14 @@ foreach (var doorInfo in Doors) { doorInfo.Door.OpenDoor(); + + //过道迷雾 + doorInfo.AisleFogArea.Monitoring = true; + if (doorInfo.AisleFogMask.IsExplored) + { + //doorInfo.ClearFog(); + FogMaskHandler.RefreshAisleFog(doorInfo); + } } } @@ -292,6 +418,14 @@ foreach (var doorInfo in Doors) { doorInfo.Door.CloseDoor(); + + //过道迷雾 + doorInfo.AisleFogArea.Monitoring = false; + if (doorInfo.AisleFogMask.IsExplored) + { + //doorInfo.DarkFog(); + FogMaskHandler.RefreshAisleFog(doorInfo); + } } } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomGroup.cs b/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomGroup.cs index 003dee7..142ca79 100644 --- a/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomGroup.cs +++ b/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomGroup.cs @@ -179,7 +179,7 @@ { if (!_init) { - GD.PrintErr("未调用DungeonRoomGroup.InitWeight()来初始化权重!"); + Debug.LogError("未调用DungeonRoomGroup.InitWeight()来初始化权重!"); return null; } diff --git a/DungeonShooting_Godot/src/framework/ui/UiBase.cs b/DungeonShooting_Godot/src/framework/ui/UiBase.cs index 94ed4fa..28ee1fd 100644 --- a/DungeonShooting_Godot/src/framework/ui/UiBase.cs +++ b/DungeonShooting_Godot/src/framework/ui/UiBase.cs @@ -105,7 +105,7 @@ { if (IsDestroyed) { - GD.PrintErr($"当前Ui: {UiName}已经被销毁!"); + Debug.LogError($"当前Ui: {UiName}已经被销毁!"); return; } if (IsOpen) @@ -134,7 +134,7 @@ { if (IsDestroyed) { - GD.PrintErr($"当前Ui: {UiName}已经被销毁!"); + Debug.LogError($"当前Ui: {UiName}已经被销毁!"); return; } if (!IsOpen) @@ -254,7 +254,7 @@ { if (uiBase.ParentUi != null && uiBase.ParentUi != this) { - GD.PrintErr($"子Ui:'{uiBase.UiName}'已经被其他Ui:'{uiBase.ParentUi.UiName}'嵌套打开!"); + Debug.LogError($"子Ui:'{uiBase.UiName}'已经被其他Ui:'{uiBase.ParentUi.UiName}'嵌套打开!"); uiBase.ParentUi.RecordNestedUi(uiBase, node, UiManager.RecordType.Close); } if (_nestedUiSet == null) @@ -275,7 +275,7 @@ } else { - GD.PrintErr($"当前Ui:'{UiName}'没有嵌套打开子Ui:'{uiBase.UiName}'!"); + Debug.LogError($"当前Ui:'{UiName}'没有嵌套打开子Ui:'{uiBase.UiName}'!"); return; } @@ -343,7 +343,7 @@ Destroy(); if (PrevUi == null) { - GD.PrintErr($"Ui: {UiName} 没有记录上一级Ui!"); + Debug.LogError($"Ui: {UiName} 没有记录上一级Ui!"); } else { diff --git a/DungeonShooting_Godot/src/framework/ui/grid/IUiGrid.cs b/DungeonShooting_Godot/src/framework/ui/grid/IUiGrid.cs index 0fad5c1..ed184fe 100644 --- a/DungeonShooting_Godot/src/framework/ui/grid/IUiGrid.cs +++ b/DungeonShooting_Godot/src/framework/ui/grid/IUiGrid.cs @@ -1,4 +1,4 @@ - +using Godot; /// /// Ui网格组件基础接口, 无泛型 @@ -9,19 +9,25 @@ /// 当前选中的 Cell 索引 /// int SelectIndex { get; set; } - + /// /// 设置网格组件是否可见 /// bool Visible { get; set; } - + /// /// 当前网格组件数据大小 /// int Count { get; } + + /// + /// Godot 原生网格组件 + /// + GridContainer GridContainer { get; } /// - /// 触发点击 Cell + /// 触发 Cell 的点击事件 /// + /// cell的索引 void Click(int index); } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs b/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs index 23afa6b..bc51bd0 100644 --- a/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs +++ b/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs @@ -12,7 +12,7 @@ public class UiGrid : IUiGrid where TUiCellNode : IUiCellNode { public bool IsDestroyed { get; private set; } - + public int SelectIndex { get => _selectIndex; @@ -31,6 +31,7 @@ return; } } + var prevIndex = _selectIndex; _selectIndex = newIndex; @@ -55,59 +56,71 @@ /// 选中的 Cell 包含的数据 /// public TData SelectData => _selectIndex >= 0 ? _cellList[_selectIndex].Data : default; - + public bool Visible { - get => _gridContainer.Visible; - set => _gridContainer.Visible = value; + get => GridContainer.Visible; + set => GridContainer.Visible = value; } public int Count => _cellList.Count; - + + public GridContainer GridContainer { get; private set; } + //模板对象 private TUiCellNode _template; + //模板大小 private Vector2 _size = Vector2.Zero; + //cell逻辑处理类 private Type _cellType; + //当前活动的cell池 private List> _cellList = new List>(); + //当前已被回收的cell池 private Stack> _cellPool = new Stack>(); - //godot原生网格组件 - private UiGridContainer _gridContainer; + //单个cell偏移 private Vector2I _cellOffset; + //列数 private int _columns; + //是否自动扩展列数 private bool _autoColumns; + //选中的cell索引 private int _selectIndex = -1; public UiGrid(TUiCellNode template, Type cellType) { - _gridContainer = new UiGridContainer(OnReady, OnProcess); - _gridContainer.Ready += OnReady; + GridContainer = new UiGridContainer(OnReady, OnProcess); + GridContainer.Ready += OnReady; _template = template; _cellType = cellType; var uiInstance = _template.GetUiInstance(); - uiInstance.AddSibling(_gridContainer); + uiInstance.AddSibling(GridContainer); uiInstance.GetParent().RemoveChild(uiInstance); if (uiInstance is Control control) { _size = control.Size; + if (control.CustomMinimumSize == Vector2.Zero) + { + control.CustomMinimumSize = _size; + } } } /// /// 设置每个 Cell 之间的偏移量 /// - public void SetCellOffset(Vector2I offset) + public void SetCellOffset(Vector2I offset) { _cellOffset = offset; - _gridContainer.AddThemeConstantOverride("h_separation", offset.X); - _gridContainer.AddThemeConstantOverride("v_separation", offset.Y); + GridContainer.AddThemeConstantOverride("h_separation", offset.X); + GridContainer.AddThemeConstantOverride("v_separation", offset.Y); } /// @@ -124,7 +137,7 @@ public void SetColumns(int columns) { _columns = columns; - _gridContainer.Columns = columns; + GridContainer.Columns = columns; } /// @@ -132,7 +145,7 @@ /// public int GetColumns() { - return _gridContainer.Columns; + return GridContainer.Columns; } /// @@ -145,13 +158,13 @@ _autoColumns = flag; if (_autoColumns) { - _gridContainer.Resized += OnGridResized; + GridContainer.Resized += OnGridResized; OnGridResized(); } else { - _gridContainer.Columns = _columns; - _gridContainer.Resized -= OnGridResized; + GridContainer.Columns = _columns; + GridContainer.Resized -= OnGridResized; } } } @@ -169,7 +182,7 @@ /// public void SetHorizontalExpand(bool flag) { - _gridContainer.SetHorizontalExpand(flag); + SetHorizontalExpand(GridContainer, flag); } /// @@ -177,7 +190,7 @@ /// public bool GetHorizontalExpand() { - return _gridContainer.GetHorizontalExpand(); + return GetHorizontalExpand(GridContainer); } /// @@ -240,7 +253,7 @@ do { var cell = GetCellInstance(); - _gridContainer.AddChild(cell.CellNode.GetUiInstance()); + GridContainer.AddChild(cell.CellNode.GetUiInstance()); } while (array.Length > _cellList.Count); } else if (array.Length < _cellList.Count) @@ -268,7 +281,7 @@ //取消选中 SelectIndex = -1; var cell = GetCellInstance(); - _gridContainer.AddChild(cell.CellNode.GetUiInstance()); + GridContainer.AddChild(cell.CellNode.GetUiInstance()); cell.SetData(data); } @@ -300,6 +313,7 @@ //取消选中 SelectIndex = -1; } + var uiCell = _cellList[index]; _cellList.RemoveAt(index); ReclaimCellInstance(uiCell); @@ -325,14 +339,14 @@ ReclaimCellInstance(uiCell); } } - + public void Click(int index) { if (index < 0 || index >= _cellList.Count) { return; } - + _cellList[index].Click(); } @@ -346,6 +360,7 @@ { return; } + //这里记录 SelectIndex 是让排序后 SelectIndex 指向的 Cell 不变 var selectIndex = SelectIndex; var selectCell = GetCell(selectIndex); @@ -355,21 +370,24 @@ { selectIndex = _cellList.FindIndex(cell => cell == selectCell); } + //先移除所有节点 for (var i = 0; i < _cellList.Count; i++) { - _gridContainer.RemoveChild(_cellList[i].CellNode.GetUiInstance()); + GridContainer.RemoveChild(_cellList[i].CellNode.GetUiInstance()); } if (selectIndex >= 0) { _selectIndex = selectIndex; } + //以新的顺序加入GridContainer for (var i = 0; i < _cellList.Count; i++) { - _gridContainer.AddChild(_cellList[i].CellNode.GetUiInstance()); + GridContainer.AddChild(_cellList[i].CellNode.GetUiInstance()); } + //刷新Index for (var i = 0; i < _cellList.Count; i++) { @@ -377,7 +395,7 @@ cell.SetIndex(i); } } - + /// /// 销毁当前网格组件 /// @@ -402,23 +420,24 @@ _cellList = null; _cellPool = null; - _gridContainer.QueueFree(); + GridContainer.QueueFree(); } - + private void OnReady() { if (_template.GetUiInstance() is Control control) { - _gridContainer.Position = control.Position; + GridContainer.Position = control.Position; } } - + private void OnProcess(float delta) { if (IsDestroyed || !_template.GetUiPanel().IsOpen) { return; } + //调用 cell 更新 var uiCells = _cellPool.ToArray(); for (var i = 0; i < uiCells.Length; i++) @@ -459,23 +478,50 @@ private void ReclaimCellInstance(UiCell cell) { cell.SetEnable(false); - _gridContainer.RemoveChild(cell.CellNode.GetUiInstance()); + GridContainer.RemoveChild(cell.CellNode.GetUiInstance()); _cellPool.Push(cell); } private void OnGridResized() { - if (_autoColumns && _gridContainer != null) + if (_autoColumns && GridContainer != null) { - var width = _gridContainer.Size.X; + var width = GridContainer.Size.X; if (width <= _size.X + _cellOffset.X) { - _gridContainer.Columns = 1; + GridContainer.Columns = 1; } else { - _gridContainer.Columns = Mathf.FloorToInt(width / (_size.X + _cellOffset.X)); + GridContainer.Columns = Mathf.FloorToInt(width / (_size.X + _cellOffset.X)); } } } + + /// + /// 设置Ui布局方式是否横向扩展, 如果为 true, 则 GridContainer 的宽度会撑满父物体 + /// + private static void SetHorizontalExpand(Control control, bool flag) + { + if (flag) + { + control.LayoutMode = 1; + control.AnchorsPreset = (int)Control.LayoutPreset.TopWide; + control.SizeFlagsHorizontal |= Control.SizeFlags.Expand; + } + else if ((control.SizeFlagsHorizontal & Control.SizeFlags.Expand) != 0) + { + control.LayoutMode = 1; + control.AnchorsPreset = (int)Control.LayoutPreset.TopLeft; + control.SizeFlagsHorizontal ^= Control.SizeFlags.Expand; + } + } + + /// + /// 获取Ui布局方式是否横向扩展 + /// + private static bool GetHorizontalExpand(Control control) + { + return (control.SizeFlagsHorizontal & Control.SizeFlags.Expand) != 0; + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index 1275dd1..9e4266c 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -36,7 +36,7 @@ /// 是否开启调试 /// [ExportGroup("Debug")] - [Export] public bool Debug = false; + [Export] public bool Debug; /// /// 鼠标指针 @@ -101,6 +101,8 @@ public override void _EnterTree() { + //背景颜色 + RenderingServer.SetDefaultClearColor(new Color(0, 0, 0, 1)); //随机化种子 //GD.Randomize(); //固定帧率 @@ -108,15 +110,20 @@ //调试绘制开关 ActivityObject.IsDebug = Debug; //Engine.TimeScale = 0.2f; - - ImageCanvas.Init(GetTree().CurrentScene); + //调整窗口分辨率 + OnWindowSizeChanged(); + RefreshSubViewportSize(); //窗体大小改变 GetWindow().SizeChanged += OnWindowSizeChanged; - RefreshSubViewportSize(); + + ImageCanvas.Init(GetTree().CurrentScene); //初始化ui UiManager.Init(); + //调试Ui + UiManager.Open_Debugger(); + // 初始化鼠标 InitCursor(); //地牢管理器 diff --git a/DungeonShooting_Godot/src/game/GameConfig.cs b/DungeonShooting_Godot/src/game/GameConfig.cs index e6e1cd2..932ab28 100644 --- a/DungeonShooting_Godot/src/game/GameConfig.cs +++ b/DungeonShooting_Godot/src/game/GameConfig.cs @@ -22,7 +22,7 @@ /// public const int CorridorWidth = 4; /// - /// 游戏地图网格大小 + /// 游戏地图网格大小, 值为 16 /// public const int TileCellSize = 16; /// @@ -77,4 +77,14 @@ /// 预览图大小 /// public const int PreviewImageSize = 196; + + /// + /// 变暗迷雾的透明度值 + /// + public const float DarkFogAlpha = 0.2f; + + /// + /// 迷雾过渡时间 + /// + public const float FogTransitionTime = 0.3f; } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/ForceNames.cs b/DungeonShooting_Godot/src/game/activity/ForceNames.cs new file mode 100644 index 0000000..ae60220 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/ForceNames.cs @@ -0,0 +1,11 @@ + +/// +/// 特殊外力名称 +/// +public class ForceNames +{ + /// + /// 投抛外力 + /// + public const string Throw = "throw"; +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs index 1448c50..e14b273 100644 --- a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs +++ b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs @@ -1,3 +1,4 @@ +using System.Collections; using Godot; /// @@ -13,6 +14,15 @@ public Area2D CollisionArea { get; set; } /// + /// 攻击的层级 + /// + public uint AttackLayer + { + get => CollisionArea.CollisionMask; + set => CollisionArea.CollisionMask = value; + } + + /// /// 发射该子弹的武器 /// public Weapon Weapon { get; private set; } @@ -31,6 +41,11 @@ /// 最大伤害 /// public int MaxHarm { get; set; } = 4; + + /// + /// 发射该子弹的角色 + /// + public Role Trigger { get; private set; } // 最大飞行距离 private float MaxDistance; @@ -53,13 +68,13 @@ /// 攻击目标层级 public void Init(Role trigger, Weapon weapon, float speed, float maxDistance, Vector2 position, float rotation, uint targetLayer) { + Trigger = trigger; Weapon = weapon; Role = weapon.Master; - CollisionArea.CollisionMask = targetLayer; + AttackLayer = targetLayer; CollisionArea.AreaEntered += OnArea2dEntered; - //只有玩家使用该武器才能获得正常速度的子弹 - if (trigger != null && !trigger.IsAi) + if (trigger != null && !trigger.IsAi) //只有玩家使用该武器才能获得正常速度的子弹 { FlySpeed = speed; } @@ -74,13 +89,34 @@ BasisVelocity = new Vector2(FlySpeed, 0).Rotated(Rotation); //如果子弹会对玩家造成伤害, 则显示红色描边 - // if (Player.Current.CollisionWithMask(targetLayer)) - // { - // ShowOutline = true; - // OutlineColor = new Color(1, 0, 0, 0.9f); - // } + if (Player.Current.CollisionWithMask(targetLayer)) + { + ShowOutline = true; + OutlineColor = new Color(1, 0, 0); + StartCoroutine(BorderFlashes()); + } + } + + private IEnumerator BorderFlashes() + { + while (true) + { + ShowOutline = !ShowOutline; + yield return new WaitForSeconds(0.12f); + } } + /// + /// 播放子弹消失的特效 + /// + public virtual void PlayDisappearEffect() + { + var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletDisappear_tscn); + var node = packedScene.Instantiate(); + node.GlobalPosition = GlobalPosition; + node.AddToActivityRoot(RoomLayerEnum.YSortLayer); + } + protected override void PhysicsProcessOver(float delta) { //移动 @@ -102,15 +138,11 @@ CurrFlyDistance += FlySpeed * delta; if (CurrFlyDistance >= MaxDistance) { - var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletDisappear_tscn); - var node = packedScene.Instantiate(); - node.GlobalPosition = GlobalPosition; - node.AddToActivityRoot(RoomLayerEnum.YSortLayer); - + PlayDisappearEffect(); Destroy(); } } - + private void OnArea2dEntered(Area2D other) { var role = other.AsActivityObject(); @@ -125,12 +157,25 @@ var damage = Utils.Random.RandomRangeInt(MinHarm, MaxHarm); if (Role != null) { - var d = damage; damage = Role.RoleState.CallCalcDamageEvent(damage); } + + //击退 + if (role is not Player) //目标不是玩家才会触发击退 + { + var attr = Trigger != null && !Trigger.IsAi ? Weapon.PlayerUseAttribute : Weapon.AiUseAttribute; + var repel = Utils.Random.RandomConfigRange(attr.RepelRnage); + role.MoveController.AddForce(Vector2.FromAngle(BasisVelocity.Angle()) * repel, repel * 2); + } + //造成伤害 role.CallDeferred(nameof(Role.Hurt), damage, Rotation); Destroy(); } } + + protected override void OnDestroy() + { + StopAllCoroutine(); + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/package/Package.cs b/DungeonShooting_Godot/src/game/activity/package/Package.cs index 98b5582..ca1ad16 100644 --- a/DungeonShooting_Godot/src/game/activity/package/Package.cs +++ b/DungeonShooting_Godot/src/game/activity/package/Package.cs @@ -6,6 +6,11 @@ /// public class Package : IDestroy where T : ActivityObject, IPackageItem { + /// + /// 当前使用对象改变时回调 + /// + public event Action ChangeActiveItemEvent; + public bool IsDestroyed { get; private set; } /// @@ -16,7 +21,23 @@ /// /// 当前使用的物体对象 /// - public T ActiveItem { get; private set; } + public T ActiveItem + { + get => _activeItem; + set + { + if (value != _activeItem) + { + _activeItem = value; + if (ChangeActiveItemEvent != null) + { + ChangeActiveItemEvent(value); + } + } + } + } + + private T _activeItem; /// /// 当前使用的物体的索引 diff --git a/DungeonShooting_Godot/src/game/activity/role/Role.cs b/DungeonShooting_Godot/src/game/activity/role/Role.cs index e66a0d7..d3ed357 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs @@ -40,7 +40,7 @@ public CampEnum Camp; /// - /// 攻击目标的碰撞器所属层级, 数据源自于: PhysicsLayer + /// 攻击目标的碰撞器所属层级, 数据源自于: /// public uint AttackLayer { get; set; } = PhysicsLayer.Wall; @@ -81,6 +81,24 @@ /// [Export, ExportFillNode] public CollisionShape2D InteractiveCollision { get; set; } + + /// + /// 近战碰撞检测区域 + /// + [Export, ExportFillNode] + public Area2D MeleeAttackArea { get; set; } + + /// + /// 近战碰撞检测区域的碰撞器 + /// + [Export, ExportFillNode] + public CollisionPolygon2D MeleeAttackCollision { get; set; } + + /// + /// 近战攻击时挥动武器的角度 + /// + [Export] + public float MeleeAttackAngle { get; set; } = 120; /// /// 武器挂载点是否始终指向目标 @@ -398,6 +416,12 @@ //连接互动物体信号 InteractiveArea.BodyEntered += _OnPropsEnter; InteractiveArea.BodyExited += _OnPropsExit; + + MeleeAttackCollision.Disabled = true; + //切换武器回调 + WeaponPack.ChangeActiveItemEvent += OnChangeActiveItem; + //近战区域进入物体 + MeleeAttackArea.BodyEntered += OnMeleeAttackBodyEntered; } protected override void Process(float delta) @@ -804,7 +828,7 @@ { if (BuffPropPack.Contains(buffProp)) { - GD.PrintErr("被动道具已经在背包中了!"); + Debug.LogError("被动道具已经在背包中了!"); return false; } BuffPropPack.Add(buffProp); @@ -823,7 +847,7 @@ var index = BuffPropPack.IndexOf(buffProp); if (index < 0) { - GD.PrintErr("当前道具不在角色背包中!"); + Debug.LogError("当前道具不在角色背包中!"); return; } @@ -957,11 +981,10 @@ else { damage = RoleState.CallCalcHurtDamageEvent(damage); - if (damage < 0) + if (damage > 0) { - return; + Hp -= damage; } - Hp -= damage; //播放血液效果 // var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_Blood_tscn); // var blood = packedScene.Instance(); @@ -1079,6 +1102,66 @@ } } + /// + /// 切换当前使用的武器的回调 + /// + private void OnChangeActiveItem(Weapon weapon) + { + //这里处理近战区域 + if (weapon != null) + { + MeleeAttackCollision.Polygon = Utils.CreateSectorPolygon( + Utils.ConvertAngle(-MeleeAttackAngle / 2f), + (weapon.GetLocalFirePosition() - weapon.GripPoint.Position).Length() * 1.2f, + MeleeAttackAngle, + 6 + ); + MeleeAttackArea.CollisionMask = AttackLayer | PhysicsLayer.Bullet; + } + } + + /// + /// 近战区域碰到敌人 + /// + private void OnMeleeAttackBodyEntered(Node2D body) + { + var activeWeapon = WeaponPack.ActiveItem; + if (activeWeapon == null) + { + return; + } + var activityObject = body.AsActivityObject(); + if (activityObject != null) + { + if (activityObject is Role role) //攻击角色 + { + var damage = Utils.Random.RandomConfigRange(activeWeapon.Attribute.MeleeAttackHarmRange); + damage = RoleState.CallCalcDamageEvent(damage); + + //击退 + if (role is not Player) //目标不是玩家才会触发击退 + { + var attr = IsAi ? activeWeapon.AiUseAttribute : activeWeapon.PlayerUseAttribute; + var repel = Utils.Random.RandomConfigRange(attr.MeleeAttackRepelRnage); + var position = role.GlobalPosition - MountPoint.GlobalPosition; + var v2 = position.Normalized() * repel; + role.MoveController.AddForce(v2, repel * 2); + } + + role.CallDeferred(nameof(Hurt), damage, (role.GetCenterPosition() - GlobalPosition).Angle()); + } + else if (activityObject is Bullet bullet) //攻击子弹 + { + var attackLayer = bullet.AttackLayer; + if (CollisionWithMask(attackLayer)) //是攻击玩家的子弹 + { + bullet.PlayDisappearEffect(); + bullet.Destroy(); + } + } + } + } + protected override void OnDestroy() { //销毁道具 diff --git a/DungeonShooting_Godot/src/game/activity/role/RoleState.cs b/DungeonShooting_Godot/src/game/activity/role/RoleState.cs index d195c75..c2c629b 100644 --- a/DungeonShooting_Godot/src/game/activity/role/RoleState.cs +++ b/DungeonShooting_Godot/src/game/activity/role/RoleState.cs @@ -87,7 +87,6 @@ /// 武器初始散射值增量 /// public event Action> CalcStartScatteringEvent; - public float CallCalcStartScatteringEvent(Weapon weapon, float value) { if (CalcStartScatteringEvent != null) diff --git a/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs b/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs index 3a09f55..8de62e5 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs @@ -13,20 +13,20 @@ var r = MountPoint.RotationDegrees; //var gp = MountPoint.GlobalPosition; var p1 = MountPoint.Position; - var p2 = p1 + new Vector2(6, 0).Rotated(Mathf.DegToRad(r - 60)); - var p3 = p1 + new Vector2(6, 0).Rotated(Mathf.DegToRad(r + 60)); + var p2 = p1 + new Vector2(6, 0).Rotated(Mathf.DegToRad(r - MeleeAttackAngle / 2f)); + var p3 = p1 + new Vector2(6, 0).Rotated(Mathf.DegToRad(r + MeleeAttackAngle / 2f)); var tween = CreateTween(); tween.SetParallel(); - tween.TweenProperty(MountPoint, "rotation_degrees", r - 60, 0.12); - tween.TweenProperty(MountPoint, "position", p2, 0.12); - tween.TweenProperty(MountPoint, "position", p2, 0.12); + tween.TweenProperty(MountPoint, "rotation_degrees", r - MeleeAttackAngle / 2f, 0.1); + tween.TweenProperty(MountPoint, "position", p2, 0.1); + tween.TweenProperty(MountPoint, "position", p2, 0.1); tween.Chain(); tween.TweenCallback(Callable.From(() => { - MountPoint.RotationDegrees = r + 60; + MountPoint.RotationDegrees = r + MeleeAttackAngle / 2f; MountPoint.Position = p3; //重新计算武器阴影位置 var activeItem = WeaponPack.ActiveItem; @@ -44,14 +44,25 @@ } //播放特效 var sprite = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_effect_weapon_MeleeAttack1_tscn); - var localFirePosition = activeItem.GetLocalFirePosition(); - localFirePosition.X *= 0.85f; + var localFirePosition = activeItem.GetLocalFirePosition() - activeItem.GripPoint.Position; + localFirePosition *= 0.9f; sprite.Position = p1 + localFirePosition.Rotated(Mathf.DegToRad(r)); sprite.RotationDegrees = r; AddChild(sprite); + + //启用近战碰撞区域 + MeleeAttackCollision.Disabled = false; })); tween.Chain(); + tween.TweenInterval(0.1f); + tween.Chain(); + + tween.TweenCallback(Callable.From(() => + { + //关闭近战碰撞区域 + MeleeAttackCollision.Disabled = true; + })); tween.TweenProperty(MountPoint, "rotation_degrees", r, 0.2); tween.TweenProperty(MountPoint, "position", p1, 0.2); tween.Chain(); diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFindAmmoState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFindAmmoState.cs index f1f6863..79cb04e 100644 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFindAmmoState.cs +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFindAmmoState.cs @@ -24,7 +24,7 @@ { if (args.Length == 0) { - GD.PrintErr("进入 AiStateEnum.AiFindAmmo 状态必须要把目标武器当成参数传过来"); + Debug.LogError("进入 AiStateEnum.AiFindAmmo 状态必须要把目标武器当成参数传过来"); ChangeState(prev); return; } diff --git a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs index 4600a54..48bec61 100644 --- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs +++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs @@ -53,8 +53,8 @@ // RoleState.MoveSpeed = 500; // CollisionLayer = 0; // CollisionMask = 0; - // GameCamera.Main.Zoom = new Vector2(0.2f, 0.2f); - // //GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f); + //GameCamera.Main.Zoom = new Vector2(0.2f, 0.2f); + //GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f); //注册状态机 StateController.Register(new PlayerIdleState()); @@ -165,6 +165,14 @@ Hp = 0; Hurt(1000, 0); } + else if (Input.IsKeyPressed(Key.O)) //测试用, 消灭房间内所有敌人 + { + var enemyList = AffiliationArea.FindIncludeItems(o => o.CollisionWithMask(PhysicsLayer.Enemy)); + foreach (var enemy in enemyList) + { + ((Enemy)enemy).Hurt(1000, 0); + } + } } // protected override void PhysicsProcess(float delta) @@ -254,6 +262,11 @@ GameCamera.Main.SetFollowTarget(null); BasisVelocity = Vector2.Zero; MoveController.ClearForce(); + + //暂停游戏 + GameApplication.Instance.World.Pause = true; + //弹出结算面板 + GameApplication.Instance.Cursor.SetGuiMode(true); UiManager.Open_Settlement(); } @@ -303,4 +316,10 @@ BasisVelocity = new Vector2(BasisVelocity.X, Mathf.MoveToward(BasisVelocity.Y, dir.Y * RoleState.MoveSpeed, RoleState.Acceleration * delta)); } } + + protected override void DebugDraw() + { + base.DebugDraw(); + DrawArc(new Vector2(0, -8), 50, 0, Mathf.Pi * 2f, 20, Colors.Red, 1); + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/shell/Shell.cs b/DungeonShooting_Godot/src/game/activity/shell/Shell.cs index f5f9af3..5b58591 100644 --- a/DungeonShooting_Godot/src/game/activity/shell/Shell.cs +++ b/DungeonShooting_Godot/src/game/activity/shell/Shell.cs @@ -24,7 +24,7 @@ } else { - GD.Print("弹壳投抛到画布外了, 强制消除..."); + Debug.Log("弹壳投抛到画布外了, 强制消除..."); Destroy(); } } diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs index ace9948..03ab172 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs @@ -17,6 +17,11 @@ /// Ai使用该武器的属性 /// public ExcelConfig.Weapon AiUseAttribute => _aiWeaponAttribute; + + /// + /// 玩家使用该武器的属性 + /// + public ExcelConfig.Weapon PlayerUseAttribute => _playerWeaponAttribute; private ExcelConfig.Weapon _weaponAttribute; private ExcelConfig.Weapon _playerWeaponAttribute; @@ -135,6 +140,11 @@ /// public bool IsAutoPlaySpriteFrames { get; set; } = true; + /// + /// 在没有所属 Master 的时候是否可以触发扳机 + /// + public bool NoMasterCanTrigger { get; set; } = true; + //-------------------------------------------------------------------------------------------- //触发按下扳机的角色 @@ -236,7 +246,7 @@ { if (!_weaponAttributeMap.TryAdd(weaponAttr.WeaponId, weaponAttr)) { - GD.PrintErr("发现重复注册的武器属性: " + weaponAttr.Id); + Debug.LogError("发现重复注册的武器属性: " + weaponAttr.Id); } } } @@ -277,7 +287,7 @@ if (Attribute.AmmoCapacity > Attribute.MaxAmmoCapacity) { Attribute.AmmoCapacity = Attribute.MaxAmmoCapacity; - GD.PrintErr("弹夹的容量不能超过弹药上限, 武器id: " + ItemConfig.Id); + Debug.LogError("弹夹的容量不能超过弹药上限, 武器id: " + ItemConfig.Id); } //弹药量 CurrAmmo = Attribute.AmmoCapacity; @@ -423,7 +433,8 @@ _noAttackTime += delta; //这把武器被扔在地上, 或者当前武器没有被使用 - if (Master == null || Master.WeaponPack.ActiveItem != this) + //if (Master == null || Master.WeaponPack.ActiveItem != this) + if (Master != null && Master.WeaponPack.ActiveItem != this) //在背上 { //_triggerTimer _triggerTimer = _triggerTimer > 0 ? _triggerTimer - delta : 0; @@ -445,9 +456,7 @@ { _dirtyFlag = false; _aloneReloadState = 0; - Reloading = false; - _reloadTimer = 0; - _reloadUseTime = 0; + StopReload(); _attackFlag = false; _continuousCount = 0; _delayedTime = 0; @@ -486,7 +495,7 @@ switch (_aloneReloadState) { case 0: - GD.PrintErr("AloneReload状态错误!"); + Debug.LogError("AloneReload状态错误!"); break; case 1: //装第一颗子弹之前 { @@ -510,7 +519,7 @@ if (Attribute.AloneReloadFinishIntervalTime <= 0) { //换弹完成 - StopReloadState(); + StopReload(); ReloadFinishHandler(); } else @@ -528,14 +537,14 @@ if (!_playReloadFinishSoundFlag && Attribute.ReloadFinishSound != null && _reloadTimer <= Attribute.ReloadFinishSoundAdvanceTime) { _playReloadFinishSoundFlag = true; - // GD.Print("播放换弹完成音效."); + // Debug.Log("播放换弹完成音效."); PlayReloadFinishSound(); } if (_reloadTimer <= 0) { //换弹完成 - StopReloadState(); + StopReload(); ReloadFinishHandler(); } _aloneReloadStop = false; @@ -549,7 +558,7 @@ if (!_playReloadFinishSoundFlag && Attribute.ReloadFinishSound != null && _reloadTimer <= Attribute.ReloadFinishSoundAdvanceTime) { _playReloadFinishSoundFlag = true; - // GD.Print("播放换弹完成音效."); + // Debug.Log("播放换弹完成音效."); PlayReloadFinishSound(); } @@ -569,7 +578,11 @@ _delayedTime += _attackTimer; _attackTimer = 0; //枪口默认角度 - RotationDegrees = -Attribute.DefaultAngle; + if (Master != null) + { + RotationDegrees = -Attribute.DefaultAngle; + } + //自动上膛 if (_beLoadedState == -1) { @@ -615,7 +628,7 @@ if (!_looseShootFlag && _continuousCount > 0 && _delayedTime <= 0 && _attackTimer <= 0) { //连发开火 - TriggerFire(_attackTrigger); + TriggerFire(); //连发最后一发打完了 if (Attribute.ManualBeLoaded && _continuousCount <= 0) { @@ -637,13 +650,16 @@ //武器身回归 //Position = Position.MoveToward(Vector2.Zero, Attribute.BacklashRegressionSpeed * delta).Rotated(Rotation); _currBacklashLength = Mathf.MoveToward(_currBacklashLength, 0, Attribute.BacklashRegressionSpeed * delta); - Position = new Vector2(_currBacklashLength, 0).Rotated(Rotation); - if (_attackTimer > 0) + if (Master != null) { - RotationDegrees = Mathf.Lerp( - _fireAngle, -Attribute.DefaultAngle, - Mathf.Clamp((_fireInterval - _attackTimer) * Attribute.UpliftAngleRestore / _fireInterval, 0, 1) - ); + Position = new Vector2(_currBacklashLength, 0).Rotated(Rotation); + if (_attackTimer > 0) + { + RotationDegrees = Mathf.Lerp( + _fireAngle, -Attribute.DefaultAngle, + Mathf.Clamp((_fireInterval - _attackTimer) * Attribute.UpliftAngleRestore / _fireInterval, 0, 1) + ); + } } } } @@ -663,6 +679,9 @@ /// 按下扳机的角色, 如果传 null, 则视为走火 public void Trigger(Role trigger) { + //不能触发扳机 + if (!NoMasterCanTrigger && Master == null) return; + //这一帧已经按过了, 不需要再按下 if (_triggerFlag) return; @@ -674,7 +693,7 @@ if (_beLoadedState == 0 || _beLoadedState == -1) //需要执行上膛操作 { - if (justDown && !Reloading && Master != null) + if (justDown && !Reloading && trigger != null) { if (CurrAmmo <= 0) { @@ -744,7 +763,7 @@ else if (CurrAmmo <= 0) //子弹不够 { fireFlag = false; - if (justDown && Master != null) + if (justDown && trigger != null) { //第一帧按下, 触发换弹 Reload(); @@ -779,7 +798,7 @@ else { //开火 - TriggerFire(_attackTrigger); + TriggerFire(); //非连射模式 if (!Attribute.ContinuousShoot && Attribute.ManualBeLoaded && _continuousCount <= 0) @@ -855,7 +874,7 @@ _looseShootFlag = false; if (_chargeTime >= Attribute.MinChargeTime) //判断蓄力是否够了 { - TriggerFire(_attackTrigger); + TriggerFire(); //非连射模式 if (!Attribute.ContinuousShoot && Attribute.ManualBeLoaded && _continuousCount <= 0) { @@ -876,7 +895,7 @@ /// /// 触发开火 /// - private void TriggerFire(Role trigger) + private void TriggerFire() { _noAttackTime = 0; @@ -962,7 +981,7 @@ tempAngle -= Attribute.UpliftAngle; _fireAngle = tempAngle; - if (Master != null) //是否被拾起 + if (Master != null) //被拾起 { //武器身位置 var max = Mathf.Abs(Mathf.Max(Utils.GetConfigRangeStart(Attribute.BacklashRange), Utils.GetConfigRangeEnd(Attribute.BacklashRange))); @@ -973,9 +992,24 @@ Position = new Vector2(_currBacklashLength, 0).Rotated(Rotation); RotationDegrees = tempAngle; } - else + else //在地上 { - + var v = Utils.Random.RandomConfigRange(Attribute.BacklashRange) * 5; + var externalForce = MoveController.AddForce(new Vector2(-v, 0).Rotated(Rotation), v * 2); + externalForce.RotationSpeed = -Mathf.DegToRad(40); + externalForce.RotationResistance = Mathf.DegToRad(80); + } + + if (IsInGround()) + { + //在地上弹药打光 + if (IsTotalAmmoEmpty()) + { + //停止动画 + AnimationPlayer.Stop(); + //清除泛白效果 + SetBlendSchedule(0); + } } } @@ -1093,7 +1127,7 @@ //播放开始换弹音效 PlayBeginReloadSound(); - // GD.Print("开始换弹."); + // Debug.Log("开始换弹."); //抛弹 if (!Attribute.ContinuousShoot && (_beLoadedState == 0 || _beLoadedState == -1) && Attribute.BeLoadedTime > 0) { @@ -1119,6 +1153,17 @@ } } + /// + /// 强制停止换弹, 或者结束换弹状态 + /// + public void StopReload() + { + _aloneReloadState = 0; + Reloading = false; + _reloadTimer = 0; + _reloadUseTime = 0; + } + //播放换弹开始音效 private void PlayBeginReloadSound() { @@ -1254,20 +1299,20 @@ PlayReloadSound(); OnReload(); - // GD.Print("装弹."); + // Debug.Log("装弹."); } //换弹完成处理逻辑 private void ReloadFinishHandler() { - // GD.Print("装弹完成."); + // Debug.Log("装弹完成."); OnReloadFinish(); } //单独装弹完成 private void AloneReloadStateFinish() { - // GD.Print("单独装弹完成."); + // Debug.Log("单独装弹完成."); OnAloneReloadStateFinish(); } @@ -1375,15 +1420,6 @@ } } - //停止当前的换弹状态 - private void StopReloadState() - { - _aloneReloadState = 0; - Reloading = false; - _reloadTimer = 0; - _reloadUseTime = 0; - } - /// /// 换弹计时器时间到, 执行换弹操作 /// @@ -1438,7 +1474,7 @@ ResidueAmmo = 0; } - StopReloadState(); + StopReload(); ReloadFinishHandler(); } } @@ -1456,7 +1492,7 @@ //帧动画播放结束 private void OnAnimationFinished() { - // GD.Print("帧动画播放结束..."); + // Debug.Log("帧动画播放结束..."); AnimatedSprite.Play(AnimatorNames.Default); } @@ -1806,8 +1842,7 @@ { var speed = Utils.Random.RandomConfigRange(Attribute.BulletSpeedRange); var distance = Utils.Random.RandomConfigRange(Attribute.BulletDistanceRange); - var deviationAngle = - Utils.Random.RandomConfigRange(Attribute.BulletDeviationAngleRange); + var deviationAngle = Utils.Random.RandomConfigRange(Attribute.BulletDeviationAngleRange); if (Master != null) { speed = Master.RoleState.CallCalcBulletSpeedEvent(this, speed); @@ -1827,8 +1862,8 @@ fireRotation + Mathf.DegToRad(deviationAngle), attackLayer ); - bullet.MinHarm = Utils.GetConfigRangeStart(Attribute.BulletHarmRange); - bullet.MaxHarm = Utils.GetConfigRangeEnd(Attribute.BulletHarmRange); + bullet.MinHarm = Utils.GetConfigRangeStart(Attribute.HarmRange); + bullet.MaxHarm = Utils.GetConfigRangeEnd(Attribute.HarmRange); bullet.PutDown(RoomLayerEnum.YSortLayer); return bullet; } diff --git a/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs b/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs index 0dfeaeb..b8e288f 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs @@ -11,7 +11,7 @@ if (Master == Player.Current) { //创建抖动 - GameCamera.Main.DirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 2f); + GameCamera.Main.DirectionalShake(Vector2.Right.Rotated(GlobalRotation) * Attribute.CameraShake); } //创建开火特效 diff --git a/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs b/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs index e9651c8..462ebed 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs @@ -1,21 +1,45 @@ using Godot; +/// +/// 近战武器,刀 +/// [Tool] public partial class Knife : Weapon { + /// + /// 近战攻击范围 + /// + [Export] + public int AttackRange { get; set; } = 41; + + /// + /// 开始蓄力时武器抬起角度 + /// + [Export] + public int BeginChargeAngle { get; set; } = 120; private Area2D _hitArea; private int _attackIndex = 0; + private CollisionPolygon2D _collisionPolygon; public override void OnInit() { base.OnInit(); - + + //没有Master时不能触发开火 + NoMasterCanTrigger = false; _hitArea = GetNode("HitArea"); + _collisionPolygon = new CollisionPolygon2D(); + var a = Mathf.Abs(-BeginChargeAngle + Attribute.UpliftAngle); + var ca = Utils.ConvertAngle(-a / 2f); + _collisionPolygon.Polygon = Utils.CreateSectorPolygon(ca, AttackRange, a, 6); + _hitArea.AddChild(_collisionPolygon); + _hitArea.Monitoring = false; _hitArea.Monitorable = false; _hitArea.BodyEntered += OnBodyEntered; + //禁用自动播放动画 IsAutoPlaySpriteFrames = false; } @@ -42,15 +66,15 @@ protected override void OnBeginCharge() { - //开始蓄力时武器角度上抬120度 - RotationDegrees = -120; + //开始蓄力时武器角度 + RotationDegrees = -BeginChargeAngle; } protected override void OnFire() { - GD.Print("近战武器攻击! 蓄力时长: " + GetTriggerChargeTime() + ", 扳机按下时长: " + GetTriggerDownTime()); + Debug.Log("近战武器攻击! 蓄力时长: " + GetTriggerChargeTime() + ", 扳机按下时长: " + GetTriggerDownTime()); //更新碰撞层级 - _hitArea.CollisionMask = GetAttackLayer(); + _hitArea.CollisionMask = GetAttackLayer() | PhysicsLayer.Bullet; //启用碰撞 _hitArea.Monitoring = true; _attackIndex = 0; @@ -59,8 +83,11 @@ { //播放挥刀特效 SpecialEffectManager.Play( + Master, ResourcePath.resource_spriteFrames_effect_KnifeHit1_tres, "default", - Master.MountPoint.GlobalPosition, GlobalRotation + Mathf.Pi * 0.5f, new Vector2((int)Master.Face, 1) * AnimatedSprite.Scale, + Master.MountPoint.Position, + Master.MountPoint.Rotation + Mathf.DegToRad(Attribute.UpliftAngle + 60), + AnimatedSprite.Scale, new Vector2(17, 4), 1 ); } @@ -68,8 +95,18 @@ if (Master == Player.Current) { - //创建抖动 - //GameCamera.Main.ProcessDirectionalShake(Vector2.Right.Rotated(GlobalRotation - Mathf.Pi * 0.5f) * 1.5f); + var r = Master.MountPoint.RotationDegrees; + //创建屏幕抖动 + if (Master.Face == FaceDirection.Right) + { + //GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(r - 90)) * 5); + GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(r - 180)) * Attribute.CameraShake); + } + else + { + //GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(270 - r)) * 5); + GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(-r)) * Attribute.CameraShake); + } } } @@ -86,14 +123,37 @@ private void OnBodyEntered(Node2D body) { - GD.Print("碰到物体: " + body.Name); + //Debug.Log("碰到物体: " + body.Name); var activityObject = body.AsActivityObject(); if (activityObject != null) { - if (activityObject is Role role) + if (activityObject is Role role) //碰到角色 { - role.CallDeferred(nameof(Role.Hurt), - Utils.Random.RandomConfigRange(Attribute.BulletHarmRange), (role.GetCenterPosition() - GlobalPosition).Angle()); + var damage = Utils.Random.RandomConfigRange(Attribute.HarmRange); + damage = Master.RoleState.CallCalcDamageEvent(damage); + //击退 + if (role is not Player) //目标不是玩家才会触发击退 + { + var attr = Master.IsAi ? AiUseAttribute : PlayerUseAttribute; + var repel = Utils.Random.RandomConfigRange(attr.RepelRnage); + var position = role.GlobalPosition - Master.MountPoint.GlobalPosition; + var v2 = position.Normalized() * repel; + role.MoveController.AddForce(v2, repel * 2); + } + + //造成伤害 + role.CallDeferred(nameof(Role.Hurt), damage, (role.GetCenterPosition() - GlobalPosition).Angle()); + } + else if (activityObject is Bullet bullet) //攻击子弹 + { + var attackLayer = bullet.AttackLayer; + if (Master.CollisionWithMask(attackLayer)) //是攻击玩家的子弹 + { + bullet.PlayDisappearEffect(); + bullet.BasisVelocity = bullet.BasisVelocity.Rotated(Mathf.Pi); + bullet.Rotation += Mathf.Pi; + bullet.AttackLayer = Master.AttackLayer; + } } } } diff --git a/DungeonShooting_Godot/src/game/effects/AutoDestroySprite.cs b/DungeonShooting_Godot/src/game/effects/AutoDestroySprite.cs index 857819d..a24db0c 100644 --- a/DungeonShooting_Godot/src/game/effects/AutoDestroySprite.cs +++ b/DungeonShooting_Godot/src/game/effects/AutoDestroySprite.cs @@ -1,4 +1,5 @@ using Godot; +using Godot.Collections; /// /// 到期自动销毁的帧动画 @@ -11,9 +12,22 @@ [Export] public float DelayTime { get; set; } = 1f; + /// + /// 子节点包含的例子特效, 在创建完成后自动播放 + /// + [Export] + public Array Particles2D { get; set; } + public override async void _Ready() { var sceneTreeTimer = GetTree().CreateTimer(DelayTime); + if (Particles2D != null) + { + foreach (var gpuParticles2D in Particles2D) + { + gpuParticles2D.Emitting = true; + } + } await ToSignal(sceneTreeTimer, Timer.SignalName.Timeout); QueueFree(); } diff --git a/DungeonShooting_Godot/src/game/event/EventManager.cs b/DungeonShooting_Godot/src/game/event/EventManager.cs index 394db2a..0ec5e43 100644 --- a/DungeonShooting_Godot/src/game/event/EventManager.cs +++ b/DungeonShooting_Godot/src/game/event/EventManager.cs @@ -64,7 +64,7 @@ } catch (Exception e) { - GD.PrintErr($"EventManager 派发事件: '{eventType}' 发生异常: \n" + e.Message + "\n" + e.StackTrace); + Debug.LogError($"EventManager 派发事件: '{eventType}' 发生异常: \n" + e.Message + "\n" + e.StackTrace); } } } diff --git a/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs b/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs index 0076005..1e020ef 100644 --- a/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs +++ b/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs @@ -93,7 +93,7 @@ } else { - GD.Print("刷新地图组时未找到配置文件: " + configFile + ", 执行创建文件"); + Debug.Log("刷新地图组时未找到配置文件: " + configFile + ", 执行创建文件"); GroupMap = new Dictionary(); File.WriteAllText(configFile, "{}"); } @@ -117,7 +117,7 @@ { if (GroupMap.ContainsKey(group.GroupName)) { - GD.PrintErr($"已经存在相同的地牢组: {group.GroupName}"); + Debug.LogError($"已经存在相同的地牢组: {group.GroupName}"); return; } GroupMap.Add(group.GroupName, group); @@ -161,7 +161,7 @@ } else { - GD.PrintErr($"未找到地牢组: {groupName}"); + Debug.LogError($"未找到地牢组: {groupName}"); } } diff --git a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs index 6d23584..008031b 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs @@ -97,7 +97,7 @@ var res = ResourceLoader.Load(path, null, ResourceLoader.CacheMode.Ignore); if (res == null) { - GD.PrintErr("加载资源失败, 未找到资源: " + path); + Debug.LogError("加载资源失败, 未找到资源: " + path); return default; } @@ -117,7 +117,7 @@ } else { - GD.PrintErr("加载资源失败, 未找到资源: " + path); + Debug.LogError("加载资源失败, 未找到资源: " + path); } return default; diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 26f4baa..d04d4a5 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -9,7 +9,6 @@ public const string excel_DungeonShooting_ExcelTool_deps_json = "res://excel/DungeonShooting_ExcelTool.deps.json"; public const string excel_DungeonShooting_ExcelTool_runtimeconfig_json = "res://excel/DungeonShooting_ExcelTool.runtimeconfig.json"; public const string prefab_Cursor_tscn = "res://prefab/Cursor.tscn"; - public const string prefab_FanCollisionShape_tscn = "res://prefab/FanCollisionShape.tscn"; public const string prefab_bullet_Bullet0001_tscn = "res://prefab/bullet/Bullet0001.tscn"; public const string prefab_bullet_Bullet0002_tscn = "res://prefab/bullet/Bullet0002.tscn"; public const string prefab_bullet_Bullet0003_tscn = "res://prefab/bullet/Bullet0003.tscn"; @@ -21,6 +20,7 @@ public const string prefab_effect_weapon_BulletSmoke_tscn = "res://prefab/effect/weapon/BulletSmoke.tscn"; public const string prefab_effect_weapon_FirePart_tscn = "res://prefab/effect/weapon/FirePart.tscn"; public const string prefab_effect_weapon_MeleeAttack1_tscn = "res://prefab/effect/weapon/MeleeAttack1.tscn"; + public const string prefab_effect_weapon_MeleeAttack2_tscn = "res://prefab/effect/weapon/MeleeAttack2.tscn"; public const string prefab_effect_weapon_ShotFire_tscn = "res://prefab/effect/weapon/ShotFire.tscn"; public const string prefab_map_RoomDoor_E_tscn = "res://prefab/map/RoomDoor_E.tscn"; public const string prefab_map_RoomDoor_N_tscn = "res://prefab/map/RoomDoor_N.tscn"; @@ -48,6 +48,7 @@ public const string prefab_test_MoveComponent_tscn = "res://prefab/test/MoveComponent.tscn"; public const string prefab_test_TestActivity_tscn = "res://prefab/test/TestActivity.tscn"; public const string prefab_ui_BottomTips_tscn = "res://prefab/ui/BottomTips.tscn"; + public const string prefab_ui_Debugger_tscn = "res://prefab/ui/Debugger.tscn"; public const string prefab_ui_EditorTips_tscn = "res://prefab/ui/EditorTips.tscn"; public const string prefab_ui_EditorTools_tscn = "res://prefab/ui/EditorTools.tscn"; public const string prefab_ui_EditorWindow_tscn = "res://prefab/ui/EditorWindow.tscn"; @@ -63,7 +64,9 @@ public const string prefab_ui_MapEditorProject_tscn = "res://prefab/ui/MapEditorProject.tscn"; public const string prefab_ui_MapEditorSelectObject_tscn = "res://prefab/ui/MapEditorSelectObject.tscn"; public const string prefab_ui_MapEditorTools_tscn = "res://prefab/ui/MapEditorTools.tscn"; + public const string prefab_ui_PauseMenu_tscn = "res://prefab/ui/PauseMenu.tscn"; public const string prefab_ui_RoomUI_tscn = "res://prefab/ui/RoomUI.tscn"; + public const string prefab_ui_Setting_tscn = "res://prefab/ui/Setting.tscn"; public const string prefab_ui_Settlement_tscn = "res://prefab/ui/Settlement.tscn"; public const string prefab_weapon_Weapon0001_tscn = "res://prefab/weapon/Weapon0001.tscn"; public const string prefab_weapon_Weapon0002_tscn = "res://prefab/weapon/Weapon0002.tscn"; @@ -73,7 +76,6 @@ public const string prefab_weapon_Weapon0006_tscn = "res://prefab/weapon/Weapon0006.tscn"; public const string prefab_weapon_Weapon0007_tscn = "res://prefab/weapon/Weapon0007.tscn"; public const string prefab_weapon_WeaponTemplate_tscn = "res://prefab/weapon/WeaponTemplate.tscn"; - public const string resource_Enviromenent_tres = "res://resource/Enviromenent.tres"; public const string resource_config_ActivityObject_json = "res://resource/config/ActivityObject.json"; public const string resource_config_Sound_json = "res://resource/config/Sound.json"; public const string resource_config_Weapon_json = "res://resource/config/Weapon.json"; @@ -83,8 +85,10 @@ public const string resource_font_DinkieBitmap9pxItalicDemo_ttf = "res://resource/font/DinkieBitmap-9pxItalicDemo.ttf"; public const string resource_font_VonwaonBitmap12px_ttf = "res://resource/font/VonwaonBitmap-12px.ttf"; public const string resource_font_VonwaonBitmap16px_ttf = "res://resource/font/VonwaonBitmap-16px.ttf"; - public const string resource_map_tileSet_TileSet1_tres = "res://resource/map/tileSet/TileSet1.tres"; public const string resource_map_tileSet_TileSet_old_tres = "res://resource/map/tileSet/TileSet_old.tres"; + public const string resource_map_tileSet_map1_TileSet1_tres = "res://resource/map/tileSet/map1/TileSet1.tres"; + public const string resource_map_tileSet_map1_website_txt = "res://resource/map/tileSet/map1/website.txt"; + public const string resource_map_tileSprite_map1_16x16dungeoniiwallreconfigv04spritesheet_png = "res://resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png"; public const string resource_material_Blend_gdshader = "res://resource/material/Blend.gdshader"; public const string resource_material_Blend_tres = "res://resource/material/Blend.tres"; public const string resource_material_SmokeParticleMaterial_tres = "res://resource/material/SmokeParticleMaterial.tres"; @@ -145,9 +149,12 @@ public const string resource_sprite_effects_weapon_KnifeHit1_png = "res://resource/sprite/effects/weapon/KnifeHit1.png"; public const string resource_sprite_effects_weapon_MeleeAttack1_png = "res://resource/sprite/effects/weapon/MeleeAttack1.png"; public const string resource_sprite_effects_weapon_ShotFire_png = "res://resource/sprite/effects/weapon/ShotFire.png"; - public const string resource_sprite_map_map1_16x16dungeoniiwallreconfigv04spritesheet_png = "res://resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png"; - public const string resource_sprite_map_map1_door1_down_png = "res://resource/sprite/map/map1/door1_down.png"; - public const string resource_sprite_map_map1_website_txt = "res://resource/sprite/map/map1/website.txt"; + public const string resource_sprite_map_door1_down_png = "res://resource/sprite/map/door1_down.png"; + public const string resource_sprite_map_PreviewTransition_png = "res://resource/sprite/map/PreviewTransition.png"; + public const string resource_sprite_map_PreviewTransition2_png = "res://resource/sprite/map/PreviewTransition2.png"; + public const string resource_sprite_map_WallTransition1_png = "res://resource/sprite/map/WallTransition1.png"; + public const string resource_sprite_map_WallTransition2_png = "res://resource/sprite/map/WallTransition2.png"; + public const string resource_sprite_map_WallTransition3_png = "res://resource/sprite/map/WallTransition3.png"; public const string resource_sprite_prop_active_ActiveProp5000_png = "res://resource/sprite/prop/active/ActiveProp5000.png"; public const string resource_sprite_prop_active_ActiveProp5001_png = "res://resource/sprite/prop/active/ActiveProp5001.png"; public const string resource_sprite_prop_buff_BuffProp0001_png = "res://resource/sprite/prop/buff/BuffProp0001.png"; @@ -303,6 +310,7 @@ public const string scene_Main_tscn = "res://scene/Main.tscn"; public const string scene_World_tscn = "res://scene/World.tscn"; public const string scene_test_TestCommpont_tscn = "res://scene/test/TestCommpont.tscn"; + public const string scene_test_TestCreateSector_tscn = "res://scene/test/TestCreateSector.tscn"; public const string scene_test_TestExpression_tscn = "res://scene/test/TestExpression.tscn"; public const string scene_test_TestGenerateDungeon_tscn = "res://scene/test/TestGenerateDungeon.tscn"; public const string scene_test_TestNavigation2_tscn = "res://scene/test/TestNavigation2.tscn"; @@ -311,5 +319,6 @@ public const string scene_test_TestOptimizeSprite_tscn = "res://scene/test/TestOptimizeSprite.tscn"; public const string scene_test_TestOutline_tscn = "res://scene/test/TestOutline.tscn"; public const string scene_test_TestReadExcel_tscn = "res://scene/test/TestReadExcel.tscn"; + public const string scene_test_TestRoomFog_tscn = "res://scene/test/TestRoomFog.tscn"; public const string scene_test_TestTileLayer_tscn = "res://scene/test/TestTileLayer.tscn"; } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/SoundManager.cs b/DungeonShooting_Godot/src/game/manager/SoundManager.cs index bcf7ea4..679cb32 100644 --- a/DungeonShooting_Godot/src/game/manager/SoundManager.cs +++ b/DungeonShooting_Godot/src/game/manager/SoundManager.cs @@ -52,7 +52,7 @@ { if (_playingSoundResourceList.Contains(path)) { - GD.Print("重复播放: " + path); + Debug.Log("重复播放: " + path); } else { diff --git a/DungeonShooting_Godot/src/game/manager/SpecialEffectManager.cs b/DungeonShooting_Godot/src/game/manager/SpecialEffectManager.cs index c5e59bb..0d74206 100644 --- a/DungeonShooting_Godot/src/game/manager/SpecialEffectManager.cs +++ b/DungeonShooting_Godot/src/game/manager/SpecialEffectManager.cs @@ -41,6 +41,7 @@ /// /// 在场景指定位置播放一个特效, 特效必须是 SpriteFrames 类型 /// + /// 挂载的根节点 /// 特效SpriteFrames资源路径 /// 动画名称 /// 坐标 @@ -50,11 +51,11 @@ /// 层级 /// 播放速度 /// 循环次数, 到达该次数特效停止播放 - public static void Play(string path, string animName, Vector2 pos, float rotation, Vector2 scale, Vector2 offset, int zIndex = 0, float speed = 1, int loopCount = 1) + public static void Play(Node root, string path, string animName, Vector2 pos, float rotation, Vector2 scale, Vector2 offset, int zIndex = 0, float speed = 1, int loopCount = 1) { var spriteFrames = ResourceManager.Load(path); var specialEffect = new SpecialEffect(); - specialEffect.GlobalPosition = pos; + specialEffect.Position = pos; specialEffect.Rotation = rotation; specialEffect.Scale = scale; specialEffect.ZIndex = zIndex; @@ -63,6 +64,6 @@ specialEffect.LoopCount = loopCount; specialEffect.SpriteFrames = spriteFrames; specialEffect.Play(animName); - specialEffect.AddToActivityRoot(RoomLayerEnum.YSortLayer); + root.AddChild(specialEffect); } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs index 738391c..f6a415b 100644 --- a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs +++ b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs @@ -7,6 +7,7 @@ public static class UiName { public const string BottomTips = "BottomTips"; + public const string Debugger = "Debugger"; public const string EditorTips = "EditorTips"; public const string EditorTools = "EditorTools"; public const string EditorWindow = "EditorWindow"; @@ -22,7 +23,9 @@ public const string MapEditorProject = "MapEditorProject"; public const string MapEditorSelectObject = "MapEditorSelectObject"; public const string MapEditorTools = "MapEditorTools"; + public const string PauseMenu = "PauseMenu"; public const string RoomUI = "RoomUI"; + public const string Setting = "Setting"; public const string Settlement = "Settlement"; } @@ -75,6 +78,54 @@ } /// + /// 创建 Debugger, 并返回UI实例, 该函数不会打开 Ui + /// + public static UI.Debugger.DebuggerPanel Create_Debugger() + { + return CreateUi(UiName.Debugger); + } + + /// + /// 打开 Debugger, 并返回UI实例 + /// + public static UI.Debugger.DebuggerPanel Open_Debugger() + { + return OpenUi(UiName.Debugger); + } + + /// + /// 隐藏 Debugger 的所有实例 + /// + public static void Hide_Debugger() + { + var uiInstance = Get_Debugger_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.HideUi(); + } + } + + /// + /// 销毁 Debugger 的所有实例 + /// + public static void Destroy_Debugger() + { + var uiInstance = Get_Debugger_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.Destroy(); + } + } + + /// + /// 获取所有 Debugger 的实例, 如果没有实例, 则返回一个空数组 + /// + public static UI.Debugger.DebuggerPanel[] Get_Debugger_Instance() + { + return GetUiInstance(nameof(UI.Debugger.Debugger)); + } + + /// /// 创建 EditorTips, 并返回UI实例, 该函数不会打开 Ui /// public static UI.EditorTips.EditorTipsPanel Create_EditorTips() @@ -795,6 +846,54 @@ } /// + /// 创建 PauseMenu, 并返回UI实例, 该函数不会打开 Ui + /// + public static UI.PauseMenu.PauseMenuPanel Create_PauseMenu() + { + return CreateUi(UiName.PauseMenu); + } + + /// + /// 打开 PauseMenu, 并返回UI实例 + /// + public static UI.PauseMenu.PauseMenuPanel Open_PauseMenu() + { + return OpenUi(UiName.PauseMenu); + } + + /// + /// 隐藏 PauseMenu 的所有实例 + /// + public static void Hide_PauseMenu() + { + var uiInstance = Get_PauseMenu_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.HideUi(); + } + } + + /// + /// 销毁 PauseMenu 的所有实例 + /// + public static void Destroy_PauseMenu() + { + var uiInstance = Get_PauseMenu_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.Destroy(); + } + } + + /// + /// 获取所有 PauseMenu 的实例, 如果没有实例, 则返回一个空数组 + /// + public static UI.PauseMenu.PauseMenuPanel[] Get_PauseMenu_Instance() + { + return GetUiInstance(nameof(UI.PauseMenu.PauseMenu)); + } + + /// /// 创建 RoomUI, 并返回UI实例, 该函数不会打开 Ui /// public static UI.RoomUI.RoomUIPanel Create_RoomUI() @@ -843,6 +942,54 @@ } /// + /// 创建 Setting, 并返回UI实例, 该函数不会打开 Ui + /// + public static UI.Setting.SettingPanel Create_Setting() + { + return CreateUi(UiName.Setting); + } + + /// + /// 打开 Setting, 并返回UI实例 + /// + public static UI.Setting.SettingPanel Open_Setting() + { + return OpenUi(UiName.Setting); + } + + /// + /// 隐藏 Setting 的所有实例 + /// + public static void Hide_Setting() + { + var uiInstance = Get_Setting_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.HideUi(); + } + } + + /// + /// 销毁 Setting 的所有实例 + /// + public static void Destroy_Setting() + { + var uiInstance = Get_Setting_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.Destroy(); + } + } + + /// + /// 获取所有 Setting 的实例, 如果没有实例, 则返回一个空数组 + /// + public static UI.Setting.SettingPanel[] Get_Setting_Instance() + { + return GetUiInstance(nameof(UI.Setting.Setting)); + } + + /// /// 创建 Settlement, 并返回UI实例, 该函数不会打开 Ui /// public static UI.Settlement.SettlementPanel Create_Settlement() diff --git a/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs b/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs index 07bcf9d..968d8f3 100644 --- a/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs +++ b/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs @@ -22,6 +22,8 @@ public TileCellInfo OUT_RT = new TileCellInfo(0, new Vector2I(3, 2)); public TileCellInfo OUT_RB = new TileCellInfo(0, new Vector2I(3, 7)); + public TileCellInfo WALL_BLOCK = new TileCellInfo(0, new Vector2I(2, 3)); + private List _middleLayerAtlasCoords = new List() { new Vector2I(1, 6), diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index 7655681..822e63e 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -43,16 +43,22 @@ /// 当前使用的世界对象 /// public World World { get; private set; } + + /// + /// 自动图块配置 + /// + public AutoTileConfig AutoTileConfig { get; private set; } private UiBase _prevUi; private DungeonTileMap _dungeonTileMap; - private AutoTileConfig _autoTileConfig; private DungeonGenerator _dungeonGenerator; //房间内所有静态导航网格数据 private List _roomStaticNavigationList; //用于检查房间敌人的计时器 private float _checkEnemyTimer = 0; + //用于记录玩家上一个所在区域 + private AffiliationArea _affiliationAreaFlag; public DungeonManager() @@ -72,7 +78,6 @@ GameApplication.Instance.StartCoroutine(RunLoadDungeonCoroutine(finish)); } - /// /// 重启地牢 /// @@ -152,6 +157,24 @@ { if (IsInDungeon) { + if (World.Pause) //已经暂停 + { + return; + } + + //暂停游戏 + if (Input.IsActionJustPressed("ui_cancel")) + { + World.Pause = true; + //鼠标改为Ui鼠标 + GameApplication.Instance.Cursor.SetGuiMode(true); + //打开暂停Ui + UiManager.Open_PauseMenu(); + } + + //更新迷雾 + FogMaskHandler.Update(); + _checkEnemyTimer += (float)delta; if (_checkEnemyTimer >= 1) { @@ -177,17 +200,18 @@ yield return 0; //创建世界场景 World = GameApplication.Instance.CreateNewWorld(); - yield return new WaitForFixedProcess(10); + yield return 0; //生成地牢房间 - _dungeonGenerator = new DungeonGenerator(CurrConfig); + var random = new SeedRandom(); + _dungeonGenerator = new DungeonGenerator(CurrConfig, random); _dungeonGenerator.Generate(); yield return 0; //填充地牢 - _autoTileConfig = new AutoTileConfig(); + AutoTileConfig = new AutoTileConfig(); _dungeonTileMap = new DungeonTileMap(World.TileRoot); - _dungeonTileMap.AutoFillRoomTile(_autoTileConfig, _dungeonGenerator.StartRoomInfo, _dungeonGenerator.Random); - yield return 0; + yield return _dungeonTileMap.AutoFillRoomTile(AutoTileConfig, _dungeonGenerator.StartRoomInfo, random); + yield return _dungeonTileMap.AddOutlineTile(AutoTileConfig.WALL_BLOCK); //生成寻路网格, 这一步操作只生成过道的导航 _dungeonTileMap.GenerateNavigationPolygon(GameConfig.AisleFloorMapLayer); @@ -201,14 +225,15 @@ yield return 0; //门导航区域数据 _roomStaticNavigationList.AddRange(_dungeonTileMap.GetConnectDoorPolygonData()); - yield return new WaitForFixedProcess(10); //初始化所有房间 - _dungeonGenerator.EachRoom(InitRoom); - yield return new WaitForFixedProcess(10); + yield return _dungeonGenerator.EachRoomCoroutine(InitRoom); //播放bgm //SoundManager.PlayMusic(ResourcePath.resource_sound_bgm_Intro_ogg, -17f); + //地牢加载即将完成 + yield return _dungeonGenerator.EachRoomCoroutine(info => info.OnReady()); + //初始房间创建玩家标记 var playerBirthMark = StartRoomInfo.RoomPreinstall.GetPlayerBirthMark(); //创建玩家 @@ -221,9 +246,7 @@ player.Name = "Player"; player.PutDown(RoomLayerEnum.YSortLayer); Player.SetCurrentPlayer(player); - - //地牢加载即将完成 - _dungeonGenerator.EachRoom(info => info.OnReady()); + yield return 0; //玩家手上添加武器 //player.PickUpWeapon(ActivityObject.Create(ActivityObject.Ids.Id_weapon0001)); @@ -255,6 +278,7 @@ } } + //执行退出地牢流程 private IEnumerator RunExitDungeonCoroutine(Action finish) { //打开 loading UI @@ -265,17 +289,18 @@ _dungeonGenerator.EachRoom(DisposeRoomInfo); yield return 0; _dungeonTileMap = null; - _autoTileConfig = null; + AutoTileConfig = null; _dungeonGenerator = null; _roomStaticNavigationList.Clear(); _roomStaticNavigationList = null; UiManager.Hide_RoomUI(); - yield return new WaitForFixedProcess(10); + yield return 0; Player.SetCurrentPlayer(null); World = null; GameApplication.Instance.DestroyWorld(); - yield return new WaitForFixedProcess(10); + yield return 0; + FogMaskHandler.ClearRecordRoom(); QueueRedraw(); //鼠标还原 GameApplication.Instance.Cursor.SetGuiMode(true); @@ -293,6 +318,7 @@ // 初始化房间 private void InitRoom(RoomInfo roomInfo) { + roomInfo.CalcOuterRange(); //挂载房间导航区域 MountNavFromRoomInfo(roomInfo); //创建门 @@ -301,6 +327,8 @@ CreateRoomAffiliation(roomInfo); //创建静态精灵画布 CreateRoomStaticSpriteCanvas(roomInfo); + //创建迷雾遮罩 + CreateRoomFogMask(roomInfo); } //挂载房间导航区域 @@ -375,8 +403,8 @@ { var affiliation = new AffiliationArea(); affiliation.Name = "AffiliationArea" + roomInfo.Id; - affiliation.Init(roomInfo, new Rect2( - roomInfo.GetWorldPosition() + new Vector2(GameConfig.TileCellSize, GameConfig.TileCellSize), + affiliation.Init(roomInfo, new Rect2I( + roomInfo.GetWorldPosition() + GameConfig.TileCellSizeVector2I, (roomInfo.Size - new Vector2I(2, 2)) * GameConfig.TileCellSize)); roomInfo.AffiliationArea = affiliation; @@ -387,92 +415,13 @@ private void CreateRoomStaticSpriteCanvas(RoomInfo roomInfo) { var worldPos = roomInfo.GetWorldPosition(); - var pos = new Vector2I((int)worldPos.X, (int)worldPos.Y); - - int minX = pos.X; - int minY = pos.Y; - int maxX = minX + roomInfo.GetWidth(); - int maxY = minY + roomInfo.GetHeight(); + var rect = roomInfo.OuterRange; - //遍历每一个连接的门, 计算计算canvas覆盖范围 - foreach (var doorInfo in roomInfo.Doors) - { - var connectDoor = doorInfo.ConnectDoor; - switch (connectDoor.Direction) - { - case DoorDirection.E: - case DoorDirection.W: - { - var (px1, py1) = connectDoor.GetWorldOriginPosition(); - var py2 = py1 + 4 * GameConfig.TileCellSize; - if (px1 < minX) - { - minX = px1; - } - else if (px1 > maxX) - { - maxX = px1; - } + int minX = rect.Position.X - GameConfig.TileCellSize; + int minY = rect.Position.Y - GameConfig.TileCellSize; + int maxX = rect.End.X + GameConfig.TileCellSize; + int maxY = rect.End.Y + GameConfig.TileCellSize; - if (py1 < minY) - { - minY = py1; - } - else if (py1 > maxY) - { - maxY = py1; - } - - if (py2 < minY) - { - minY = py2; - } - else if (py2 > maxY) - { - maxY = py2; - } - } - break; - case DoorDirection.S: - case DoorDirection.N: - { - var (px1, py1) = connectDoor.GetWorldOriginPosition(); - var px2 = px1 + 4 * GameConfig.TileCellSize; - if (px1 < minX) - { - minX = px1; - } - else if (px1 > maxX) - { - maxX = px1; - } - - if (py1 < minY) - { - minY = py1; - } - else if (py1 > maxY) - { - maxY = py1; - } - - if (px2 < minX) - { - minX = px2; - } - else if (px2 > maxX) - { - maxX = px2; - } - } - break; - } - } - - minX -= GameConfig.TileCellSize; - minY -= GameConfig.TileCellSize; - maxX += GameConfig.TileCellSize; - maxY += GameConfig.TileCellSize; var staticSpriteCanvas = new RoomStaticImageCanvas( World.StaticSpriteRoot, new Vector2I(minX, minY), @@ -482,6 +431,117 @@ roomInfo.StaticImageCanvas = staticSpriteCanvas; } + //创建迷雾遮罩 + private void CreateRoomFogMask(RoomInfo roomInfo) + { + var roomFog = new FogMask(); + roomFog.Name = "FogMask" + roomFog.IsDestroyed; + roomFog.InitFog(roomInfo.Position, roomInfo.Size); + + World.FogMaskRoot.AddChild(roomFog); + roomInfo.RoomFogMask = roomFog; + + //生成通道迷雾 + foreach (var roomDoorInfo in roomInfo.Doors) + { + //必须是正向门 + if (roomDoorInfo.IsForward) + { + Rect2I calcRect; + Rect2I fogAreaRect; + if (!roomDoorInfo.HasCross) + { + calcRect = roomDoorInfo.GetAisleRect(); + fogAreaRect = calcRect; + if (roomDoorInfo.Direction == DoorDirection.E || roomDoorInfo.Direction == DoorDirection.W) + { + calcRect.Position += new Vector2I(2, 0); + calcRect.Size -= new Vector2I(4, 0); + } + else + { + calcRect.Position += new Vector2I(0, 2); + calcRect.Size -= new Vector2I(0, 4); + } + } + else + { + var aisleRect = roomDoorInfo.GetCrossAisleRect(); + calcRect = aisleRect.CalcAisleRect(); + fogAreaRect = calcRect; + + switch (roomDoorInfo.Direction) + { + case DoorDirection.E: + calcRect.Position += new Vector2I(2, 0); + calcRect.Size -= new Vector2I(2, 0); + break; + case DoorDirection.W: + calcRect.Size -= new Vector2I(2, 0); + break; + case DoorDirection.S: + calcRect.Position += new Vector2I(0, 2); + calcRect.Size -= new Vector2I(0, 2); + break; + case DoorDirection.N: + calcRect.Size -= new Vector2I(0, 2); + break; + } + + switch (roomDoorInfo.ConnectDoor.Direction) + { + case DoorDirection.E: + calcRect.Position += new Vector2I(2, 0); + calcRect.Size -= new Vector2I(2, 0); + break; + case DoorDirection.W: + calcRect.Size -= new Vector2I(2, 0); + break; + case DoorDirection.S: + calcRect.Position += new Vector2I(0, 2); + calcRect.Size -= new Vector2I(0, 2); + break; + case DoorDirection.N: + calcRect.Size -= new Vector2I(0, 2); + break; + } + } + + //过道迷雾遮罩 + var aisleFog = new FogMask(); + aisleFog.InitFog(calcRect.Position, calcRect.Size); + World.FogMaskRoot.AddChild(aisleFog); + roomDoorInfo.AisleFogMask = aisleFog; + roomDoorInfo.ConnectDoor.AisleFogMask = aisleFog; + + //过道迷雾区域 + var fogArea = new AisleFogArea(); + fogArea.Init(roomDoorInfo, + new Rect2I( + fogAreaRect.Position * GameConfig.TileCellSize, + fogAreaRect.Size * GameConfig.TileCellSize + ) + ); + roomDoorInfo.AisleFogArea = fogArea; + roomDoorInfo.ConnectDoor.AisleFogArea = fogArea; + World.AffiliationAreaRoot.AddChild(fogArea); + } + + //预览迷雾区域 + var previewRoomFog = new PreviewFogMask(); + roomDoorInfo.PreviewRoomFogMask = previewRoomFog; + previewRoomFog.Init(roomDoorInfo, PreviewFogMask.PreviewFogType.Room); + previewRoomFog.SetActive(false); + World.FogMaskRoot.AddChild(previewRoomFog); + + var previewAisleFog = new PreviewFogMask(); + roomDoorInfo.PreviewAisleFogMask = previewAisleFog; + previewAisleFog.Init(roomDoorInfo, PreviewFogMask.PreviewFogType.Aisle); + previewAisleFog.SetActive(false); + World.FogMaskRoot.AddChild(previewAisleFog); + } + } + /// /// 玩家第一次进入某个房间回调 /// @@ -512,6 +572,17 @@ /// private void OnPlayerEnterRoom(object o) { + var roomInfo = (RoomInfo)o; + if (_affiliationAreaFlag != roomInfo.AffiliationArea) + { + if (!roomInfo.AffiliationArea.IsDestroyed) + { + //刷新迷雾 + FogMaskHandler.RefreshRoomFog(roomInfo); + } + + _affiliationAreaFlag = roomInfo.AffiliationArea; + } } /// @@ -530,7 +601,7 @@ var flag = ActiveAffiliationArea.ExistEnterItem( activityObject => activityObject.CollisionWithMask(PhysicsLayer.Enemy) ); - //GD.Print("当前房间存活数量: " + count); + //Debug.Log("当前房间存活数量: " + count); if (!flag) { activeRoom.OnClearRoom(); @@ -591,7 +662,7 @@ //绘制房间区域, debug 用 private void DrawRoomInfo(RoomInfo roomInfo) { - var cellSize = World.TileRoot.CellQuadrantSize; + var cellSize = GameConfig.TileCellSize; var pos1 = (roomInfo.Position + roomInfo.Size / 2) * cellSize; //绘制下一个房间 diff --git a/DungeonShooting_Godot/src/game/room/World.cs b/DungeonShooting_Godot/src/game/room/World.cs index 622803c..00ca2eb 100644 --- a/DungeonShooting_Godot/src/game/room/World.cs +++ b/DungeonShooting_Godot/src/game/room/World.cs @@ -1,12 +1,18 @@ +using System.Collections; using System.Collections.Generic; using Godot; /// /// 游戏世界 /// -public partial class World : Node2D +public partial class World : CanvasModulate, ICoroutine { /// + /// 当前的游戏世界对象 + /// + public static World Current => GameApplication.Instance.World; + + /// /// //对象根节点 /// [Export] public Node2D NormalLayer; @@ -23,6 +29,7 @@ [Export] public Node2D StaticSpriteRoot; [Export] public Node2D AffiliationAreaRoot; + [Export] public Node2D FogMaskRoot; /// /// 是否暂停 @@ -73,12 +80,27 @@ public Vector2 Enemy_FindTargetPosition { get; set; } private bool _pause = false; - + private List _coroutineList; + public override void _Ready() { + //临时处理, 加载TileSet + var tileSet = ResourceManager.Load(ResourcePath.resource_map_tileSet_map1_TileSet1_tres); + var tileSetAtlasSource = (TileSetAtlasSource)tileSet.GetSource(0); + tileSetAtlasSource.Texture = ImageTexture.CreateFromImage(Image.LoadFromFile("resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png")); + TileRoot.TileSet = tileSet; TileRoot.YSortEnabled = false; } + public override void _Process(double delta) + { + //协程更新 + if (_coroutineList != null) + { + ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, (float)delta); + } + } + /// /// 获取指定层级根节点 /// @@ -95,4 +117,23 @@ return null; } + public long StartCoroutine(IEnumerator able) + { + return ProxyCoroutineHandler.ProxyStartCoroutine(ref _coroutineList, able); + } + + public void StopCoroutine(long coroutineId) + { + ProxyCoroutineHandler.ProxyStopCoroutine(ref _coroutineList, coroutineId); + } + + public bool IsCoroutineOver(long coroutineId) + { + return ProxyCoroutineHandler.ProxyIsCoroutineOver(ref _coroutineList, coroutineId); + } + + public void StopAllCoroutine() + { + ProxyCoroutineHandler.ProxyStopAllCoroutine(ref _coroutineList); + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/ui/debugger/Debugger.cs b/DungeonShooting_Godot/src/game/ui/debugger/Debugger.cs new file mode 100644 index 0000000..e63e0d4 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/debugger/Debugger.cs @@ -0,0 +1,181 @@ +namespace UI.Debugger; + +/// +/// Ui代码, 该类是根据ui场景自动生成的, 请不要手动编辑该类, 以免造成代码丢失 +/// +public abstract partial class Debugger : UiBase +{ + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Debugger.Bg + /// + public Bg L_Bg + { + get + { + if (_L_Bg == null) _L_Bg = new Bg((DebuggerPanel)this, GetNode("Bg")); + return _L_Bg; + } + } + private Bg _L_Bg; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Debugger.HoverButton + /// + public HoverButton L_HoverButton + { + get + { + if (_L_HoverButton == null) _L_HoverButton = new HoverButton((DebuggerPanel)this, GetNode("HoverButton")); + return _L_HoverButton; + } + } + private HoverButton _L_HoverButton; + + + public Debugger() : base(nameof(Debugger)) + { + } + + public sealed override void OnInitNestedUi() + { + + } + + /// + /// 类型: , 路径: Debugger.Bg.Clear + /// + public class Clear : UiNode + { + public Clear(DebuggerPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Clear Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Debugger.Bg.Close + /// + public class Close : UiNode + { + public Close(DebuggerPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Close Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Debugger.Bg.ScrollContainer.Label + /// + public class Label : UiNode + { + public Label(DebuggerPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Debugger.Bg.ScrollContainer + /// + public class ScrollContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Debugger.Bg.Label + /// + public Label L_Label + { + get + { + if (_L_Label == null) _L_Label = new Label(UiPanel, Instance.GetNode("Label")); + return _L_Label; + } + } + private Label _L_Label; + + public ScrollContainer(DebuggerPanel uiPanel, Godot.ScrollContainer node) : base(uiPanel, node) { } + public override ScrollContainer Clone() => new (UiPanel, (Godot.ScrollContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Debugger.Bg + /// + public class Bg : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Debugger.Clear + /// + public Clear L_Clear + { + get + { + if (_L_Clear == null) _L_Clear = new Clear(UiPanel, Instance.GetNode("Clear")); + return _L_Clear; + } + } + private Clear _L_Clear; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Debugger.Close + /// + public Close L_Close + { + get + { + if (_L_Close == null) _L_Close = new Close(UiPanel, Instance.GetNode("Close")); + return _L_Close; + } + } + private Close _L_Close; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Debugger.ScrollContainer + /// + public ScrollContainer L_ScrollContainer + { + get + { + if (_L_ScrollContainer == null) _L_ScrollContainer = new ScrollContainer(UiPanel, Instance.GetNode("ScrollContainer")); + return _L_ScrollContainer; + } + } + private ScrollContainer _L_ScrollContainer; + + public Bg(DebuggerPanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override Bg Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Debugger.HoverButton + /// + public class HoverButton : UiNode + { + public HoverButton(DebuggerPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override HoverButton Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Debugger.Bg.Clear + /// + public Clear S_Clear => L_Bg.L_Clear; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Debugger.Bg.Close + /// + public Close S_Close => L_Bg.L_Close; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Debugger.Bg.ScrollContainer.Label + /// + public Label S_Label => L_Bg.L_ScrollContainer.L_Label; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Debugger.Bg.ScrollContainer + /// + public ScrollContainer S_ScrollContainer => L_Bg.L_ScrollContainer; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Debugger.Bg + /// + public Bg S_Bg => L_Bg; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Debugger.HoverButton + /// + public HoverButton S_HoverButton => L_HoverButton; + +} diff --git a/DungeonShooting_Godot/src/game/ui/debugger/DebuggerPanel.cs b/DungeonShooting_Godot/src/game/ui/debugger/DebuggerPanel.cs new file mode 100644 index 0000000..68d13f4 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/debugger/DebuggerPanel.cs @@ -0,0 +1,93 @@ +using Godot; + +namespace UI.Debugger; + +public partial class DebuggerPanel : Debugger +{ + private bool _showPanel = false; + private int _len = 0; + private bool _isDown = false; + private Vector2 _offset; + private Vector2 _prevPos; + private bool _moveFlag; + + public override void OnCreateUi() + { + S_Bg.Instance.Visible = false; + + S_HoverButton.Instance.Pressed += OnClickHoverButton; + S_HoverButton.Instance.ButtonDown += OnMouseDown; + S_HoverButton.Instance.ButtonUp += OnMouseUp; + + S_Clear.Instance.Pressed += OnClear; + S_Close.Instance.Pressed += OnClose; + } + + public override void OnDestroyUi() + { + + } + + public override void Process(float delta) + { + if (_showPanel) + { + if (Debug.AllLogMessage.Length != _len) + { + S_Label.Instance.Text = Debug.AllLogMessage; + _len = Debug.AllLogMessage.Length; + } + } + else + { + if (_isDown) + { + var temp = GetGlobalMousePosition() - _offset; + if (temp != _prevPos) + { + _moveFlag = true; + _prevPos = temp; + S_HoverButton.Instance.GlobalPosition = temp; + } + } + } + } + + private void OnMouseDown() + { + _isDown = true; + _moveFlag = false; + _prevPos = S_HoverButton.Instance.GlobalPosition; + _offset = GetGlobalMousePosition() - _prevPos; + } + + private void OnMouseUp() + { + _isDown = false; + } + + private void OnClickHoverButton() + { + if (_moveFlag) + { + return; + } + _showPanel = true; + S_Bg.Instance.Visible = _showPanel; + S_HoverButton.Instance.Visible = false; + } + + private void OnClear() + { + Debug.Clear(); + S_Label.Instance.Text = ""; + _len = 0; + } + + private void OnClose() + { + _showPanel = false; + S_Bg.Instance.Visible = _showPanel; + S_HoverButton.Instance.Visible = true; + } +} diff --git a/DungeonShooting_Godot/src/game/ui/main/Main.cs b/DungeonShooting_Godot/src/game/ui/main/Main.cs index fe49dfb..779be78 100644 --- a/DungeonShooting_Godot/src/game/ui/main/Main.cs +++ b/DungeonShooting_Godot/src/game/ui/main/Main.cs @@ -6,198 +6,257 @@ public abstract partial class Main : UiBase { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.Title + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.ColorRect /// - public Main_Title L_Title + public ColorRect L_ColorRect { get { - if (_L_Title == null) _L_Title = new Main_Title(this, GetNodeOrNull("Title")); - return _L_Title; + if (_L_ColorRect == null) _L_ColorRect = new ColorRect((MainPanel)this, GetNode("ColorRect")); + return _L_ColorRect; } } - private Main_Title _L_Title; + private ColorRect _L_ColorRect; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.ButtonList + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.VBoxContainer /// - public Main_ButtonList L_ButtonList + public VBoxContainer L_VBoxContainer { get { - if (_L_ButtonList == null) _L_ButtonList = new Main_ButtonList(this, GetNodeOrNull("ButtonList")); - return _L_ButtonList; + if (_L_VBoxContainer == null) _L_VBoxContainer = new VBoxContainer((MainPanel)this, GetNode("VBoxContainer")); + return _L_VBoxContainer; } } - private Main_ButtonList _L_ButtonList; + private VBoxContainer _L_VBoxContainer; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.Version /// - public Main_Version L_Version + public Version L_Version { get { - if (_L_Version == null) _L_Version = new Main_Version(this, GetNodeOrNull("Version")); + if (_L_Version == null) _L_Version = new Version((MainPanel)this, GetNode("Version")); return _L_Version; } } - private Main_Version _L_Version; + private Version _L_Version; public Main() : base(nameof(Main)) { } - /// - /// 类型: , 路径: Main.Title - /// - public class Main_Title : UiNode + public sealed override void OnInitNestedUi() { - public Main_Title(Main uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override Main_Title Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } /// - /// 类型: , 路径: Main.ButtonList.Start + /// 类型: , 路径: Main.ColorRect /// - public class Main_Start : UiNode + public class ColorRect : UiNode { - public Main_Start(Main uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override Main_Start Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public ColorRect(MainPanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override ColorRect Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); } /// - /// 类型: , 路径: Main.ButtonList.Tools + /// 类型: , 路径: Main.VBoxContainer.Title /// - public class Main_Tools : UiNode + public class Title : UiNode { - public Main_Tools(Main uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override Main_Tools Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public Title(MainPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Title Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// - /// 类型: , 路径: Main.ButtonList.Setting + /// 类型: , 路径: Main.VBoxContainer.ButtonList.Start /// - public class Main_Setting : UiNode + public class Start : UiNode { - public Main_Setting(Main uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override Main_Setting Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public Start(MainPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Start Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// - /// 类型: , 路径: Main.ButtonList.Exit + /// 类型: , 路径: Main.VBoxContainer.ButtonList.Tools /// - public class Main_Exit : UiNode + public class Tools : UiNode { - public Main_Exit(Main uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override Main_Exit Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public Tools(MainPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Tools Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// - /// 类型: , 路径: Main.ButtonList + /// 类型: , 路径: Main.VBoxContainer.ButtonList.Setting /// - public class Main_ButtonList : UiNode + public class Setting : UiNode + { + public Setting(MainPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Setting Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Main.VBoxContainer.ButtonList.Exit + /// + public class Exit : UiNode + { + public Exit(MainPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Exit Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Main.VBoxContainer.ButtonList + /// + public class ButtonList : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.Start + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.VBoxContainer.Start /// - public Main_Start L_Start + public Start L_Start { get { - if (_L_Start == null) _L_Start = new Main_Start(UiPanel, Instance.GetNodeOrNull("Start")); + if (_L_Start == null) _L_Start = new Start(UiPanel, Instance.GetNode("Start")); return _L_Start; } } - private Main_Start _L_Start; + private Start _L_Start; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.Tools + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.VBoxContainer.Tools /// - public Main_Tools L_Tools + public Tools L_Tools { get { - if (_L_Tools == null) _L_Tools = new Main_Tools(UiPanel, Instance.GetNodeOrNull("Tools")); + if (_L_Tools == null) _L_Tools = new Tools(UiPanel, Instance.GetNode("Tools")); return _L_Tools; } } - private Main_Tools _L_Tools; + private Tools _L_Tools; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.Setting + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.VBoxContainer.Setting /// - public Main_Setting L_Setting + public Setting L_Setting { get { - if (_L_Setting == null) _L_Setting = new Main_Setting(UiPanel, Instance.GetNode("Setting")); + if (_L_Setting == null) _L_Setting = new Setting(UiPanel, Instance.GetNode("Setting")); return _L_Setting; } } - private Main_Setting _L_Setting; + private Setting _L_Setting; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.Exit + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.VBoxContainer.Exit /// - public Main_Exit L_Exit + public Exit L_Exit { get { - if (_L_Exit == null) _L_Exit = new Main_Exit(UiPanel, Instance.GetNodeOrNull("Exit")); + if (_L_Exit == null) _L_Exit = new Exit(UiPanel, Instance.GetNode("Exit")); return _L_Exit; } } - private Main_Exit _L_Exit; + private Exit _L_Exit; - public Main_ButtonList(Main uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } - public override Main_ButtonList Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); + public ButtonList(MainPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override ButtonList Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Main.VBoxContainer + /// + public class VBoxContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.Title + /// + public Title L_Title + { + get + { + if (_L_Title == null) _L_Title = new Title(UiPanel, Instance.GetNode("Title")); + return _L_Title; + } + } + private Title _L_Title; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Main.ButtonList + /// + public ButtonList L_ButtonList + { + get + { + if (_L_ButtonList == null) _L_ButtonList = new ButtonList(UiPanel, Instance.GetNode("ButtonList")); + return _L_ButtonList; + } + } + private ButtonList _L_ButtonList; + + public VBoxContainer(MainPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override VBoxContainer Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: Main.Version /// - public class Main_Version : UiNode + public class Version : UiNode { - public Main_Version(Main uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override Main_Version Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + public Version(MainPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Version Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.Title + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.ColorRect /// - public Main_Title S_Title => L_Title; + public ColorRect S_ColorRect => L_ColorRect; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.ButtonList.Start + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.VBoxContainer.Title /// - public Main_Start S_Start => L_ButtonList.L_Start; + public Title S_Title => L_VBoxContainer.L_Title; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.ButtonList.Tools + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.VBoxContainer.ButtonList.Start /// - public Main_Tools S_Tools => L_ButtonList.L_Tools; + public Start S_Start => L_VBoxContainer.L_ButtonList.L_Start; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.ButtonList.Setting + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.VBoxContainer.ButtonList.Tools /// - public Main_Setting S_Setting => L_ButtonList.L_Setting; + public Tools S_Tools => L_VBoxContainer.L_ButtonList.L_Tools; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.ButtonList.Exit + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.VBoxContainer.ButtonList.Setting /// - public Main_Exit S_Exit => L_ButtonList.L_Exit; + public Setting S_Setting => L_VBoxContainer.L_ButtonList.L_Setting; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.ButtonList + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.VBoxContainer.ButtonList.Exit /// - public Main_ButtonList S_ButtonList => L_ButtonList; + public Exit S_Exit => L_VBoxContainer.L_ButtonList.L_Exit; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.VBoxContainer.ButtonList + /// + public ButtonList S_ButtonList => L_VBoxContainer.L_ButtonList; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.VBoxContainer + /// + public VBoxContainer S_VBoxContainer => L_VBoxContainer; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: Main.Version /// - public Main_Version S_Version => L_Version; + public Version S_Version => L_Version; } diff --git a/DungeonShooting_Godot/src/game/ui/main/MainPanel.cs b/DungeonShooting_Godot/src/game/ui/main/MainPanel.cs index 7435ea4..e84b0b3 100644 --- a/DungeonShooting_Godot/src/game/ui/main/MainPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/main/MainPanel.cs @@ -13,6 +13,7 @@ S_Start.Instance.Pressed += OnStartGameClick; S_Exit.Instance.Pressed += OnExitClick; S_Tools.Instance.Pressed += OnToolsClick; + S_Setting.Instance.Pressed += OnSettingClick; } //点击开始游戏 @@ -43,4 +44,10 @@ { OpenNextUi(UiManager.UiName.MapEditorProject); } + + //点击设置按钮 + private void OnSettingClick() + { + OpenNextUi(UiManager.UiName.Setting); + } } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditorPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditorPanel.cs index c5bc779..8b81907 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditorPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/MapEditorPanel.cs @@ -26,6 +26,12 @@ public override void OnCreateUi() { + //临时处理, 加载TileSet + var tileSet = ResourceManager.Load(ResourcePath.resource_map_tileSet_map1_TileSet1_tres); + var tileSetAtlasSource = (TileSetAtlasSource)tileSet.GetSource(0); + tileSetAtlasSource.Texture = ImageTexture.CreateFromImage(Image.LoadFromFile("resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png")); + S_TileMap.Instance.TileSet = tileSet; + S_TabContainer.Instance.SetTabTitle(0, "地图"); S_TabContainer.Instance.SetTabTitle(1, "对象"); //S_MapLayer.Instance.Init(S_MapLayer); diff --git a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs index e44a0b6..50c9957 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.IO; -using System.Text.Json; using Godot; using Godot.Collections; using UI.MapEditorTools; @@ -400,13 +398,13 @@ _isGenerateTerrain = false; //计算区域 CalcTileRect(false); - GD.Print("开始检测是否可以生成地形..."); + Debug.Log("开始检测是否可以生成地形..."); if (CheckTerrain()) { - GD.Print("开始绘制导航网格..."); + Debug.Log("开始绘制导航网格..."); if (GenerateNavigation()) { - GD.Print("开始绘制自动贴图..."); + Debug.Log("开始绘制自动贴图..."); GenerateTerrain(); _isGenerateTerrain = true; } @@ -452,7 +450,7 @@ /// public void TriggerSave(RoomErrorType errorType, Action finish) { - GD.Print("保存地牢房间数据..."); + Debug.Log("保存地牢房间数据..."); //执行创建预览图流程 RunSavePreviewImage(() => { @@ -770,7 +768,7 @@ } else { - GD.PrintErr($"异常图块: {pos}, 这个图块的图集坐标'{atlasCoords}'不属于'MiddleMapLayer'和'TopMapLayer'!"); + Debug.LogError($"异常图块: {pos}, 这个图块的图集坐标'{atlasCoords}'不属于'MiddleMapLayer'和'TopMapLayer'!"); continue; } EraseCell(AutoFloorLayer, pos); @@ -800,7 +798,7 @@ //设置显示的错误cell, 会标记上红色的闪烁动画 private void SetErrorCell(Vector2I pos) { - MapEditorPanel.S_ErrorCell.Instance.Position = pos * CellQuadrantSize; + MapEditorPanel.S_ErrorCell.Instance.Position = pos * GameConfig.TileCellSize; MapEditorPanel.S_ErrorCellAnimationPlayer.Instance.Play(AnimatorNames.Show); } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs index e4906be..41ed879 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs @@ -462,11 +462,11 @@ S_DynamicTool.Reparent(this); S_DynamicTool.Instance.Visible = false; var markCellIndex = markCell.Index; - var markInfo = waveCell.Data[markCellIndex]; + var markInfo = waveCell.MarkGrid.GetData(markCellIndex).MarkInfo; //派发移除标记事件 EventManager.EmitEvent(EventEnum.OnDeleteMark, markInfo); waveCell.MarkGrid.RemoveByIndex(markCellIndex); - waveCell.Data.RemoveAt(markCellIndex); + waveCell.Data.Remove(markInfo); //派发数据修改事件 EventManager.EmitEvent(EventEnum.OnEditorDirty); } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorProject/GroupButtonCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorProject/GroupButtonCell.cs index 39d83ee..b9ab1ed 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorProject/GroupButtonCell.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorProject/GroupButtonCell.cs @@ -17,7 +17,7 @@ public override void OnRefreshIndex() { - GD.Print("刷新索引: " + Index); + Debug.Log("刷新索引: " + Index); } //选中工程 diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorTools/DoorDragArea.cs b/DungeonShooting_Godot/src/game/ui/mapEditorTools/DoorDragArea.cs index f75311b..34b2d6f 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorTools/DoorDragArea.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorTools/DoorDragArea.cs @@ -185,7 +185,7 @@ { _areaSize = value; RefreshArea(); - //GD.Print("size: " + GetDoorAreaRange()); + //Debug.Log("size: " + GetDoorAreaRange()); } //刷新区域位置 @@ -418,7 +418,7 @@ var doorAreaRange = GetDoorAreaRange(); DoorAreaInfo.Start = doorAreaRange.X; DoorAreaInfo.End = doorAreaRange.Y; - GD.Print("提交修改: " + doorAreaRange); + Debug.Log("提交修改: " + doorAreaRange); //派发修改数据修改事件 EventManager.EmitEvent(EventEnum.OnEditorDirty); } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorTools/DoorHoverArea.cs b/DungeonShooting_Godot/src/game/ui/mapEditorTools/DoorHoverArea.cs index 21bca90..2fcfe26 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorTools/DoorHoverArea.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorTools/DoorHoverArea.cs @@ -73,7 +73,7 @@ private void OnSubmitDoorArea(DoorDirection direction, int start, int end) { IsDrag = false; - GD.Print("提交创建: " + direction + ", " + start + ", " + end); + Debug.Log("提交创建: " + direction + ", " + start + ", " + end); _currToolTemplate.Instance.DoorAreaInfo = MapEditorToolsPanel.EditorMap.Instance.CreateDoorArea(direction, start, end); //派发修改数据修改事件 EventManager.EmitEvent(EventEnum.OnEditorDirty); diff --git a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenu.cs b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenu.cs new file mode 100644 index 0000000..256a892 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenu.cs @@ -0,0 +1,154 @@ +namespace UI.PauseMenu; + +/// +/// Ui代码, 该类是根据ui场景自动生成的, 请不要手动编辑该类, 以免造成代码丢失 +/// +public abstract partial class PauseMenu : UiBase +{ + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: PauseMenu.ColorRect + /// + public ColorRect L_ColorRect + { + get + { + if (_L_ColorRect == null) _L_ColorRect = new ColorRect((PauseMenuPanel)this, GetNode("ColorRect")); + return _L_ColorRect; + } + } + private ColorRect _L_ColorRect; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: PauseMenu.VBoxContainer + /// + public VBoxContainer L_VBoxContainer + { + get + { + if (_L_VBoxContainer == null) _L_VBoxContainer = new VBoxContainer((PauseMenuPanel)this, GetNode("VBoxContainer")); + return _L_VBoxContainer; + } + } + private VBoxContainer _L_VBoxContainer; + + + public PauseMenu() : base(nameof(PauseMenu)) + { + } + + public sealed override void OnInitNestedUi() + { + + } + + /// + /// 类型: , 路径: PauseMenu.ColorRect + /// + public class ColorRect : UiNode + { + public ColorRect(PauseMenuPanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override ColorRect Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: PauseMenu.VBoxContainer.Continue + /// + public class Continue : UiNode + { + public Continue(PauseMenuPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Continue Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: PauseMenu.VBoxContainer.Restart + /// + public class Restart : UiNode + { + public Restart(PauseMenuPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Restart Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: PauseMenu.VBoxContainer.Exit + /// + public class Exit : UiNode + { + public Exit(PauseMenuPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Exit Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: PauseMenu.VBoxContainer + /// + public class VBoxContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: PauseMenu.Continue + /// + public Continue L_Continue + { + get + { + if (_L_Continue == null) _L_Continue = new Continue(UiPanel, Instance.GetNode("Continue")); + return _L_Continue; + } + } + private Continue _L_Continue; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: PauseMenu.Restart + /// + public Restart L_Restart + { + get + { + if (_L_Restart == null) _L_Restart = new Restart(UiPanel, Instance.GetNode("Restart")); + return _L_Restart; + } + } + private Restart _L_Restart; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: PauseMenu.Exit + /// + public Exit L_Exit + { + get + { + if (_L_Exit == null) _L_Exit = new Exit(UiPanel, Instance.GetNode("Exit")); + return _L_Exit; + } + } + private Exit _L_Exit; + + public VBoxContainer(PauseMenuPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override VBoxContainer Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); + } + + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: PauseMenu.ColorRect + /// + public ColorRect S_ColorRect => L_ColorRect; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: PauseMenu.VBoxContainer.Continue + /// + public Continue S_Continue => L_VBoxContainer.L_Continue; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: PauseMenu.VBoxContainer.Restart + /// + public Restart S_Restart => L_VBoxContainer.L_Restart; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: PauseMenu.VBoxContainer.Exit + /// + public Exit S_Exit => L_VBoxContainer.L_Exit; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: PauseMenu.VBoxContainer + /// + public VBoxContainer S_VBoxContainer => L_VBoxContainer; + +} diff --git a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs new file mode 100644 index 0000000..19e06a1 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs @@ -0,0 +1,66 @@ +using Godot; + +namespace UI.PauseMenu; + +public partial class PauseMenuPanel : PauseMenu +{ + + public override void OnCreateUi() + { + S_Continue.Instance.Pressed += OnContinueClick; + S_Restart.Instance.Pressed += OnRestartClick; + S_Exit.Instance.Pressed += OnExitClick; + + if (GameApplication.Instance.DungeonManager.IsEditorMode) //在编辑器模式下打开的Ui + { + S_Exit.Instance.Text = "返回编辑器"; + } + } + + public override void Process(float delta) + { + if (Input.IsActionJustPressed("ui_cancel")) //返回游戏 + { + OnContinueClick(); + } + } + + //继续游戏 + private void OnContinueClick() + { + GameApplication.Instance.World.Pause = false; + GameApplication.Instance.Cursor.SetGuiMode(false); + Destroy(); + } + + //重新开始 + private void OnRestartClick() + { + Destroy(); + if (GameApplication.Instance.DungeonManager.IsEditorMode) //在编辑器模式下打开的Ui + { + EditorPlayManager.Restart(); + } + else //正常重新开始 + { + GameApplication.Instance.DungeonManager.RestartDungeon(GameApplication.Instance.DungeonConfig); + } + } + + //退出地牢 + private void OnExitClick() + { + Destroy(); + if (GameApplication.Instance.DungeonManager.IsEditorMode) //在编辑器模式下打开的Ui + { + EditorPlayManager.Exit(); + } + else //正常关闭Ui + { + GameApplication.Instance.DungeonManager.ExitDungeon(() => + { + UiManager.Open_Main(); + }); + } + } +} diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/LifeBar.cs b/DungeonShooting_Godot/src/game/ui/roomUI/LifeBar.cs index d56440f..f3dcbf3 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/LifeBar.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/LifeBar.cs @@ -55,7 +55,7 @@ var player = Player.Current; if (player.MaxHp % 2 != 0) { - GD.PrintErr("玩家血量不是偶数!"); + Debug.LogError("玩家血量不是偶数!"); } var list = new List(); diff --git a/DungeonShooting_Godot/src/game/ui/setting/Setting.cs b/DungeonShooting_Godot/src/game/ui/setting/Setting.cs new file mode 100644 index 0000000..e78d417 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/setting/Setting.cs @@ -0,0 +1,208 @@ +namespace UI.Setting; + +/// +/// Ui代码, 该类是根据ui场景自动生成的, 请不要手动编辑该类, 以免造成代码丢失 +/// +public abstract partial class Setting : UiBase +{ + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Setting.ColorRect + /// + public ColorRect L_ColorRect + { + get + { + if (_L_ColorRect == null) _L_ColorRect = new ColorRect((SettingPanel)this, GetNode("ColorRect")); + return _L_ColorRect; + } + } + private ColorRect _L_ColorRect; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Setting.Back + /// + public Back L_Back + { + get + { + if (_L_Back == null) _L_Back = new Back((SettingPanel)this, GetNode("Back")); + return _L_Back; + } + } + private Back _L_Back; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Setting.Title + /// + public Title L_Title + { + get + { + if (_L_Title == null) _L_Title = new Title((SettingPanel)this, GetNode("Title")); + return _L_Title; + } + } + private Title _L_Title; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Setting.VBoxContainer + /// + public VBoxContainer L_VBoxContainer + { + get + { + if (_L_VBoxContainer == null) _L_VBoxContainer = new VBoxContainer((SettingPanel)this, GetNode("VBoxContainer")); + return _L_VBoxContainer; + } + } + private VBoxContainer _L_VBoxContainer; + + + public Setting() : base(nameof(Setting)) + { + } + + public sealed override void OnInitNestedUi() + { + + } + + /// + /// 类型: , 路径: Setting.ColorRect + /// + public class ColorRect : UiNode + { + public ColorRect(SettingPanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override ColorRect Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Setting.Back + /// + public class Back : UiNode + { + public Back(SettingPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Back Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Setting.Title + /// + public class Title : UiNode + { + public Title(SettingPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Title Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Setting.VBoxContainer.FullScreen.Name + /// + public class Name : UiNode + { + public Name(SettingPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Name Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Setting.VBoxContainer.FullScreen.CheckBox + /// + public class CheckBox : UiNode + { + public CheckBox(SettingPanel uiPanel, Godot.CheckBox node) : base(uiPanel, node) { } + public override CheckBox Clone() => new (UiPanel, (Godot.CheckBox)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Setting.VBoxContainer.FullScreen + /// + public class FullScreen : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Setting.VBoxContainer.Name + /// + public Name L_Name + { + get + { + if (_L_Name == null) _L_Name = new Name(UiPanel, Instance.GetNode("Name")); + return _L_Name; + } + } + private Name _L_Name; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Setting.VBoxContainer.CheckBox + /// + public CheckBox L_CheckBox + { + get + { + if (_L_CheckBox == null) _L_CheckBox = new CheckBox(UiPanel, Instance.GetNode("CheckBox")); + return _L_CheckBox; + } + } + private CheckBox _L_CheckBox; + + public FullScreen(SettingPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override FullScreen Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Setting.VBoxContainer + /// + public class VBoxContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Setting.FullScreen + /// + public FullScreen L_FullScreen + { + get + { + if (_L_FullScreen == null) _L_FullScreen = new FullScreen(UiPanel, Instance.GetNode("FullScreen")); + return _L_FullScreen; + } + } + private FullScreen _L_FullScreen; + + public VBoxContainer(SettingPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override VBoxContainer Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); + } + + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Setting.ColorRect + /// + public ColorRect S_ColorRect => L_ColorRect; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Setting.Back + /// + public Back S_Back => L_Back; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Setting.Title + /// + public Title S_Title => L_Title; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Setting.VBoxContainer.FullScreen.Name + /// + public Name S_Name => L_VBoxContainer.L_FullScreen.L_Name; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Setting.VBoxContainer.FullScreen.CheckBox + /// + public CheckBox S_CheckBox => L_VBoxContainer.L_FullScreen.L_CheckBox; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Setting.VBoxContainer.FullScreen + /// + public FullScreen S_FullScreen => L_VBoxContainer.L_FullScreen; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Setting.VBoxContainer + /// + public VBoxContainer S_VBoxContainer => L_VBoxContainer; + +} diff --git a/DungeonShooting_Godot/src/game/ui/setting/SettingPanel.cs b/DungeonShooting_Godot/src/game/ui/setting/SettingPanel.cs new file mode 100644 index 0000000..3206947 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/setting/SettingPanel.cs @@ -0,0 +1,43 @@ +using Godot; + +namespace UI.Setting; + +public partial class SettingPanel : Setting +{ + + public override void OnCreateUi() + { + if (PrevUi != null) + { + //返回上一级UI + S_Back.Instance.Pressed += () => + { + OpenPrevUi(); + }; + } + + //全屏属性 + S_FullScreen.L_CheckBox.Instance.ButtonPressed = DisplayServer.WindowGetMode() == DisplayServer.WindowMode.Fullscreen; + S_FullScreen.L_CheckBox.Instance.Pressed += OnChangeFullScreen; + } + + public override void OnDestroyUi() + { + + } + + //切换全屏/非全屏 + private void OnChangeFullScreen() + { + var checkBox = S_FullScreen.L_CheckBox.Instance; + if (checkBox.ButtonPressed) + { + DisplayServer.WindowSetMode(DisplayServer.WindowMode.Fullscreen); + } + else + { + DisplayServer.WindowSetMode(DisplayServer.WindowMode.Windowed); + } + } + +} diff --git a/DungeonShooting_Godot/src/test/TestActivity.cs b/DungeonShooting_Godot/src/test/TestActivity.cs index f541b73..343aabf 100644 --- a/DungeonShooting_Godot/src/test/TestActivity.cs +++ b/DungeonShooting_Godot/src/test/TestActivity.cs @@ -22,26 +22,26 @@ protected override void OnFallToGround() { - GD.Print("OnFallToGround"); + Debug.Log("OnFallToGround"); } protected override void OnFirstFallToGround() { - GD.Print("OnFirstFallToGround"); + Debug.Log("OnFirstFallToGround"); } protected override void OnThrowStart() { - GD.Print("OnThrowStart"); + Debug.Log("OnThrowStart"); } protected override void OnThrowMaxHeight(float height) { - GD.Print("OnThrowMaxHeight: " + height); + Debug.Log("OnThrowMaxHeight: " + height); } protected override void OnThrowOver() { - GD.Print("OnThrowOver"); + Debug.Log("OnThrowOver"); } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/test/TestCreateSector.cs b/DungeonShooting_Godot/src/test/TestCreateSector.cs new file mode 100644 index 0000000..45e1232 --- /dev/null +++ b/DungeonShooting_Godot/src/test/TestCreateSector.cs @@ -0,0 +1,24 @@ +using Godot; +using System; + +public partial class TestCreateSector : Node2D +{ + + private CollisionPolygon2D _polygon2D; + + public override void _Ready() + { + GetNode("Area2D").AreaEntered += area => + { + Debug.Log("areaEnter: " + area.Name); + }; + + _polygon2D = GetNode("Area2D/CollisionPolygon2D"); + _polygon2D.Polygon = Utils.CreateSectorPolygon(90, 350, 160, 10); + } + + public override void _Process(double delta) + { + GetNode("Area2D2").GlobalPosition = GetGlobalMousePosition(); + } +} diff --git a/DungeonShooting_Godot/src/test/TestOptimizeSprite.cs b/DungeonShooting_Godot/src/test/TestOptimizeSprite.cs index 1c9b7e9..2d5b32c 100644 --- a/DungeonShooting_Godot/src/test/TestOptimizeSprite.cs +++ b/DungeonShooting_Godot/src/test/TestOptimizeSprite.cs @@ -46,7 +46,7 @@ // var centerX = texture.GetWidth() / 2; // var centerY = texture.GetHeight() / 2; // //var angle = Utils.RandomRangeInt(0, 360); - // //GD.Print($"x: {i}, y: {j}, angle: " + angle); + // //Debug.Log($"x: {i}, y: {j}, angle: " + angle); // imageCanvas.DrawImageInCanvas(texture, // 10 + i * 10, 10 + j * 10, // angle, centerX, centerY, false diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0ad25db --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/README.md b/README.md index ce4ec05..c25219d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -一款由Godot开发的地牢射击类型的游戏, 脚本语言使用的是C#, 当前项目使用的Godot版本: Godot_v4.1 +一款由Godot开发的地牢射击类型的游戏, 脚本语言使用的是C#, 当前项目使用的Godot版本: Godot_v4.2dev --- ### 游戏定义 @@ -13,6 +13,8 @@ 但本作与市面上常规地牢射击游戏不同的是, 玩家与敌人共用武器资源, 玩家击败敌人便可拾起敌人的武器, 并且更加注重环境互动要素 **游戏背景:** 构思中 +![gif](DungeonShooting_Document/文档资源/preview_gif.gif) + --- ### 启动项目 @@ -27,4 +29,5 @@ ### 其他 **开发日志:** [开发日志.md](DungeonShooting_Document/开发日志.md) **项目看板:** https://trello.com/b/a8UGxnTl/dungeonshooting -**哔哩哔哩:** https://space.bilibili.com/259437820 +**哔哩哔哩:** https://space.bilibili.com/259437820 +**项目Ui插件:** https://github.com/xlljc/Ds_Ui \ No newline at end of file