diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/ResourcePathGenerator.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/ResourcePathGenerator.cs index c824d0f..e0e6599 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/ResourcePathGenerator.cs +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/ResourcePathGenerator.cs @@ -40,12 +40,12 @@ ".git", ".import", ".mono", + ".VSCodeCounter", "android", "addons", ".godot", ".vs", - "resource/map/tiledata", - "resource/map/tileMaps" + "resource/map" }; private static string resultStr = ""; diff --git a/DungeonShooting_Godot/excel/ActivityBase.xlsx b/DungeonShooting_Godot/excel/ActivityBase.xlsx index 9f73677..6f80322 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 88cd072..e6d4d3d 100644 --- a/DungeonShooting_Godot/excel/EnemyBase.xlsx +++ b/DungeonShooting_Godot/excel/EnemyBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/prefab/currency/Gold10.tscn b/DungeonShooting_Godot/prefab/currency/Gold10.tscn new file mode 100644 index 0000000..ff62c57 --- /dev/null +++ b/DungeonShooting_Godot/prefab/currency/Gold10.tscn @@ -0,0 +1,159 @@ +[gd_scene load_steps=24 format=3 uid="uid://cpfeog5xk7frv"] + +[ext_resource type="PackedScene" uid="uid://c7i2q4mx5qp2h" path="res://prefab/currency/GoldTemplate.tscn" id="1_q6rqs"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_fwuy2"] +[ext_resource type="Texture2D" uid="uid://7dy6itvggpwy" path="res://resource/sprite/currency/Gold_10.png" id="3_x42g4"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_2tpx1"] +resource_local_to_scene = true +shader = ExtResource("2_fwuy2") +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_x41wb"] +atlas = ExtResource("3_x42g4") +region = Rect2(0, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_03ih4"] +atlas = ExtResource("3_x42g4") +region = Rect2(8, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qdoke"] +atlas = ExtResource("3_x42g4") +region = Rect2(16, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3wdhp"] +atlas = ExtResource("3_x42g4") +region = Rect2(24, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vgpiy"] +atlas = ExtResource("3_x42g4") +region = Rect2(32, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jfxvm"] +atlas = ExtResource("3_x42g4") +region = Rect2(40, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hqk1i"] +atlas = ExtResource("3_x42g4") +region = Rect2(48, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j4okn"] +atlas = ExtResource("3_x42g4") +region = Rect2(56, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nohmj"] +atlas = ExtResource("3_x42g4") +region = Rect2(64, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_blcne"] +atlas = ExtResource("3_x42g4") +region = Rect2(72, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_018qf"] +atlas = ExtResource("3_x42g4") +region = Rect2(80, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kb863"] +atlas = ExtResource("3_x42g4") +region = Rect2(88, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nrald"] +atlas = ExtResource("3_x42g4") +region = Rect2(96, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4rlwh"] +atlas = ExtResource("3_x42g4") +region = Rect2(104, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7qdiq"] +atlas = ExtResource("3_x42g4") +region = Rect2(112, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l7tjk"] +atlas = ExtResource("3_x42g4") +region = Rect2(120, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_thd0w"] +atlas = ExtResource("3_x42g4") +region = Rect2(128, 0, 8, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_js8fg"] +atlas = ExtResource("3_x42g4") +region = Rect2(136, 0, 8, 8) + +[sub_resource type="SpriteFrames" id="SpriteFrames_3te8s"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_x41wb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_03ih4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qdoke") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3wdhp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vgpiy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jfxvm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hqk1i") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_j4okn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nohmj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_blcne") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_018qf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kb863") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nrald") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4rlwh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7qdiq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l7tjk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_thd0w") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_js8fg") +}], +"loop": true, +"name": &"default", +"speed": 10.0 +}] + +[node name="Gold10" instance=ExtResource("1_q6rqs")] + +[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 new file mode 100644 index 0000000..6f9ad6d --- /dev/null +++ b/DungeonShooting_Godot/prefab/currency/GoldTemplate.tscn @@ -0,0 +1,39 @@ +[gd_scene load_steps=6 format=3 uid="uid://c7i2q4mx5qp2h"] + +[ext_resource type="Script" path="res://src/game/activity/currency/Gold.cs" id="1_p60kl"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_5nps8"] +[ext_resource type="Texture2D" uid="uid://cthwlbqve6i1l" path="res://resource/sprite/currency/Gold_shadow.png" id="3_6xm1s"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_qdjhs"] +resource_local_to_scene = true +shader = ExtResource("2_5nps8") +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_jvlsd"] +size = Vector2(6, 4) + +[node name="GoldTemplate" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +collision_mask = 0 +script = ExtResource("1_p60kl") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +texture = ExtResource("3_6xm1s") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_qdjhs") +offset = Vector2(0, -4) + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_jvlsd") diff --git a/DungeonShooting_Godot/resource/config/ActivityBase.json b/DungeonShooting_Godot/resource/config/ActivityBase.json index 705f8e1..13a5485 100644 --- a/DungeonShooting_Godot/resource/config/ActivityBase.json +++ b/DungeonShooting_Godot/resource/config/ActivityBase.json @@ -628,5 +628,19 @@ "Prefab": "res://prefab/map/RoomDoor_N.tscn", "Icon": "", "ShowInMapEditor": false + }, + { + "Id": "gold_10", + "Type": 99, + "Name": "\u91D1\u5E01", + "Quality": 0, + "Price": 0, + "Intro": "\u83B7\u5F9710\u8D27\u5E01", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/currency/Gold10.tscn", + "Icon": "res://resource/sprite/ui/commonIcon/Gold_10.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 b14294d..3bbf195 100644 --- a/DungeonShooting_Godot/resource/config/EnemyBase.json +++ b/DungeonShooting_Godot/resource/config/EnemyBase.json @@ -10,7 +10,11 @@ "CanPickUpWeapon": true, "ViewRange": 250, "TailAfterViewRange": 400, - "BackViewRange": 50 + "BackViewRange": 50, + "Gold": [ + 1, + 5 + ] }, { "Id": "0002", @@ -23,6 +27,10 @@ "CanPickUpWeapon": false, "ViewRange": 250, "TailAfterViewRange": 400, - "BackViewRange": 50 + "BackViewRange": 50, + "Gold": [ + 1, + 3 + ] } ] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/sprite/currency/Gold_1.png b/DungeonShooting_Godot/resource/sprite/currency/Gold_1.png new file mode 100644 index 0000000..3110228 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/currency/Gold_1.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/currency/Gold_1.png.import b/DungeonShooting_Godot/resource/sprite/currency/Gold_1.png.import new file mode 100644 index 0000000..0597d88 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/currency/Gold_1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://benn0iaclw8dk" +path="res://.godot/imported/Gold_1.png-a93928c0075919d29a145c4dafb11474.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/currency/Gold_1.png" +dest_files=["res://.godot/imported/Gold_1.png-a93928c0075919d29a145c4dafb11474.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/currency/Gold_10.png b/DungeonShooting_Godot/resource/sprite/currency/Gold_10.png new file mode 100644 index 0000000..d7c4a53 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/currency/Gold_10.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/currency/Gold_10.png.import b/DungeonShooting_Godot/resource/sprite/currency/Gold_10.png.import new file mode 100644 index 0000000..c89b9a9 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/currency/Gold_10.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://7dy6itvggpwy" +path="res://.godot/imported/Gold_10.png-6dad896477e2d64ee4b53dfc61512c52.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/currency/Gold_10.png" +dest_files=["res://.godot/imported/Gold_10.png-6dad896477e2d64ee4b53dfc61512c52.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/currency/Gold_5.png b/DungeonShooting_Godot/resource/sprite/currency/Gold_5.png new file mode 100644 index 0000000..daf65e3 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/currency/Gold_5.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/currency/Gold_5.png.import b/DungeonShooting_Godot/resource/sprite/currency/Gold_5.png.import new file mode 100644 index 0000000..ca47a36 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/currency/Gold_5.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bfpcqj2x8t2os" +path="res://.godot/imported/Gold_5.png-0b8f56330acf1bae56d208261bbe00e3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/currency/Gold_5.png" +dest_files=["res://.godot/imported/Gold_5.png-0b8f56330acf1bae56d208261bbe00e3.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/currency/Gold_shadow.png b/DungeonShooting_Godot/resource/sprite/currency/Gold_shadow.png new file mode 100644 index 0000000..5e67581 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/currency/Gold_shadow.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/currency/Gold_shadow.png.import b/DungeonShooting_Godot/resource/sprite/currency/Gold_shadow.png.import new file mode 100644 index 0000000..ca0e61e --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/currency/Gold_shadow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cthwlbqve6i1l" +path="res://.godot/imported/Gold_shadow.png-7f96d16d057af7e8ad9968d1695208d9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/currency/Gold_shadow.png" +dest_files=["res://.godot/imported/Gold_shadow.png-7f96d16d057af7e8ad9968d1695208d9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Gold_10.png b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Gold_10.png new file mode 100644 index 0000000..e55aa50 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Gold_10.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Gold_10.png.import b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Gold_10.png.import new file mode 100644 index 0000000..d08eb20 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Gold_10.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cysv0dpvm52xw" +path="res://.godot/imported/Gold_10.png-90370d287f395564703b058392c1eb5b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/commonIcon/Gold_10.png" +dest_files=["res://.godot/imported/Gold_10.png-90370d287f395564703b058392c1eb5b.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/src/config/ExcelConfig_EnemyBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_EnemyBase.cs index 2521e9f..182c7e1 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig_EnemyBase.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig_EnemyBase.cs @@ -73,6 +73,13 @@ public float BackViewRange; /// + /// 掉落金币数量区间, 如果为负数或者0则不会掉落金币
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public int[] Gold; + + /// /// 返回浅拷贝出的新对象 /// public EnemyBase Clone() @@ -89,6 +96,7 @@ inst.ViewRange = ViewRange; inst.TailAfterViewRange = TailAfterViewRange; inst.BackViewRange = BackViewRange; + inst.Gold = Gold; return inst; } } diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs index ccf9622..fb14160 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs @@ -254,6 +254,11 @@ /// public Vector2I? BrushPrevPosition { get; set; } + /// + /// 默认所在层级 + /// + public RoomLayerEnum DefaultLayer { get; protected set; } + // -------------------------------------------------------------------------------- //是否正在调用组件 Update 函数 @@ -278,9 +283,6 @@ //存储投抛该物体时所产生的数据 private readonly ActivityFallData _fallData = new ActivityFallData(); - //所在层级 - private RoomLayerEnum _currLayer; - //标记字典 private Dictionary _signMap; @@ -650,7 +652,7 @@ /// public virtual void PutDown(RoomLayerEnum layer, bool showShadow = true) { - _currLayer = layer; + DefaultLayer = layer; var parent = GetParent(); var root = GameApplication.Instance.World.GetRoomLayer(layer); if (parent != root) @@ -1526,7 +1528,7 @@ private void ThrowOver() { var parent = GetParent(); - var roomLayer = GameApplication.Instance.World.GetRoomLayer(_currLayer); + var roomLayer = GameApplication.Instance.World.GetRoomLayer(DefaultLayer); if (parent != roomLayer) { parent.RemoveChild(this); diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs index 5b4672b..f9a5016 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs @@ -233,5 +233,10 @@ /// 简介: 地牢房间的门(北侧) /// public const string Id_other_door_n = "other_door_n"; + /// + /// 名称: 金币
+ /// 简介: 获得10货币 + ///
+ public const string Id_gold_10 = "gold_10"; } } diff --git a/DungeonShooting_Godot/src/game/activity/currency/Gold.cs b/DungeonShooting_Godot/src/game/activity/currency/Gold.cs new file mode 100644 index 0000000..b292b13 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/currency/Gold.cs @@ -0,0 +1,11 @@ + +using Godot; + +[Tool] +public partial class Gold : ActivityObject +{ + public override void OnInit() + { + DefaultLayer = RoomLayerEnum.YSortLayer; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs index 40ecd73..69c8fe3 100644 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs @@ -212,6 +212,20 @@ debris.MoveController.AddForce(Velocity + realVelocity); } + //创建金币 + 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 + ); + } + + //派发敌人死亡信号 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 1d75ff5..164fa13 100644 --- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs +++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs @@ -104,7 +104,7 @@ }); }); -} + } protected override RoleState OnCreateRoleState() { diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index f709889..67e9894 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -6,9 +6,6 @@ public const string default_bus_layout_tres = "res://default_bus_layout.tres"; public const string default_env_tres = "res://default_env.tres"; public const string icon_png = "res://icon.png"; - public const string _VSCodeCounter_20240121_181451_diff_txt = "res://.VSCodeCounter/2024-01-21_18-14-51/diff.txt"; - public const string _VSCodeCounter_20240121_181451_results_json = "res://.VSCodeCounter/2024-01-21_18-14-51/results.json"; - public const string _VSCodeCounter_20240121_181451_results_txt = "res://.VSCodeCounter/2024-01-21_18-14-51/results.txt"; public const string excelTool_bin_Release_net8_0_winx64_ExcelTool_deps_json = "res://excelTool/bin/Release/net8.0/win-x64/ExcelTool.deps.json"; public const string excelTool_bin_Release_net8_0_winx64_ExcelTool_runtimeconfig_json = "res://excelTool/bin/Release/net8.0/win-x64/ExcelTool.runtimeconfig.json"; public const string excelTool_obj_ExcelTool_csproj_nuget_dgspec_json = "res://excelTool/obj/ExcelTool.csproj.nuget.dgspec.json"; @@ -27,6 +24,8 @@ public const string prefab_bullet_normal_Bullet0004_tscn = "res://prefab/bullet/normal/Bullet0004.tscn"; public const string prefab_bullet_normal_Bullet0005_tscn = "res://prefab/bullet/normal/Bullet0005.tscn"; public const string prefab_bullet_normal_Bullet0006_tscn = "res://prefab/bullet/normal/Bullet0006.tscn"; + public const string prefab_currency_Gold10_tscn = "res://prefab/currency/Gold10.tscn"; + public const string prefab_currency_GoldTemplate_tscn = "res://prefab/currency/GoldTemplate.tscn"; public const string prefab_effect_Blood_tscn = "res://prefab/effect/Blood.tscn"; public const string prefab_effect_bullet_BulletDisappear0001_tscn = "res://prefab/effect/bullet/BulletDisappear0001.tscn"; public const string prefab_effect_bullet_BulletDisappear0002_tscn = "res://prefab/effect/bullet/BulletDisappear0002.tscn"; @@ -134,15 +133,6 @@ 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_TileSetConfig_json = "res://resource/map/tileSet/TileSetConfig.json"; - public const string resource_map_tileSet_TileSet1_Main_png = "res://resource/map/tileSet/TileSet1/Main.png"; - public const string resource_map_tileSet_TileSet1_Test1_png = "res://resource/map/tileSet/TileSet1/Test1.png"; - public const string resource_map_tileSet_TileSet1_Test2_png = "res://resource/map/tileSet/TileSet1/Test2.png"; - public const string resource_map_tileSet_TileSet1_Test3_png = "res://resource/map/tileSet/TileSet1/Test3.png"; - public const string resource_map_tileSet_TileSet1_TileSet_json = "res://resource/map/tileSet/TileSet1/TileSet.json"; - public const string resource_map_tileSet_TileSet2_Main_png = "res://resource/map/tileSet/TileSet2/Main.png"; - public const string resource_map_tileSet_TileSet2_Test2_png = "res://resource/map/tileSet/TileSet2/Test2.png"; - public const string resource_map_tileSet_TileSet2_TileSet_json = "res://resource/map/tileSet/TileSet2/TileSet.json"; 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_GodRays_gdshader = "res://resource/material/GodRays.gdshader"; @@ -194,10 +184,12 @@ public const string resource_sound_sfx_reloading_Reloading_begin0010_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0010.ogg"; public const string resource_sound_sfx_reloading_Reloading_begin0011_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0011.ogg"; public const string resource_sound_sfx_reloading_Reloading_begin0012_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0012.ogg"; + public const string resource_sound_sfx_reloading_Reloading_begin0013_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0013.ogg"; public const string resource_sound_sfx_reloading_Reloading_finish0001_ogg = "res://resource/sound/sfx/reloading/Reloading_finish0001.ogg"; public const string resource_sound_sfx_reloading_Reloading_finish0002_ogg = "res://resource/sound/sfx/reloading/Reloading_finish0002.ogg"; public const string resource_sound_sfx_reloading_Reloading_finish0003_ogg = "res://resource/sound/sfx/reloading/Reloading_finish0003.ogg"; public const string resource_sound_sfx_reloading_Reloading_finish0004_ogg = "res://resource/sound/sfx/reloading/Reloading_finish0004.ogg"; + public const string resource_sound_sfx_reloading_Reloading_finish0005_ogg = "res://resource/sound/sfx/reloading/Reloading_finish0005.ogg"; public const string resource_sound_sfx_shooting_Shooting0001_ogg = "res://resource/sound/sfx/shooting/Shooting0001.ogg"; public const string resource_sound_sfx_shooting_Shooting0002_ogg = "res://resource/sound/sfx/shooting/Shooting0002.ogg"; public const string resource_sound_sfx_shooting_Shooting0003_ogg = "res://resource/sound/sfx/shooting/Shooting0003.ogg"; @@ -235,6 +227,9 @@ public const string resource_sprite_common_Smoke2_png = "res://resource/sprite/common/Smoke2.png"; public const string resource_sprite_common_Smoke3_png = "res://resource/sprite/common/Smoke3.png"; public const string resource_sprite_common_Smoke4_png = "res://resource/sprite/common/Smoke4.png"; + public const string resource_sprite_currency_Gold_1_png = "res://resource/sprite/currency/Gold_1.png"; + public const string resource_sprite_currency_Gold_10_png = "res://resource/sprite/currency/Gold_10.png"; + public const string resource_sprite_currency_Gold_5_png = "res://resource/sprite/currency/Gold_5.png"; public const string resource_sprite_explode_Explode_circle0001_png = "res://resource/sprite/explode/Explode_circle0001.png"; public const string resource_sprite_explode_Explode_circle0002_png = "res://resource/sprite/explode/Explode_circle0002.png"; public const string resource_sprite_explode_Explode_circle0003_png = "res://resource/sprite/explode/Explode_circle0003.png"; @@ -345,6 +340,7 @@ public const string resource_sprite_ui_commonIcon_DragTool_png = "res://resource/sprite/ui/commonIcon/DragTool.png"; public const string resource_sprite_ui_commonIcon_Edit_png = "res://resource/sprite/ui/commonIcon/Edit.png"; public const string resource_sprite_ui_commonIcon_Error_mini_png = "res://resource/sprite/ui/commonIcon/Error_mini.png"; + public const string resource_sprite_ui_commonIcon_Gold_10_png = "res://resource/sprite/ui/commonIcon/Gold_10.png"; public const string resource_sprite_ui_commonIcon_Hide_png = "res://resource/sprite/ui/commonIcon/Hide.png"; public const string resource_sprite_ui_commonIcon_Import_png = "res://resource/sprite/ui/commonIcon/Import.png"; public const string resource_sprite_ui_commonIcon_Lock_png = "res://resource/sprite/ui/commonIcon/Lock.png";