diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx index d69d19d..bc275f4 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 c0a8991..c589bfb 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 a0166bc..22ce387 100644 --- a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx Binary files differ diff --git a/DungeonShooting_Godot/prefab/prop/active/ActiveProp5001.tscn b/DungeonShooting_Godot/prefab/prop/active/ActiveProp5001.tscn new file mode 100644 index 0000000..3ae9891 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/active/ActiveProp5001.tscn @@ -0,0 +1,46 @@ +[gd_scene load_steps=7 format=3 uid="uid://dlf83ph0msl2l"] + +[ext_resource type="Script" path="res://src/game/activity/prop/active/ActiveProp5001.cs" id="1_klvlf"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_2cgdl"] +[ext_resource type="SpriteFrames" uid="uid://bbjyakayescy5" path="res://resource/spriteFrames/prop/active/ActiveProp5001.tres" id="3_fagk1"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_2cgdl") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_2cgdl") +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_cpqup"] +size = Vector2(12, 10) + +[node name="ActiveProp5001" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_klvlf") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_fagk1") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/project.godot b/DungeonShooting_Godot/project.godot index 5b792d1..e7f84b4 100644 --- a/DungeonShooting_Godot/project.godot +++ b/DungeonShooting_Godot/project.godot @@ -177,6 +177,11 @@ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":70,"physical_keycode":0,"key_label":0,"unicode":102,"echo":false,"script":null) ] } +removeProp={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":88,"physical_keycode":0,"key_label":0,"unicode":120,"echo":false,"script":null) +] +} [layer_names] diff --git a/DungeonShooting_Godot/resource/config/ActivityObject.json b/DungeonShooting_Godot/resource/config/ActivityObject.json index 9f8f938..953ac5c 100644 --- a/DungeonShooting_Godot/resource/config/ActivityObject.json +++ b/DungeonShooting_Godot/resource/config/ActivityObject.json @@ -175,6 +175,13 @@ "Prefab": "res://prefab/prop/active/ActiveProp5000.tscn" }, { + "Id": "prop5001", + "Type": 9, + "Name": "\u5F39\u836F\u7BB1", + "Remark": "\u4F7F\u7528\u540E\u8865\u5145\u5F53\u524D\u6B66\u5668\u5907\u7528\u5F39\u836F", + "Prefab": "res://prefab/prop/active/ActiveProp5001.tscn" + }, + { "Id": "other_door_e", "Type": 99, "Name": "", diff --git a/DungeonShooting_Godot/resource/config/Weapon.json b/DungeonShooting_Godot/resource/config/Weapon.json index 6d690fc..5aa3e13 100644 --- a/DungeonShooting_Godot/resource/config/Weapon.json +++ b/DungeonShooting_Godot/resource/config/Weapon.json @@ -8,8 +8,8 @@ "WeightType": 2, "ContinuousShoot": true, "AmmoCapacity": 30, - "MaxAmmoCapacity": 1800, - "StandbyAmmoCapacity": 1500, + "MaxAmmoCapacity": 420, + "StandbyAmmoCapacity": 390, "ReloadTime": 2.2, "AloneReload": false, "AloneReloadCount": 1, @@ -81,8 +81,8 @@ "WeightType": 2, "ContinuousShoot": false, "AmmoCapacity": 30, - "MaxAmmoCapacity": 1800, - "StandbyAmmoCapacity": 1500, + "MaxAmmoCapacity": 420, + "StandbyAmmoCapacity": 390, "ReloadTime": 2.2, "AloneReload": false, "AloneReloadCount": 1, @@ -154,8 +154,8 @@ "WeightType": 2, "ContinuousShoot": false, "AmmoCapacity": 7, - "MaxAmmoCapacity": 63, - "StandbyAmmoCapacity": 56, + "MaxAmmoCapacity": 140, + "StandbyAmmoCapacity": 133, "ReloadTime": 0.4, "AloneReload": true, "AloneReloadCount": 1, @@ -227,8 +227,8 @@ "WeightType": 2, "ContinuousShoot": false, "AmmoCapacity": 7, - "MaxAmmoCapacity": 63, - "StandbyAmmoCapacity": 56, + "MaxAmmoCapacity": 140, + "StandbyAmmoCapacity": 133, "ReloadTime": 0.4, "AloneReload": true, "AloneReloadCount": 1, @@ -300,8 +300,8 @@ "WeightType": 1, "ContinuousShoot": false, "AmmoCapacity": 12, - "MaxAmmoCapacity": 84, - "StandbyAmmoCapacity": 72, + "MaxAmmoCapacity": 180, + "StandbyAmmoCapacity": 168, "ReloadTime": 1.5, "AloneReload": false, "AloneReloadCount": 1, @@ -373,8 +373,8 @@ "WeightType": 1, "ContinuousShoot": false, "AmmoCapacity": 12, - "MaxAmmoCapacity": 84, - "StandbyAmmoCapacity": 72, + "MaxAmmoCapacity": 180, + "StandbyAmmoCapacity": 168, "ReloadTime": 1.5, "AloneReload": false, "AloneReloadCount": 1, @@ -592,8 +592,8 @@ "WeightType": 2, "ContinuousShoot": false, "AmmoCapacity": 10, - "MaxAmmoCapacity": 50, - "StandbyAmmoCapacity": 40, + "MaxAmmoCapacity": 80, + "StandbyAmmoCapacity": 70, "ReloadTime": 3, "AloneReload": false, "AloneReloadCount": 1, @@ -665,8 +665,8 @@ "WeightType": 2, "ContinuousShoot": false, "AmmoCapacity": 10, - "MaxAmmoCapacity": 50, - "StandbyAmmoCapacity": 40, + "MaxAmmoCapacity": 80, + "StandbyAmmoCapacity": 70, "ReloadTime": 3, "AloneReload": false, "AloneReloadCount": 1, @@ -738,8 +738,8 @@ "WeightType": 2, "ContinuousShoot": true, "AmmoCapacity": 20, - "MaxAmmoCapacity": 2600, - "StandbyAmmoCapacity": 2600, + "MaxAmmoCapacity": 600, + "StandbyAmmoCapacity": 580, "ReloadTime": 2.2, "AloneReload": false, "AloneReloadCount": 1, @@ -811,8 +811,8 @@ "WeightType": 2, "ContinuousShoot": false, "AmmoCapacity": 20, - "MaxAmmoCapacity": 2600, - "StandbyAmmoCapacity": 2600, + "MaxAmmoCapacity": 600, + "StandbyAmmoCapacity": 580, "ReloadTime": 2.2, "AloneReload": false, "AloneReloadCount": 1, diff --git a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn index 937eee3..381e5d5 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn +++ b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn @@ -106,3 +106,17 @@ Type = 9 ItemExpression = "5000" WaveNumber = 3 + +[node name="ActivityMark20" type="Node2D" parent="."] +position = Vector2(139, 26) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "5001" +WaveNumber = 3 + +[node name="ActivityMark21" type="Node2D" parent="."] +position = Vector2(140, 50) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "5001" +WaveNumber = 3 diff --git a/DungeonShooting_Godot/resource/sprite/prop/active/ActiveProp5001.png b/DungeonShooting_Godot/resource/sprite/prop/active/ActiveProp5001.png new file mode 100644 index 0000000..d355ec7 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/active/ActiveProp5001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/active/ActiveProp5001.png.import b/DungeonShooting_Godot/resource/sprite/prop/active/ActiveProp5001.png.import new file mode 100644 index 0000000..5f577c6 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/active/ActiveProp5001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://fby848tbodc" +path="res://.godot/imported/ActiveProp5001.png-037b024a2da4a01ef7b701664c95763f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/active/ActiveProp5001.png" +dest_files=["res://.godot/imported/ActiveProp5001.png-037b024a2da4a01ef7b701664c95763f.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/role/enemy0001/enemy0001.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import index b20c9a6..c36be94 100644 --- a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://chd2vtesap5cf" -path="res://.godot/imported/enemy0001.png-1247a3ddf8a1a163d812cad12c4340fd.ctex" +path="res://.godot/imported/Enemy0001.png-148a38dfa95953b26d890356e8875de4.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/role/enemy0001/enemy0001.png" -dest_files=["res://.godot/imported/enemy0001.png-1247a3ddf8a1a163d812cad12c4340fd.ctex"] +source_file="res://resource/sprite/role/enemy0001/Enemy0001.png" +dest_files=["res://.godot/imported/Enemy0001.png-148a38dfa95953b26d890356e8875de4.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import index 56388a2..d563acf 100644 --- a/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0001/enemy0001_Debris.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://d2f55lu60x64i" -path="res://.godot/imported/enemy0001_Debris.png-297a2fb6680cb862a9a085cf58f8268c.ctex" +path="res://.godot/imported/Enemy0001_Debris.png-ac416dc79cd3c1217b27e1ef1fbe0d0b.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/role/enemy0001/enemy0001_Debris.png" -dest_files=["res://.godot/imported/enemy0001_Debris.png-297a2fb6680cb862a9a085cf58f8268c.ctex"] +source_file="res://resource/sprite/role/enemy0001/Enemy0001_Debris.png" +dest_files=["res://.godot/imported/Enemy0001_Debris.png-ac416dc79cd3c1217b27e1ef1fbe0d0b.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/active/ActiveProp5001.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/active/ActiveProp5001.tres new file mode 100644 index 0000000..c5cf932 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/active/ActiveProp5001.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bbjyakayescy5"] + +[ext_resource type="Texture2D" uid="uid://fby848tbodc" path="res://resource/sprite/prop/active/ActiveProp5001.png" id="1_1xlxo"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_1xlxo") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/theme/mainTheme.tres b/DungeonShooting_Godot/resource/theme/mainTheme.tres index 9d01465..6243ca5 100644 --- a/DungeonShooting_Godot/resource/theme/mainTheme.tres +++ b/DungeonShooting_Godot/resource/theme/mainTheme.tres @@ -352,7 +352,7 @@ [sub_resource type="ImageTexture" id="58"] -[sub_resource type="Image" id="Image_rcdx1"] +[sub_resource type="Image" id="Image_p1bsv"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -362,7 +362,7 @@ } [sub_resource type="ImageTexture" id="60"] -image = SubResource("Image_rcdx1") +image = SubResource("Image_p1bsv") [sub_resource type="StyleBoxTexture" id="61"] content_margin_left = 2.0 @@ -372,7 +372,7 @@ texture = SubResource("60") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_jf38e"] +[sub_resource type="Image" id="Image_s40kn"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -382,7 +382,7 @@ } [sub_resource type="ImageTexture" id="63"] -image = SubResource("Image_jf38e") +image = SubResource("Image_s40kn") [sub_resource type="StyleBoxTexture" id="64"] content_margin_left = 2.0 @@ -392,7 +392,7 @@ texture = SubResource("63") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_pynnv"] +[sub_resource type="Image" id="Image_4htof"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -402,7 +402,7 @@ } [sub_resource type="ImageTexture" id="66"] -image = SubResource("Image_pynnv") +image = SubResource("Image_4htof") [sub_resource type="StyleBoxTexture" id="67"] content_margin_left = 2.0 @@ -412,7 +412,7 @@ texture = SubResource("66") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_wl8j8"] +[sub_resource type="Image" id="Image_28mrc"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -422,7 +422,7 @@ } [sub_resource type="ImageTexture" id="69"] -image = SubResource("Image_wl8j8") +image = SubResource("Image_28mrc") [sub_resource type="StyleBoxTexture" id="70"] content_margin_left = 0.0 @@ -446,7 +446,7 @@ content_margin_right = 4.0 content_margin_bottom = 4.0 -[sub_resource type="Image" id="Image_5qrbu"] +[sub_resource type="Image" id="Image_cs85u"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 228, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 228, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 17, 255, 255, 255, 186, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 191, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 186, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 189, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 77, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 77, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -456,7 +456,7 @@ } [sub_resource type="ImageTexture" id="56"] -image = SubResource("Image_5qrbu") +image = SubResource("Image_cs85u") [sub_resource type="StyleBoxFlat" id="57"] content_margin_left = 6.0 diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs index 3171ff4..6d53823 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs @@ -136,6 +136,11 @@ /// public const string Id_prop5000 = "prop5000"; /// + /// 名称: 弹药箱
+ /// 备注: 使用后补充当前武器备用弹药 + ///
+ public const string Id_prop5001 = "prop5001"; + /// /// 名称:
/// 备注: 地牢房间的门(东侧) ///
@@ -183,6 +188,7 @@ _activityRegisterMap.Add("prop0009", new RegisterActivityData("res://prefab/prop/buff/BuffProp0009.tscn", ExcelConfig.ActivityObject_Map["prop0009"])); _activityRegisterMap.Add("prop0010", new RegisterActivityData("res://prefab/prop/buff/BuffProp0010.tscn", ExcelConfig.ActivityObject_Map["prop0010"])); _activityRegisterMap.Add("prop5000", new RegisterActivityData("res://prefab/prop/active/ActiveProp5000.tscn", ExcelConfig.ActivityObject_Map["prop5000"])); + _activityRegisterMap.Add("prop5001", new RegisterActivityData("res://prefab/prop/active/ActiveProp5001.tscn", ExcelConfig.ActivityObject_Map["prop5001"])); _activityRegisterMap.Add("other_door_e", new RegisterActivityData("res://prefab/map/RoomDoor_E.tscn", ExcelConfig.ActivityObject_Map["other_door_e"])); _activityRegisterMap.Add("other_door_w", new RegisterActivityData("res://prefab/map/RoomDoor_W.tscn", ExcelConfig.ActivityObject_Map["other_door_w"])); _activityRegisterMap.Add("other_door_s", new RegisterActivityData("res://prefab/map/RoomDoor_S.tscn", ExcelConfig.ActivityObject_Map["other_door_s"])); diff --git a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs index f170b7c..c97f512 100644 --- a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs +++ b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs @@ -113,6 +113,7 @@ damage = Role.RoleState.CallCalcDamageEvent(damage); GD.Print($"原伤害: {d}, 计算伤害: {damage}"); } + role.CallDeferred(nameof(Role.Hurt), damage, Rotation); Destroy(); } diff --git a/DungeonShooting_Godot/src/game/activity/package/Package.cs b/DungeonShooting_Godot/src/game/activity/package/Package.cs index 14c2dba..059ce2b 100644 --- a/DungeonShooting_Godot/src/game/activity/package/Package.cs +++ b/DungeonShooting_Godot/src/game/activity/package/Package.cs @@ -209,23 +209,6 @@ } /// - /// 返回是否能放入物体 - /// - /// 物体对象 - public bool CanPickupItem(T item) - { - for (var i = 0; i < ItemSlot.Length; i++) - { - var tempItem = ItemSlot[i]; - if (tempItem == null) - { - return true; - } - } - return false; - } - - /// /// 拾起物体, 存入物体背包中, 返回存放在物体背包的位置, 如果容不下这个物体, 则会返回 -1 /// /// 物体对象 diff --git a/DungeonShooting_Godot/src/game/activity/prop/Prop.cs b/DungeonShooting_Godot/src/game/activity/prop/Prop.cs index c578444..1e937e9 100644 --- a/DungeonShooting_Godot/src/game/activity/prop/Prop.cs +++ b/DungeonShooting_Godot/src/game/activity/prop/Prop.cs @@ -46,18 +46,10 @@ { //阴影偏移 ShadowOffset = new Vector2(0, 2); - - if (master.Face == FaceDirection.Left) - { - Scale *= new Vector2(1, -1); - } - - var rotation = master.MountPoint.GlobalRotation; - GlobalRotation = rotation; - + GlobalRotation = 0; var startHeight = -master.MountPoint.Position.Y; Throw(startPosition, startHeight, 0, Vector2.Zero, 0); - + //继承role的移动速度 InheritVelocity(master); } diff --git a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs index 08b26a4..ce037b4 100644 --- a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs +++ b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs @@ -133,11 +133,16 @@ protected override void ProcessOver(float delta) { - CheckAutoDestroy(); + RunUpdate(delta); } public override void PackProcess(float delta) { + RunUpdate(delta); + } + + private void RunUpdate(float delta) + { if (CheckAutoDestroy()) { return; @@ -228,14 +233,12 @@ var item = player.ActivePropsPack.GetItemById(ItemConfig.Id); if (item == null) //没有同类型物体 { - if (player.ActivePropsPack.HasVacancy()) //还有空位, 拾起道具 + if (!player.ActivePropsPack.HasVacancy()) //没有空位置, 扔掉当前道具 { - Pickup(); - player.PickUpActiveProp(this); + player.ThrowActiveProp(player.ActivePropsPack.ActiveIndex); } - //替换手中的道具 - player.ThrowActiveProp(player.ActivePropsPack.ActiveIndex); + player.PickUpActiveProp(this); } else { @@ -289,6 +292,7 @@ public override void OnPickUpItem() { + Pickup(); } public override void OnRemoveItem() diff --git a/DungeonShooting_Godot/src/game/activity/role/Player.cs b/DungeonShooting_Godot/src/game/activity/role/Player.cs index 564f543..27c79bd 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Player.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Player.cs @@ -107,6 +107,7 @@ { Reload(); } + if (InputManager.Fire) //开火 { Attack(); @@ -116,6 +117,10 @@ { UseActiveProp(); } + else if (InputManager.RemoveProp) //扔掉道具 + { + ThrowActiveProp(); + } if (Input.IsKeyPressed(Key.P)) { @@ -209,17 +214,26 @@ BasisVelocity = Vector2.Zero; MoveController.ClearForce(); UiManager.Open_Settlement(); - //GameApplication.Instance.World.ProcessMode = ProcessModeEnum.WhenPaused; } - protected override void OnPickUpProp(Prop prop) + protected override void OnPickUpActiveProp(ActiveProp activeProp) { - EventManager.EmitEvent(EventEnum.OnPlayerPickUpProp, prop); + EventManager.EmitEvent(EventEnum.OnPlayerPickUpProp, activeProp); } - protected override void OnRemoveProp(Prop prop) + protected override void OnRemoveActiveProp(ActiveProp activeProp) { - EventManager.EmitEvent(EventEnum.OnPlayerRemoveProp, prop); + EventManager.EmitEvent(EventEnum.OnPlayerRemoveProp, activeProp); + } + + protected override void OnPickUpBuffProp(BuffProp buffProp) + { + EventManager.EmitEvent(EventEnum.OnPlayerPickUpProp, buffProp); + } + + protected override void OnRemoveBuffProp(BuffProp buffProp) + { + EventManager.EmitEvent(EventEnum.OnPlayerRemoveProp, buffProp); } //处理角色移动的输入 diff --git a/DungeonShooting_Godot/src/game/activity/role/Role.cs b/DungeonShooting_Godot/src/game/activity/role/Role.cs index 62d9cbf..7782cee 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs @@ -317,16 +317,37 @@ } /// - /// 当拾起某个道具时调用 + /// 当拾起某个主动道具时调用 /// - protected virtual void OnPickUpProp(Prop prop) + protected virtual void OnPickUpActiveProp(ActiveProp activeProp) { } /// - /// 当移除某个道具时调用 + /// 当移除某个主动道具时调用 /// - protected virtual void OnRemoveProp(Prop prop) + protected virtual void OnRemoveActiveProp(ActiveProp activeProp) + { + } + + /// + /// 当切换到某个主动道具时调用 + /// + protected virtual void OnExchangeActiveProp(ActiveProp activeProp) + { + } + + /// + /// 当拾起某个被动道具时调用 + /// + protected virtual void OnPickUpBuffProp(BuffProp buffProp) + { + } + + /// + /// 当移除某个被动道具时调用 + /// + protected virtual void OnRemoveBuffProp(BuffProp buffProp) { } @@ -669,7 +690,7 @@ { //从可互动队列中移除 _interactiveItemList.Remove(activeProp); - OnPickUpProp(activeProp); + OnPickUpActiveProp(activeProp); return true; } @@ -681,7 +702,12 @@ /// public void ExchangeNextActiveProp() { + var prop = ActivePropsPack.ActiveItem; ActivePropsPack.ExchangeNext(); + if (prop != ActivePropsPack.ActiveItem) + { + OnExchangeActiveProp(ActivePropsPack.ActiveItem); + } } /// @@ -689,7 +715,12 @@ /// public void ExchangePrevActiveProp() { + var prop = ActivePropsPack.ActiveItem; ActivePropsPack.ExchangePrev(); + if (prop != ActivePropsPack.ActiveItem) + { + OnExchangeActiveProp(ActivePropsPack.ActiveItem); + } } /// @@ -712,7 +743,7 @@ } ActivePropsPack.RemoveItem(index); - OnRemoveProp(activeProp); + OnRemoveActiveProp(activeProp); //播放抛出效果 activeProp.ThrowProp(this, GlobalPosition); } @@ -730,7 +761,7 @@ } BuffPropPack.Add(buffProp); buffProp.Master = this; - OnPickUpProp(buffProp); + OnPickUpBuffProp(buffProp); buffProp.OnPickUpItem(); return true; } @@ -764,7 +795,7 @@ var buffProp = BuffPropPack[index]; BuffPropPack.RemoveAt(index); buffProp.OnRemoveItem(); - OnRemoveProp(buffProp); + OnRemoveBuffProp(buffProp); buffProp.Master = null; //播放抛出效果 buffProp.ThrowProp(this, GlobalPosition); diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs index 072a9c9..f6f1045 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs @@ -1458,7 +1458,7 @@ } else //没有武器 { - if (roleMaster.WeaponPack.CanPickupItem(this)) //能拾起武器 + if (roleMaster.WeaponPack.HasVacancy()) //有空位, 能拾起武器 { //可以互动, 拾起武器 result.CanInteractive = true; @@ -1534,12 +1534,12 @@ } else //没有武器 { - if (holster.PickupItem(this) == -1) + if (!holster.HasVacancy()) //没有空位置, 扔掉当前武器 { //替换武器 roleMaster.ThrowWeapon(); - roleMaster.PickUpWeapon(this); } + roleMaster.PickUpWeapon(this); } } } diff --git a/DungeonShooting_Godot/src/game/manager/InputManager.cs b/DungeonShooting_Godot/src/game/manager/InputManager.cs index 1dd83ac..9ebf832 100644 --- a/DungeonShooting_Godot/src/game/manager/InputManager.cs +++ b/DungeonShooting_Godot/src/game/manager/InputManager.cs @@ -92,5 +92,6 @@ MeleeAttack = Input.IsActionJustPressed("meleeAttack"); Roll = Input.IsActionJustPressed("roll"); UseActiveProp = Input.IsActionJustPressed("useActiveProp"); + RemoveProp = Input.IsActionJustPressed("removeProp"); } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index a13ebeb..ebc986e 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -26,6 +26,7 @@ public const string prefab_map_RoomDoor_W_tscn = "res://prefab/map/RoomDoor_W.tscn"; public const string prefab_prop_PropTemplate_tscn = "res://prefab/prop/PropTemplate.tscn"; public const string prefab_prop_active_ActiveProp5000_tscn = "res://prefab/prop/active/ActiveProp5000.tscn"; + public const string prefab_prop_active_ActiveProp5001_tscn = "res://prefab/prop/active/ActiveProp5001.tscn"; public const string prefab_prop_buff_BuffProp0001_tscn = "res://prefab/prop/buff/BuffProp0001.tscn"; public const string prefab_prop_buff_BuffProp0002_tscn = "res://prefab/prop/buff/BuffProp0002.tscn"; public const string prefab_prop_buff_BuffProp0003_tscn = "res://prefab/prop/buff/BuffProp0003.tscn"; @@ -58,6 +59,7 @@ public const string prefab_weapon_Weapon0005_tscn = "res://prefab/weapon/Weapon0005.tscn"; public const string prefab_weapon_Weapon0006_tscn = "res://prefab/weapon/Weapon0006.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"; @@ -130,6 +132,7 @@ 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_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"; public const string resource_sprite_prop_buff_BuffProp0002_png = "res://resource/sprite/prop/buff/BuffProp0002.png"; public const string resource_sprite_prop_buff_BuffProp0003_png = "res://resource/sprite/prop/buff/BuffProp0003.png"; @@ -159,6 +162,9 @@ public const string resource_sprite_ui_font_bg_png = "res://resource/sprite/ui/font_bg.png"; public const string resource_sprite_ui_GUI_png = "res://resource/sprite/ui/GUI.png"; public const string resource_sprite_ui_keyboard_e_png = "res://resource/sprite/ui/keyboard/e.png"; + public const string resource_sprite_ui_roomUI_ChargeProgress_png = "res://resource/sprite/ui/roomUI/ChargeProgress.png"; + public const string resource_sprite_ui_roomUI_ChargeProgressBar_png = "res://resource/sprite/ui/roomUI/ChargeProgressBar.png"; + public const string resource_sprite_ui_roomUI_Cooldown_png = "res://resource/sprite/ui/roomUI/Cooldown.png"; public const string resource_sprite_ui_roomUI_icon_bullet_png = "res://resource/sprite/ui/roomUI/icon_bullet.png"; public const string resource_sprite_ui_roomUI_icon_pickup_png = "res://resource/sprite/ui/roomUI/icon_pickup.png"; public const string resource_sprite_ui_roomUI_icon_replace_png = "res://resource/sprite/ui/roomUI/icon_replace.png"; @@ -167,6 +173,7 @@ public const string resource_sprite_ui_roomUI_Life_half_png = "res://resource/sprite/ui/roomUI/Life_half.png"; public const string resource_sprite_ui_roomUI_MapBar_png = "res://resource/sprite/ui/roomUI/MapBar.png"; public const string resource_sprite_ui_roomUI_Panel_png = "res://resource/sprite/ui/roomUI/Panel.png"; + public const string resource_sprite_ui_roomUI_Panel2_png = "res://resource/sprite/ui/roomUI/Panel2.png"; public const string resource_sprite_ui_roomUI_ReloadBar_png = "res://resource/sprite/ui/roomUI/ReloadBar.png"; public const string resource_sprite_ui_roomUI_ReloadBarBlock_png = "res://resource/sprite/ui/roomUI/ReloadBarBlock.png"; public const string resource_sprite_ui_roomUI_Shield_empty_png = "res://resource/sprite/ui/roomUI/Shield_empty.png"; @@ -193,6 +200,7 @@ public const string resource_spriteFrames_other_RoomDoor_EW_tres = "res://resource/spriteFrames/other/RoomDoor_EW.tres"; public const string resource_spriteFrames_other_RoomDoor_NS_tres = "res://resource/spriteFrames/other/RoomDoor_NS.tres"; public const string resource_spriteFrames_prop_active_ActiveProp5000_tres = "res://resource/spriteFrames/prop/active/ActiveProp5000.tres"; + public const string resource_spriteFrames_prop_active_ActiveProp5001_tres = "res://resource/spriteFrames/prop/active/ActiveProp5001.tres"; public const string resource_spriteFrames_prop_buff_BuffProp0001_tres = "res://resource/spriteFrames/prop/buff/BuffProp0001.tres"; public const string resource_spriteFrames_prop_buff_BuffProp0002_tres = "res://resource/spriteFrames/prop/buff/BuffProp0002.tres"; public const string resource_spriteFrames_prop_buff_BuffProp0003_tres = "res://resource/spriteFrames/prop/buff/BuffProp0003.tres";