diff --git a/DungeonShooting_Godot/excel/ActivityBase.xlsx b/DungeonShooting_Godot/excel/ActivityBase.xlsx
index 6f80322..738a3b6 100644
--- a/DungeonShooting_Godot/excel/ActivityBase.xlsx
+++ b/DungeonShooting_Godot/excel/ActivityBase.xlsx
Binary files differ
diff --git a/DungeonShooting_Godot/excel/EnemyBase.xlsx b/DungeonShooting_Godot/excel/EnemyBase.xlsx
index e6d4d3d..89c0096 100644
--- a/DungeonShooting_Godot/excel/EnemyBase.xlsx
+++ b/DungeonShooting_Godot/excel/EnemyBase.xlsx
Binary files differ
diff --git a/DungeonShooting_Godot/excel/WeaponBase.xlsx b/DungeonShooting_Godot/excel/WeaponBase.xlsx
index f969e2d..99dcc44 100644
--- a/DungeonShooting_Godot/excel/WeaponBase.xlsx
+++ b/DungeonShooting_Godot/excel/WeaponBase.xlsx
Binary files differ
diff --git a/DungeonShooting_Godot/prefab/currency/Gold1.tscn b/DungeonShooting_Godot/prefab/currency/Gold1.tscn
new file mode 100644
index 0000000..5db5a1c
--- /dev/null
+++ b/DungeonShooting_Godot/prefab/currency/Gold1.tscn
@@ -0,0 +1,160 @@
+[gd_scene load_steps=24 format=3 uid="uid://bayga6rue4ldm"]
+
+[ext_resource type="PackedScene" uid="uid://c7i2q4mx5qp2h" path="res://prefab/currency/GoldTemplate.tscn" id="1_7anjj"]
+[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_p7xui"]
+[ext_resource type="Texture2D" uid="uid://benn0iaclw8dk" path="res://resource/sprite/currency/Gold_1.png" id="3_lhsna"]
+
+[sub_resource type="ShaderMaterial" id="ShaderMaterial_2tpx1"]
+resource_local_to_scene = true
+shader = ExtResource("2_p7xui")
+shader_parameter/blend = Color(1, 1, 1, 1)
+shader_parameter/schedule = 0.0
+shader_parameter/modulate = Color(1, 1, 1, 1)
+shader_parameter/show_outline = true
+shader_parameter/outline_color = Color(0, 0, 0, 1)
+shader_parameter/outline_rainbow = false
+shader_parameter/outline_use_blend = true
+shader_parameter/grey = 0.0
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_e75yg"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(0, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_vipr3"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(8, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_c2w8t"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(16, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_4u1py"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(24, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_ejbhm"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(32, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_obptk"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(40, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_xdxp6"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(48, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_j2dug"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(56, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_0yf5k"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(64, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_aew3e"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(72, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_0uljq"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(80, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_fu3cl"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(88, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_c1vcu"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(96, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_8sqp3"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(104, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_htbwa"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(112, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_hei3a"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(120, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_0e87y"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(128, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_i2rar"]
+atlas = ExtResource("3_lhsna")
+region = Rect2(136, 0, 8, 8)
+
+[sub_resource type="SpriteFrames" id="SpriteFrames_3te8s"]
+animations = [{
+"frames": [{
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_e75yg")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_vipr3")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_c2w8t")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_4u1py")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_ejbhm")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_obptk")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_xdxp6")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_j2dug")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_0yf5k")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_aew3e")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_0uljq")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_fu3cl")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_c1vcu")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_8sqp3")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_htbwa")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_hei3a")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_0e87y")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_i2rar")
+}],
+"loop": true,
+"name": &"default",
+"speed": 10.0
+}]
+
+[node name="Gold1" instance=ExtResource("1_7anjj")]
+GoldCount = 1
+
+[node name="AnimatedSprite" parent="." index="1"]
+material = SubResource("ShaderMaterial_2tpx1")
+sprite_frames = SubResource("SpriteFrames_3te8s")
+autoplay = "default"
+frame_progress = 0.578976
diff --git a/DungeonShooting_Godot/prefab/currency/Gold10.tscn b/DungeonShooting_Godot/prefab/currency/Gold10.tscn
index ff62c57..e723646 100644
--- a/DungeonShooting_Godot/prefab/currency/Gold10.tscn
+++ b/DungeonShooting_Godot/prefab/currency/Gold10.tscn
@@ -151,6 +151,7 @@
}]
[node name="Gold10" instance=ExtResource("1_q6rqs")]
+GoldCount = 10
[node name="AnimatedSprite" parent="." index="1"]
material = SubResource("ShaderMaterial_2tpx1")
diff --git a/DungeonShooting_Godot/prefab/currency/Gold5.tscn b/DungeonShooting_Godot/prefab/currency/Gold5.tscn
new file mode 100644
index 0000000..88de932
--- /dev/null
+++ b/DungeonShooting_Godot/prefab/currency/Gold5.tscn
@@ -0,0 +1,160 @@
+[gd_scene load_steps=24 format=3 uid="uid://dqeph6v1y3ycm"]
+
+[ext_resource type="PackedScene" uid="uid://c7i2q4mx5qp2h" path="res://prefab/currency/GoldTemplate.tscn" id="1_t3bsk"]
+[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_r5r64"]
+[ext_resource type="Texture2D" uid="uid://bfpcqj2x8t2os" path="res://resource/sprite/currency/Gold_5.png" id="3_rf7nc"]
+
+[sub_resource type="ShaderMaterial" id="ShaderMaterial_2tpx1"]
+resource_local_to_scene = true
+shader = ExtResource("2_r5r64")
+shader_parameter/blend = Color(1, 1, 1, 1)
+shader_parameter/schedule = 0.0
+shader_parameter/modulate = Color(1, 1, 1, 1)
+shader_parameter/show_outline = true
+shader_parameter/outline_color = Color(0, 0, 0, 1)
+shader_parameter/outline_rainbow = false
+shader_parameter/outline_use_blend = true
+shader_parameter/grey = 0.0
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_kpbsl"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(0, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_tpaps"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(8, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_gfmw0"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(16, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_kh76b"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(24, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_h71d5"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(32, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_irvf2"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(40, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_6upf3"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(48, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_th3rv"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(56, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_2nwhu"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(64, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_3f1xk"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(72, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_4edoa"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(80, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_t7eeg"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(88, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_x22g0"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(96, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_14m0u"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(104, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_4s0em"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(112, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_ncscs"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(120, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_gwnv8"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(128, 0, 8, 8)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_aw75c"]
+atlas = ExtResource("3_rf7nc")
+region = Rect2(136, 0, 8, 8)
+
+[sub_resource type="SpriteFrames" id="SpriteFrames_3te8s"]
+animations = [{
+"frames": [{
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_kpbsl")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_tpaps")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_gfmw0")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_kh76b")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_h71d5")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_irvf2")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_6upf3")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_th3rv")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_2nwhu")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_3f1xk")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_4edoa")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_t7eeg")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_x22g0")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_14m0u")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_4s0em")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_ncscs")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_gwnv8")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_aw75c")
+}],
+"loop": true,
+"name": &"default",
+"speed": 10.0
+}]
+
+[node name="Gold5" instance=ExtResource("1_t3bsk")]
+GoldCount = 5
+
+[node name="AnimatedSprite" parent="." index="1"]
+material = SubResource("ShaderMaterial_2tpx1")
+sprite_frames = SubResource("SpriteFrames_3te8s")
+autoplay = "default"
+frame_progress = 0.578976
diff --git a/DungeonShooting_Godot/prefab/currency/GoldTemplate.tscn b/DungeonShooting_Godot/prefab/currency/GoldTemplate.tscn
index 6f9ad6d..a759eeb 100644
--- a/DungeonShooting_Godot/prefab/currency/GoldTemplate.tscn
+++ b/DungeonShooting_Godot/prefab/currency/GoldTemplate.tscn
@@ -23,6 +23,7 @@
collision_layer = 4
collision_mask = 0
script = ExtResource("1_p60kl")
+GoldCount = 0
ShadowSprite = NodePath("ShadowSprite")
AnimatedSprite = NodePath("AnimatedSprite")
Collision = NodePath("Collision")
diff --git a/DungeonShooting_Godot/prefab/ui/RoomUI.tscn b/DungeonShooting_Godot/prefab/ui/RoomUI.tscn
index a16d493..3bf1a0d 100644
--- a/DungeonShooting_Godot/prefab/ui/RoomUI.tscn
+++ b/DungeonShooting_Godot/prefab/ui/RoomUI.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=20 format=3 uid="uid://bvpmtfupny8iu"]
+[gd_scene load_steps=21 format=3 uid="uid://bvpmtfupny8iu"]
[ext_resource type="Script" path="res://src/game/ui/roomUI/RoomUIPanel.cs" id="1_tfcrp"]
[ext_resource type="Texture2D" uid="uid://b67i86mtqrn32" path="res://resource/sprite/ui/roomUI/icon_bullet.png" id="2_ruc0p"]
@@ -6,6 +6,7 @@
[ext_resource type="Texture2D" uid="uid://cukrx5yyqw86o" path="res://resource/sprite/ui/roomUI/ReloadBar.png" id="4_hy44s"]
[ext_resource type="Texture2D" uid="uid://cx3i1nkcc4307" path="res://resource/sprite/ui/roomUI/ReloadBarBlock.png" id="5_w3lq2"]
[ext_resource type="Texture2D" uid="uid://blywnftxn1cfd" path="res://resource/sprite/ui/roomUI/Life_full.png" id="6_ggviq"]
+[ext_resource type="Texture2D" uid="uid://cysv0dpvm52xw" path="res://resource/sprite/ui/commonIcon/Gold_10.png" id="7_lyxvi"]
[ext_resource type="Texture2D" uid="uid://cu0wlvrbntvyd" path="res://resource/sprite/prop/active/ActiveProp5000.png" id="10_5d4np"]
[ext_resource type="Texture2D" uid="uid://b8u6s5n37157" path="res://resource/sprite/ui/roomUI/Panel2.png" id="10_eokvx"]
[ext_resource type="Texture2D" uid="uid://0swkya4hn82c" path="res://resource/sprite/ui/roomUI/Panel.png" id="10_q3fs8"]
@@ -159,17 +160,53 @@
mouse_filter = 2
metadata/_edit_lock_ = true
-[node name="LifeBar" type="Control" parent="Control"]
-anchors_preset = 0
-offset_right = 40.0
-offset_bottom = 40.0
-scale = Vector2(4, 4)
+[node name="LifeBar" type="VBoxContainer" parent="Control"]
+layout_mode = 1
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+offset_right = -280.0
+grow_horizontal = 2
+grow_vertical = 2
-[node name="Life" type="TextureRect" parent="Control/LifeBar"]
+[node name="Life" type="Control" parent="Control/LifeBar"]
+custom_minimum_size = Vector2(48, 40)
layout_mode = 2
+size_flags_horizontal = 0
+size_flags_vertical = 0
+
+[node name="LifeIcon" type="TextureRect" parent="Control/LifeBar/Life"]
+layout_mode = 1
offset_right = 12.0
offset_bottom = 10.0
+scale = Vector2(4, 4)
+size_flags_horizontal = 0
+size_flags_vertical = 0
texture = ExtResource("6_ggviq")
+stretch_mode = 2
+
+[node name="Gold" type="Control" parent="Control/LifeBar"]
+custom_minimum_size = Vector2(0, 32)
+layout_mode = 2
+
+[node name="GoldIcon" type="TextureRect" parent="Control/LifeBar/Gold"]
+layout_mode = 1
+offset_right = 8.0
+offset_bottom = 8.0
+scale = Vector2(4, 4)
+texture = ExtResource("7_lyxvi")
+stretch_mode = 2
+
+[node name="GoldText" type="Label" parent="Control/LifeBar/Gold"]
+layout_mode = 1
+anchors_preset = 9
+anchor_bottom = 1.0
+offset_left = 32.0
+offset_top = -4.0
+offset_right = 285.0
+offset_bottom = 4.0
+grow_vertical = 2
+text = "0"
[node name="ActivePropBar" type="Control" parent="Control"]
layout_mode = 1
diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0013.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0013.tscn
new file mode 100644
index 0000000..c7c9280
--- /dev/null
+++ b/DungeonShooting_Godot/prefab/weapon/Weapon0013.tscn
@@ -0,0 +1,61 @@
+[gd_scene load_steps=8 format=3 uid="uid://chxa5inh7hgxs"]
+
+[ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_f1h8o"]
+[ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="2_bpgfu"]
+[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_0l3ip"]
+[ext_resource type="SpriteFrames" uid="uid://cawsi08vaqfrn" path="res://resource/spriteFrames/weapon/Weapon0013.tres" id="4_w7ibl"]
+
+[sub_resource type="ShaderMaterial" id="ShaderMaterial_sy2aq"]
+resource_local_to_scene = true
+shader = ExtResource("3_0l3ip")
+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
+shader_parameter/outline_use_blend = true
+shader_parameter/grey = 0.0
+
+[sub_resource type="ShaderMaterial" id="ShaderMaterial_1rqqj"]
+resource_local_to_scene = true
+shader = ExtResource("3_0l3ip")
+shader_parameter/blend = Color(1, 1, 1, 1)
+shader_parameter/schedule = 0.0
+shader_parameter/modulate = Color(1, 1, 1, 1)
+shader_parameter/show_outline = true
+shader_parameter/outline_color = Color(0, 0, 0, 1)
+shader_parameter/outline_rainbow = false
+shader_parameter/outline_use_blend = true
+shader_parameter/grey = 0.0
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_4pn1i"]
+size = Vector2(20, 6)
+
+[node name="Weapon0013" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_f1h8o")]
+script = ExtResource("2_bpgfu")
+FirePoint = NodePath("AnimatedSprite/FirePoint")
+ShellPoint = NodePath("AnimatedSprite/ShellPoint")
+AnimationPlayer = NodePath("AnimationPlayer")
+ShadowSprite = NodePath("ShadowSprite")
+AnimatedSprite = NodePath("AnimatedSprite")
+Collision = NodePath("Collision")
+
+[node name="ShadowSprite" parent="." index="0"]
+material = SubResource("ShaderMaterial_sy2aq")
+
+[node name="AnimatedSprite" parent="." index="1"]
+material = SubResource("ShaderMaterial_1rqqj")
+position = Vector2(4, -1)
+sprite_frames = ExtResource("4_w7ibl")
+
+[node name="ShellPoint" parent="AnimatedSprite" index="0"]
+position = Vector2(2, -1)
+
+[node name="FirePoint" parent="AnimatedSprite" index="1"]
+position = Vector2(12, -1)
+
+[node name="Collision" parent="." index="2"]
+visible = true
+position = Vector2(4, 0)
+shape = SubResource("RectangleShape2D_4pn1i")
diff --git a/DungeonShooting_Godot/resource/config/ActivityBase.json b/DungeonShooting_Godot/resource/config/ActivityBase.json
index 13a5485..aa7e701 100644
--- a/DungeonShooting_Godot/resource/config/ActivityBase.json
+++ b/DungeonShooting_Godot/resource/config/ActivityBase.json
@@ -171,7 +171,7 @@
"Id": "weapon0010",
"Type": 5,
"Name": "weapon0010",
- "Quality": 4,
+ "Quality": 5,
"Price": 0,
"Intro": "",
"Details": "",
@@ -182,6 +182,20 @@
"ShowInMapEditor": true
},
{
+ "Id": "weapon0013",
+ "Type": 5,
+ "Name": "P90",
+ "Quality": 4,
+ "Price": 0,
+ "Intro": "",
+ "Details": "",
+ "IsStatic": false,
+ "__Material": "",
+ "Prefab": "res://prefab/weapon/Weapon0013.tscn",
+ "Icon": "res://resource/sprite/weapon/weapon0013/Weapon0013.png",
+ "ShowInMapEditor": true
+ },
+ {
"Id": "bullet0001",
"Type": 6,
"Name": "",
@@ -635,12 +649,40 @@
"Name": "\u91D1\u5E01",
"Quality": 0,
"Price": 0,
- "Intro": "\u83B7\u5F9710\u8D27\u5E01",
+ "Intro": "\u83B7\u5F9710\u91D1\u5E01",
"Details": "",
"IsStatic": false,
"__Material": "",
"Prefab": "res://prefab/currency/Gold10.tscn",
"Icon": "res://resource/sprite/ui/commonIcon/Gold_10.png",
"ShowInMapEditor": true
+ },
+ {
+ "Id": "gold_5",
+ "Type": 99,
+ "Name": "\u94F6\u5E01",
+ "Quality": 0,
+ "Price": 0,
+ "Intro": "\u83B7\u5F975\u91D1\u5E01",
+ "Details": "",
+ "IsStatic": false,
+ "__Material": "",
+ "Prefab": "res://prefab/currency/Gold5.tscn",
+ "Icon": "res://resource/sprite/ui/commonIcon/Gold_5.png",
+ "ShowInMapEditor": true
+ },
+ {
+ "Id": "gold_1",
+ "Type": 99,
+ "Name": "\u94DC\u5E01",
+ "Quality": 0,
+ "Price": 0,
+ "Intro": "\u83B7\u5F971\u91D1\u5E01",
+ "Details": "",
+ "IsStatic": false,
+ "__Material": "",
+ "Prefab": "res://prefab/currency/Gold1.tscn",
+ "Icon": "res://resource/sprite/ui/commonIcon/Gold_1.png",
+ "ShowInMapEditor": true
}
]
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/config/EnemyBase.json b/DungeonShooting_Godot/resource/config/EnemyBase.json
index 3bbf195..3c402ce 100644
--- a/DungeonShooting_Godot/resource/config/EnemyBase.json
+++ b/DungeonShooting_Godot/resource/config/EnemyBase.json
@@ -12,8 +12,8 @@
"TailAfterViewRange": 400,
"BackViewRange": 50,
"Gold": [
- 1,
- 5
+ -2,
+ 3
]
},
{
@@ -29,8 +29,8 @@
"TailAfterViewRange": 400,
"BackViewRange": 50,
"Gold": [
- 1,
- 3
+ -2,
+ 4
]
}
]
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/config/WeaponBase.json b/DungeonShooting_Godot/resource/config/WeaponBase.json
index 767dc0e..dc5948d 100644
--- a/DungeonShooting_Godot/resource/config/WeaponBase.json
+++ b/DungeonShooting_Godot/resource/config/WeaponBase.json
@@ -101,7 +101,7 @@
"ContinuousCountRange": [
3
],
- "TriggerInterval": 3,
+ "TriggerInterval": 2.5,
"StartFiringSpeed": 480,
"FinalFiringSpeed": 480,
"FiringSpeedAddSpeed": 0,
@@ -255,7 +255,7 @@
"ContinuousCountRange": [
1
],
- "TriggerInterval": 3.5,
+ "TriggerInterval": 3,
"StartFiringSpeed": 120,
"FinalFiringSpeed": 120,
"FiringSpeedAddSpeed": 0,
@@ -715,7 +715,7 @@
"ContinuousCountRange": [
1
],
- "TriggerInterval": 5,
+ "TriggerInterval": 4,
"StartFiringSpeed": 150,
"FinalFiringSpeed": 150,
"FiringSpeedAddSpeed": 0,
@@ -869,7 +869,7 @@
"ContinuousCountRange": [
5
],
- "TriggerInterval": 3.5,
+ "TriggerInterval": 3,
"StartFiringSpeed": 700,
"FinalFiringSpeed": 700,
"FiringSpeedAddSpeed": 0,
@@ -1023,7 +1023,7 @@
"ContinuousCountRange": [
10
],
- "TriggerInterval": 4.5,
+ "TriggerInterval": 4,
"StartFiringSpeed": 200,
"FinalFiringSpeed": 200,
"FiringSpeedAddSpeed": 0,
@@ -1177,7 +1177,7 @@
"ContinuousCountRange": [
1
],
- "TriggerInterval": 4,
+ "TriggerInterval": 3,
"StartFiringSpeed": 300,
"FinalFiringSpeed": 300,
"FiringSpeedAddSpeed": 0,
@@ -1331,7 +1331,7 @@
"ContinuousCountRange": [
1
],
- "TriggerInterval": 5,
+ "TriggerInterval": 4,
"StartFiringSpeed": 60,
"FinalFiringSpeed": 60,
"FiringSpeedAddSpeed": 0,
@@ -1536,5 +1536,159 @@
"BeLoadedSoundDelayTime": 0,
"__OtherSoundMap": null,
"__AiAttackAttr": "0009"
+ },
+ {
+ "Id": "0013",
+ "Remark": "P90",
+ "__Activity": "weapon0013",
+ "Weight": 40,
+ "WeightType": 2,
+ "IsMelee": false,
+ "ContinuousShoot": true,
+ "AmmoCapacity": 50,
+ "MaxAmmoCapacity": 500,
+ "StandbyAmmoCapacity": 350,
+ "ReloadTime": 1.8,
+ "AloneReload": false,
+ "AloneReloadCount": 1,
+ "AloneReloadBeginIntervalTime": 0,
+ "AloneReloadFinishIntervalTime": 0,
+ "AloneReloadCanShoot": false,
+ "LooseShoot": false,
+ "MinChargeTime": 0,
+ "ManualBeLoaded": false,
+ "AutoManualBeLoaded": false,
+ "BeLoadedTime": 0,
+ "ContinuousCountRange": [
+ 1
+ ],
+ "TriggerInterval": 0,
+ "StartFiringSpeed": 1000,
+ "FinalFiringSpeed": 1000,
+ "FiringSpeedAddSpeed": 0,
+ "FiringSpeedBackSpeed": 0,
+ "FiringSpeedBackTime": 0.5,
+ "FireBulletCountRange": [
+ 1
+ ],
+ "DelayedTime": 0,
+ "StartScatteringRange": 5,
+ "FinalScatteringRange": 35,
+ "ScatteringRangeAddValue": 2,
+ "ScatteringRangeBackSpeed": 50,
+ "ScatteringRangeBackDelayTime": 0.3,
+ "CameraShake": 2,
+ "BacklashRange": [
+ 1,
+ 1
+ ],
+ "BacklashRegressionSpeed": 35,
+ "UpliftAngle": 3,
+ "DefaultAngle": 0,
+ "UpliftAngleRestore": 1,
+ "FireEffect": "res://prefab/effect/weapon/ShotFire0001.tscn",
+ "__Bullet": "0003",
+ "__Shell": "shell0001",
+ "ReloadThrowShell": false,
+ "ThrowShellDelayTime": 0,
+ "ThrowCollisionSize": {
+ "X": 20,
+ "Y": 15
+ },
+ "CanMeleeAttack": true,
+ "MeleeAttackHarmRange": [
+ 10
+ ],
+ "MeleeAttackRepelRange": [
+ 100
+ ],
+ "__ShootSound": "shooting0007",
+ "__BeginReloadSound": "reloadBegin0006",
+ "BeginReloadSoundDelayTime": 0.2,
+ "__ReloadSound": "",
+ "ReloadSoundDelayTime": 0,
+ "__ReloadFinishSound": "beLoaded0017",
+ "ReloadFinishSoundAdvanceTime": 0.65,
+ "__BeLoadedSound": "",
+ "BeLoadedSoundDelayTime": 0,
+ "__OtherSoundMap": null,
+ "__AiAttackAttr": ""
+ },
+ {
+ "Id": "0013_ai",
+ "Remark": "P90",
+ "__Activity": "",
+ "Weight": 40,
+ "WeightType": 2,
+ "IsMelee": false,
+ "ContinuousShoot": false,
+ "AmmoCapacity": 50,
+ "MaxAmmoCapacity": 500,
+ "StandbyAmmoCapacity": 350,
+ "ReloadTime": 1.8,
+ "AloneReload": false,
+ "AloneReloadCount": 1,
+ "AloneReloadBeginIntervalTime": 0,
+ "AloneReloadFinishIntervalTime": 0,
+ "AloneReloadCanShoot": false,
+ "LooseShoot": false,
+ "MinChargeTime": 0,
+ "ManualBeLoaded": false,
+ "AutoManualBeLoaded": false,
+ "BeLoadedTime": 0,
+ "ContinuousCountRange": [
+ 25
+ ],
+ "TriggerInterval": 4,
+ "StartFiringSpeed": 500,
+ "FinalFiringSpeed": 500,
+ "FiringSpeedAddSpeed": 0,
+ "FiringSpeedBackSpeed": 0,
+ "FiringSpeedBackTime": 0,
+ "FireBulletCountRange": [
+ 1
+ ],
+ "DelayedTime": 0,
+ "StartScatteringRange": 10,
+ "FinalScatteringRange": 30,
+ "ScatteringRangeAddValue": 3,
+ "ScatteringRangeBackSpeed": 50,
+ "ScatteringRangeBackDelayTime": 0.3,
+ "CameraShake": 2,
+ "BacklashRange": [
+ 1,
+ 1
+ ],
+ "BacklashRegressionSpeed": 35,
+ "UpliftAngle": 3,
+ "DefaultAngle": 0,
+ "UpliftAngleRestore": 1,
+ "FireEffect": "res://prefab/effect/weapon/ShotFire0001.tscn",
+ "__Bullet": "0003",
+ "__Shell": "shell0001",
+ "ReloadThrowShell": false,
+ "ThrowShellDelayTime": 0,
+ "ThrowCollisionSize": {
+ "X": 20,
+ "Y": 15
+ },
+ "CanMeleeAttack": true,
+ "MeleeAttackHarmRange": [
+ 10
+ ],
+ "MeleeAttackRepelRange": [
+ 100
+ ],
+ "__ShootSound": "shooting0007",
+ "__BeginReloadSound": "reloadBegin0006",
+ "BeginReloadSoundDelayTime": 0.2,
+ "__ReloadSound": "",
+ "ReloadSoundDelayTime": 0,
+ "__ReloadFinishSound": "beLoaded0017",
+ "ReloadFinishSoundAdvanceTime": 0.65,
+ "__BeLoadedSound": "",
+ "BeLoadedSoundDelayTime": 0,
+ "__OtherSoundMap": null,
+ "__AiAttackAttr": "0006"
}
]
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json
index 46c08ad..5ceb016 100644
--- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json
+++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json
@@ -1 +1 @@
-[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[{"Position":{"X":39,"Y":8},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-16,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":6},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0009","Weight":100,"Attr":{"CurrAmmon":"1","ResidueAmmo":"25"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0010","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":47,"Y":-32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0008","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":23,"Y":37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0005","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":24,"Y":-30},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":40,"Y":-10},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":-37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-2,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]}]]}]
\ No newline at end of file
+[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[{"Position":{"X":39,"Y":8},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-16,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":6},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0009","Weight":100,"Attr":{"CurrAmmon":"1","ResidueAmmo":"25"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0010","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":47,"Y":-32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0008","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":23,"Y":37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0005","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":24,"Y":-30},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":40,"Y":-10},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":-37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-2,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":29,"Y":63},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0013","Weight":100,"Attr":{"CurrAmmon":"50","ResidueAmmo":"250"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-30,"Y":39},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-19,"Y":71},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}]]}]
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0013.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0013.tres
new file mode 100644
index 0000000..4901466
--- /dev/null
+++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0013.tres
@@ -0,0 +1,14 @@
+[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://cawsi08vaqfrn"]
+
+[ext_resource type="Texture2D" uid="uid://cphawlk2w0w6w" path="res://resource/sprite/weapon/weapon0013/weapon0013.png" id="1_akn2h"]
+
+[resource]
+animations = [{
+"frames": [{
+"duration": 1.0,
+"texture": ExtResource("1_akn2h")
+}],
+"loop": true,
+"name": &"default",
+"speed": 5.0
+}]
diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs
index f9a5016..4963193 100644
--- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs
+++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs
@@ -74,6 +74,11 @@
///
public const string Id_weapon0010 = "weapon0010";
///
+ /// 名称: P90
+ /// 简介:
+ ///
+ public const string Id_weapon0013 = "weapon0013";
+ ///
/// 名称:
/// 简介:
///
@@ -235,8 +240,18 @@
public const string Id_other_door_n = "other_door_n";
///
/// 名称: 金币
- /// 简介: 获得10货币
+ /// 简介: 获得10金币
///
public const string Id_gold_10 = "gold_10";
+ ///
+ /// 名称: 银币
+ /// 简介: 获得5金币
+ ///
+ public const string Id_gold_5 = "gold_5";
+ ///
+ /// 名称: 铜币
+ /// 简介: 获得1金币
+ ///
+ public const string Id_gold_1 = "gold_1";
}
}
diff --git a/DungeonShooting_Godot/src/framework/common/Utils.cs b/DungeonShooting_Godot/src/framework/common/Utils.cs
index 04657df..4302194 100644
--- a/DungeonShooting_Godot/src/framework/common/Utils.cs
+++ b/DungeonShooting_Godot/src/framework/common/Utils.cs
@@ -530,4 +530,31 @@
}
return arr;
}
+
+ ///
+ /// 根据金币数量获取金币对象id数组
+ ///
+ public static string[] GetGoldList(int gold)
+ {
+ var list = new List();
+ while (gold > 0)
+ {
+ if (gold >= 10)
+ {
+ list.Add(ActivityObject.Ids.Id_gold_10);
+ gold -= 10;
+ }
+ else if (gold >= 5)
+ {
+ list.Add(ActivityObject.Ids.Id_gold_5);
+ gold -= 5;
+ }
+ else
+ {
+ list.Add(ActivityObject.Ids.Id_gold_1);
+ gold -= 1;
+ }
+ }
+ return list.ToArray();
+ }
}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/activity/currency/Gold.cs b/DungeonShooting_Godot/src/game/activity/currency/Gold.cs
index b292b13..b991fb6 100644
--- a/DungeonShooting_Godot/src/game/activity/currency/Gold.cs
+++ b/DungeonShooting_Godot/src/game/activity/currency/Gold.cs
@@ -1,11 +1,73 @@
using Godot;
+///
+/// 金币类
+///
[Tool]
-public partial class Gold : ActivityObject
+public partial class Gold : ActivityObject, IPoolItem
{
+ ///
+ /// 金币数量
+ ///
+ [Export]
+ public int GoldCount { get; set; } = 1;
+
+ public bool IsRecycled { get; set; }
+ public string Logotype { get; set; }
+
+ private float _maxSpeed = 250;
+ private float _speed = 0;
+ private Role _moveTarget;
+
public override void OnInit()
{
DefaultLayer = RoomLayerEnum.YSortLayer;
}
+
+ protected override void OnThrowOver()
+ {
+ var current = Player.Current;
+ if (current != null)
+ {
+ this.CallDelay(0.3f, () =>
+ {
+ _moveTarget = current;
+ MoveController.Enable = false;
+ });
+ }
+ }
+
+ protected override void Process(float delta)
+ {
+ if (_moveTarget != null && !_moveTarget.IsDestroyed)
+ {
+ var position = Position;
+ var targetPosition = _moveTarget.Position;
+ if (position.DistanceSquaredTo(targetPosition) < 3 * 3)
+ {
+ _moveTarget.AddGold(GoldCount);
+ ObjectPool.Reclaim(this);
+ }
+ else
+ {
+ _speed = Mathf.MoveToward(_speed, _maxSpeed, _maxSpeed * delta);
+ Position = position.MoveToward(targetPosition, _speed * delta);
+ }
+ }
+ }
+
+ public void OnReclaim()
+ {
+ GetParent().RemoveChild(this);
+ _moveTarget = null;
+ }
+
+ public void OnLeavePool()
+ {
+ _speed = 0;
+ MoveController.Enable = true;
+ MoveController.ClearForce();
+ MoveController.SetAllVelocity(Vector2.Zero);
+ }
}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/activity/role/Role.cs b/DungeonShooting_Godot/src/game/activity/role/Role.cs
index 67748b5..ddbad02 100644
--- a/DungeonShooting_Godot/src/game/activity/role/Role.cs
+++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs
@@ -1236,6 +1236,14 @@
});
}
}
+
+ ///
+ /// 添加金币
+ ///
+ public virtual void AddGold(int goldCount)
+ {
+ RoleState.Gold += goldCount;
+ }
///
/// 切换当前使用的武器的回调
diff --git a/DungeonShooting_Godot/src/game/activity/role/RoleState.cs b/DungeonShooting_Godot/src/game/activity/role/RoleState.cs
index 2af6bf3..f974546 100644
--- a/DungeonShooting_Godot/src/game/activity/role/RoleState.cs
+++ b/DungeonShooting_Godot/src/game/activity/role/RoleState.cs
@@ -7,6 +7,11 @@
public class RoleState
{
///
+ /// 金币数量
+ ///
+ public int Gold = 0;
+
+ ///
/// 是否可以拾起武器
///
public bool CanPickUpWeapon = false;
diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs
index 69c8fe3..6e52346 100644
--- a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs
+++ b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs
@@ -174,6 +174,8 @@
roleState.ViewRange = enemyBase.ViewRange;
roleState.TailAfterViewRange = enemyBase.TailAfterViewRange;
roleState.BackViewRange = enemyBase.BackViewRange;
+
+ roleState.Gold = Mathf.Max(0, Utils.Random.RandomConfigRange(enemyBase.Gold));
return roleState;
}
@@ -213,19 +215,8 @@
}
//创建金币
- var goldCount = Utils.Random.RandomRangeInt(1, 5);
- for (int i = 0; i < goldCount; i++)
- {
- var o = Create(Ids.Id_gold_10);
- o.GlobalPosition = GlobalPosition;
- o.Throw(0,
- Utils.Random.RandomRangeInt(50, 90),
- new Vector2(Utils.Random.RandomRangeInt(-10, 10), Utils.Random.RandomRangeInt(-10, 10)),
- 0
- );
- }
-
-
+ CreateGold();
+
//派发敌人死亡信号
EventManager.EmitEvent(EventEnum.OnEnemyDie, this);
Destroy();
@@ -265,6 +256,24 @@
}
}
+ ///
+ /// 创建散落的金币
+ ///
+ protected void CreateGold()
+ {
+ var goldList = Utils.GetGoldList(RoleState.Gold);
+ foreach (var id in goldList)
+ {
+ var o = ObjectManager.GetActivityObject(id);
+ o.Position = Position;
+ o.Throw(0,
+ Utils.Random.RandomRangeInt(50, 110),
+ new Vector2(Utils.Random.RandomRangeInt(-20, 20), Utils.Random.RandomRangeInt(-20, 20)),
+ 0
+ );
+ }
+ }
+
public override bool IsAllWeaponTotalAmmoEmpty()
{
if (!_enemyAttribute.CanPickUpWeapon)
diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs
index 1ac7183..2e1e4ae 100644
--- a/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs
+++ b/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs
@@ -70,6 +70,9 @@
debris.SetForwardDirection(Face);
debris.BrushPrevPosition = BrushPrevPosition;
+ //创建金币
+ CreateGold();
+
//派发敌人死亡信号
EventManager.EmitEvent(EventEnum.OnEnemyDie, this);
Destroy();
diff --git a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs
index 164fa13..4456399 100644
--- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs
+++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs
@@ -73,6 +73,8 @@
//InitSubLine();
_brushData2 = new BrushImageData(ExcelConfig.LiquidMaterial_Map["0001"]);
+
+ MaxHp = 100;
}
private void DebugSet()
@@ -404,4 +406,10 @@
// base.DebugDraw();
// DrawArc(GetLocalMousePosition(), 25, 0, Mathf.Pi * 2f, 20, Colors.Red, 1);
// }
+
+ public override void AddGold(int goldCount)
+ {
+ base.AddGold(goldCount);
+ EventManager.EmitEvent(EventEnum.OnPlayerGoldChange, RoleState.Gold);
+ }
}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/activity/role/player/PlayerRoleState.cs b/DungeonShooting_Godot/src/game/activity/role/player/PlayerRoleState.cs
index f52b21d..c9e2f7d 100644
--- a/DungeonShooting_Godot/src/game/activity/role/player/PlayerRoleState.cs
+++ b/DungeonShooting_Godot/src/game/activity/role/player/PlayerRoleState.cs
@@ -14,5 +14,5 @@
///
/// 翻滚冷却时间
///
- public float RollCoolingTime = 0.4f;
+ public float RollCoolingTime = 0.2f;
}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/event/EventEnum.cs b/DungeonShooting_Godot/src/game/event/EventEnum.cs
index d526ae0..afe09d8 100644
--- a/DungeonShooting_Godot/src/game/event/EventEnum.cs
+++ b/DungeonShooting_Godot/src/game/event/EventEnum.cs
@@ -47,6 +47,10 @@
///
OnPlayerMaxShieldChange,
///
+ /// 玩家金币发生改变, 参数为玩家金币值
+ ///
+ OnPlayerGoldChange,
+ ///
/// 玩家拾起武器, 参数为
///
OnPlayerPickUpWeapon,
diff --git a/DungeonShooting_Godot/src/game/manager/ObjectManager.cs b/DungeonShooting_Godot/src/game/manager/ObjectManager.cs
index 27206a3..fc62066 100644
--- a/DungeonShooting_Godot/src/game/manager/ObjectManager.cs
+++ b/DungeonShooting_Godot/src/game/manager/ObjectManager.cs
@@ -51,6 +51,18 @@
return item;
}
+ public static T GetActivityObject(string id) where T : ActivityObject, IPoolItem
+ {
+ var item = ObjectPool.GetItem(id);
+ if (item == null)
+ {
+ item = ActivityObject.Create(id);
+ item.Logotype = id;
+ }
+
+ return item;
+ }
+
public static Bullet GetBullet(string id)
{
var bullet = ObjectPool.GetItem(id);
diff --git a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs
index b4a17af..e46541d 100644
--- a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs
@@ -353,5 +353,11 @@
public override void OnHideUi()
{
}
+ public void OnBeforeSerialize()
+ {
+ }
+ public void OnAfterDeserialize()
+ {
+ }
#endif
}
diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/LifeBarHandler.cs b/DungeonShooting_Godot/src/game/ui/roomUI/LifeBarHandler.cs
index 3bc3dd4..104c005 100644
--- a/DungeonShooting_Godot/src/game/ui/roomUI/LifeBarHandler.cs
+++ b/DungeonShooting_Godot/src/game/ui/roomUI/LifeBarHandler.cs
@@ -9,15 +9,17 @@
private RoomUI.LifeBar _bar;
private UiGrid _grid;
private EventFactory _eventFactory;
- private bool _refreshFlag = false;
+ private bool _refreshHpFlag = false;
+ private bool _refreshGoldFlag = false;
public LifeBarHandler(RoomUI.LifeBar lifeBar)
{
_bar = lifeBar;
var uiNodeLife = lifeBar.L_Life;
- _grid = new UiGrid(uiNodeLife, typeof(LifeCell));
- _grid.SetColumns(20);
+ _grid = lifeBar.UiPanel.CreateUiGrid(uiNodeLife);
+ _grid.SetAutoColumns(true);
+ _grid.SetHorizontalExpand(true);
_grid.SetCellOffset(new Vector2I(1, 2));
}
@@ -28,7 +30,9 @@
_eventFactory.AddEventListener(EventEnum.OnPlayerMaxHpChange, o => RefreshLife());
_eventFactory.AddEventListener(EventEnum.OnPlayerShieldChange, o => RefreshLife());
_eventFactory.AddEventListener(EventEnum.OnPlayerMaxShieldChange, o => RefreshLife());
+ _eventFactory.AddEventListener(EventEnum.OnPlayerGoldChange, o => RefreshGold());
RefreshLife();
+ RefreshGold();
}
public void OnHide()
@@ -38,16 +42,27 @@
public void Process(float delta)
{
- if (_refreshFlag)
+ if (_refreshHpFlag)
{
- _refreshFlag = false;
+ _refreshHpFlag = false;
HandlerRefreshLife();
}
+
+ if (_refreshGoldFlag)
+ {
+ _refreshGoldFlag = false;
+ HandlerRefreshGold();
+ }
+ }
+
+ public void RefreshGold()
+ {
+ _refreshGoldFlag = true;
}
public void RefreshLife()
{
- _refreshFlag = true;
+ _refreshHpFlag = true;
}
private void HandlerRefreshLife()
@@ -90,5 +105,10 @@
//var maxHp
_grid.SetDataList(list.ToArray());
}
+
+ private void HandlerRefreshGold()
+ {
+ _bar.L_Gold.L_GoldText.Instance.Text = Player.Current.RoleState.Gold.ToString();
+ }
}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/LifeCell.cs b/DungeonShooting_Godot/src/game/ui/roomUI/LifeCell.cs
index d549158..abdcd9b 100644
--- a/DungeonShooting_Godot/src/game/ui/roomUI/LifeCell.cs
+++ b/DungeonShooting_Godot/src/game/ui/roomUI/LifeCell.cs
@@ -17,19 +17,19 @@
switch (data)
{
case LifeIconEnum.FullHeart:
- CellNode.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Life_full_png);
+ CellNode.L_LifeIcon.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Life_full_png);
break;
case LifeIconEnum.HalfHeart:
- CellNode.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Life_half_png);
+ CellNode.L_LifeIcon.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Life_half_png);
break;
case LifeIconEnum.EmptyHeart:
- CellNode.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Life_empty_png);
+ CellNode.L_LifeIcon.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Life_empty_png);
break;
case LifeIconEnum.FullShield:
- CellNode.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Shield_full_png);
+ CellNode.L_LifeIcon.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Shield_full_png);
break;
case LifeIconEnum.EmptyShield:
- CellNode.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Shield_empty_png);
+ CellNode.L_LifeIcon.Instance.Texture = ResourceManager.Load(ResourcePath.resource_sprite_ui_roomUI_Shield_empty_png);
break;
}
}
diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs
index 64f9203..1dfdf85 100644
--- a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs
+++ b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs
@@ -236,34 +236,122 @@
}
///
- /// 类型: , 路径: RoomUI.Control.LifeBar.Life
+ /// 类型: , 路径: RoomUI.Control.LifeBar.Life.LifeIcon
///
- public class Life : UiNode
+ public class LifeIcon : UiNode
{
- public Life(RoomUIPanel uiPanel, Godot.TextureRect node) : base(uiPanel, node) { }
- public override Life Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate());
+ public LifeIcon(RoomUIPanel uiPanel, Godot.TextureRect node) : base(uiPanel, node) { }
+ public override LifeIcon Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate());
}
///
- /// 类型: , 路径: RoomUI.Control.LifeBar
+ /// 类型: , 路径: RoomUI.Control.LifeBar.Life
///
- public class LifeBar : UiNode
+ public class Life : UiNode
{
///
- /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.Life
+ /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.LifeBar.LifeIcon
+ ///
+ public LifeIcon L_LifeIcon
+ {
+ get
+ {
+ if (_L_LifeIcon == null) _L_LifeIcon = new LifeIcon(UiPanel, Instance.GetNode("LifeIcon"));
+ return _L_LifeIcon;
+ }
+ }
+ private LifeIcon _L_LifeIcon;
+
+ public Life(RoomUIPanel uiPanel, Godot.Control node) : base(uiPanel, node) { }
+ public override Life Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate());
+ }
+
+ ///
+ /// 类型: , 路径: RoomUI.Control.LifeBar.Gold.GoldIcon
+ ///
+ public class GoldIcon : UiNode
+ {
+ public GoldIcon(RoomUIPanel uiPanel, Godot.TextureRect node) : base(uiPanel, node) { }
+ public override GoldIcon Clone() => new (UiPanel, (Godot.TextureRect)Instance.Duplicate());
+ }
+
+ ///
+ /// 类型: , 路径: RoomUI.Control.LifeBar.Gold.GoldText
+ ///
+ public class GoldText : UiNode
+ {
+ public GoldText(RoomUIPanel uiPanel, Godot.Label node) : base(uiPanel, node) { }
+ public override GoldText Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate());
+ }
+
+ ///
+ /// 类型: , 路径: RoomUI.Control.LifeBar.Gold
+ ///
+ public class Gold : UiNode
+ {
+ ///
+ /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.LifeBar.GoldIcon
+ ///
+ public GoldIcon L_GoldIcon
+ {
+ get
+ {
+ if (_L_GoldIcon == null) _L_GoldIcon = new GoldIcon(UiPanel, Instance.GetNode("GoldIcon"));
+ return _L_GoldIcon;
+ }
+ }
+ private GoldIcon _L_GoldIcon;
+
+ ///
+ /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.LifeBar.GoldText
+ ///
+ public GoldText L_GoldText
+ {
+ get
+ {
+ if (_L_GoldText == null) _L_GoldText = new GoldText(UiPanel, Instance.GetNode("GoldText"));
+ return _L_GoldText;
+ }
+ }
+ private GoldText _L_GoldText;
+
+ public Gold(RoomUIPanel uiPanel, Godot.Control node) : base(uiPanel, node) { }
+ public override Gold Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate());
+ }
+
+ ///
+ /// 类型: , 路径: RoomUI.Control.LifeBar
+ ///
+ public class LifeBar : UiNode
+ {
+ ///
+ /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.Life
///
public Life L_Life
{
get
{
- if (_L_Life == null) _L_Life = new Life(UiPanel, Instance.GetNode("Life"));
+ if (_L_Life == null) _L_Life = new Life(UiPanel, Instance.GetNode("Life"));
return _L_Life;
}
}
private Life _L_Life;
- public LifeBar(RoomUIPanel uiPanel, Godot.Control node) : base(uiPanel, node) { }
- public override LifeBar Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate());
+ ///
+ /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Control.Gold
+ ///
+ public Gold L_Gold
+ {
+ get
+ {
+ if (_L_Gold == null) _L_Gold = new Gold(UiPanel, Instance.GetNode("Gold"));
+ return _L_Gold;
+ }
+ }
+ private Gold _L_Gold;
+
+ public LifeBar(RoomUIPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { }
+ public override LifeBar Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate());
}
///
@@ -510,13 +598,13 @@
public class Control : UiNode
{
///
- /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.LifeBar
+ /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.LifeBar
///
public LifeBar L_LifeBar
{
get
{
- if (_L_LifeBar == null) _L_LifeBar = new LifeBar(UiPanel, Instance.GetNode("LifeBar"));
+ if (_L_LifeBar == null) _L_LifeBar = new LifeBar(UiPanel, Instance.GetNode("LifeBar"));
return _L_LifeBar;
}
}
@@ -619,12 +707,32 @@
public ReloadBar S_ReloadBar => L_ReloadBar;
///
- /// 场景中唯一名称的节点, 节点类型: , 节点路径: RoomUI.Control.LifeBar.Life
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: RoomUI.Control.LifeBar.Life.LifeIcon
+ ///
+ public LifeIcon S_LifeIcon => L_Control.L_LifeBar.L_Life.L_LifeIcon;
+
+ ///
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: RoomUI.Control.LifeBar.Life
///
public Life S_Life => L_Control.L_LifeBar.L_Life;
///
- /// 场景中唯一名称的节点, 节点类型: , 节点路径: RoomUI.Control.LifeBar
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: RoomUI.Control.LifeBar.Gold.GoldIcon
+ ///
+ public GoldIcon S_GoldIcon => L_Control.L_LifeBar.L_Gold.L_GoldIcon;
+
+ ///
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: RoomUI.Control.LifeBar.Gold.GoldText
+ ///
+ public GoldText S_GoldText => L_Control.L_LifeBar.L_Gold.L_GoldText;
+
+ ///
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: RoomUI.Control.LifeBar.Gold
+ ///
+ public Gold S_Gold => L_Control.L_LifeBar.L_Gold;
+
+ ///
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: RoomUI.Control.LifeBar
///
public LifeBar S_LifeBar => L_Control.L_LifeBar;