diff --git a/DungeonShooting_Godot/prefab/effect/activityObject/EnemyDebris.tscn b/DungeonShooting_Godot/prefab/effect/activityObject/EnemyDebris.tscn index 17ee682..c7e5b29 100644 --- a/DungeonShooting_Godot/prefab/effect/activityObject/EnemyDebris.tscn +++ b/DungeonShooting_Godot/prefab/effect/activityObject/EnemyDebris.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://src/framework/activity/ActivityObjectTemplate.cs" id="1_h7exw"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_vlp01"] -[ext_resource type="Texture2D" uid="uid://d2f55lu60x64i" path="res://resource/sprite/role/enemy0001/enemy0001_Debris.png" id="3_ohnrx"] +[ext_resource type="Texture2D" uid="uid://d2f55lu60x64i" path="res://resource/sprite/role/enemy0001/Enemy0001_Debris.png" id="3_ohnrx"] [ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/Smoke.png" id="4_e30nm"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_s1mj2"] diff --git a/DungeonShooting_Godot/prefab/weapon/WeaponPreview.tscn b/DungeonShooting_Godot/prefab/weapon/WeaponPreview.tscn index c8164df..4001e00 100644 --- a/DungeonShooting_Godot/prefab/weapon/WeaponPreview.tscn +++ b/DungeonShooting_Godot/prefab/weapon/WeaponPreview.tscn @@ -23,14 +23,11 @@ [node name="AnimatedSprite" parent="." index="1"] material = SubResource("ShaderMaterial_5ojsm") -position = Vector2(4, 0) +position = Vector2(6, -1) sprite_frames = ExtResource("3_ee7rd") [node name="ShellPoint" parent="." index="2"] -position = Vector2(5, -2.5) +position = Vector2(7.5, -4.5) [node name="FirePoint" parent="." index="3"] -position = Vector2(18, -1.5) - -[node name="Collision" parent="." index="4"] -position = Vector2(4, 0) +position = Vector2(21, -3) diff --git a/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png b/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png index 6522910..a8d9384 100644 --- a/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png +++ b/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png.import b/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png.import index b4c2034..39572c3 100644 --- a/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png.import +++ b/DungeonShooting_Godot/resource/sprite/gun/weapon0001/weapon0001.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://civvcowt2wklr" -path="res://.godot/imported/weapon0001.png-6f3807222cc10bbb7eddc649cd3775c0.ctex" +path="res://.godot/imported/Weapon0001.png-305a0d14fe3c147edd264f33dc26bc8a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/gun/weapon0001/weapon0001.png" -dest_files=["res://.godot/imported/weapon0001.png-6f3807222cc10bbb7eddc649cd3775c0.ctex"] +source_file="res://resource/sprite/gun/weapon0001/Weapon0001.png" +dest_files=["res://.godot/imported/Weapon0001.png-305a0d14fe3c147edd264f33dc26bc8a.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/sprite/gun/weapon0002/Weapon0002.png b/DungeonShooting_Godot/resource/sprite/gun/weapon0002/Weapon0002.png new file mode 100644 index 0000000..36f7fe2 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/gun/weapon0002/Weapon0002.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/gun/weapon0002/Weapon0002.png.import b/DungeonShooting_Godot/resource/sprite/gun/weapon0002/Weapon0002.png.import new file mode 100644 index 0000000..e376a05 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/gun/weapon0002/Weapon0002.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b53kofmyan42g" +path="res://.godot/imported/Weapon0002.png-edc4a18e854dc72621124f2cadb58fe1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/gun/weapon0002/Weapon0002.png" +dest_files=["res://.godot/imported/Weapon0002.png-edc4a18e854dc72621124f2cadb58fe1.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/gun/weapon0003/Weapon0003.png b/DungeonShooting_Godot/resource/sprite/gun/weapon0003/Weapon0003.png new file mode 100644 index 0000000..3c0c458 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/gun/weapon0003/Weapon0003.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/gun/weapon0003/Weapon0003.png.import b/DungeonShooting_Godot/resource/sprite/gun/weapon0003/Weapon0003.png.import new file mode 100644 index 0000000..e25d0cd --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/gun/weapon0003/Weapon0003.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://clgf63extg800" +path="res://.godot/imported/Weapon0003.png-13ab586687326f977a86147c1dcff66d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/gun/weapon0003/Weapon0003.png" +dest_files=["res://.godot/imported/Weapon0003.png-13ab586687326f977a86147c1dcff66d.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/Weapon0001.tres b/DungeonShooting_Godot/resource/spriteFrames/Weapon0001.tres index f221be0..82eb0df 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/Weapon0001.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/Weapon0001.tres @@ -1,6 +1,6 @@ [gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://5m0qs7m4er5u"] -[ext_resource type="Texture2D" uid="uid://civvcowt2wklr" path="res://resource/sprite/gun/weapon0001/weapon0001.png" id="1_derf1"] +[ext_resource type="Texture2D" uid="uid://civvcowt2wklr" path="res://resource/sprite/gun/weapon0001/Weapon0001.png" id="1_derf1"] [resource] animations = [{ diff --git a/DungeonShooting_Godot/resource/spriteFrames/Weapon0002.tres b/DungeonShooting_Godot/resource/spriteFrames/Weapon0002.tres index adef4a7..0f6c248 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/Weapon0002.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/Weapon0002.tres @@ -1,12 +1,12 @@ [gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://domhmo4flmlt0"] -[ext_resource type="Texture2D" uid="uid://5geiuvv6hyov" path="res://resource/sprite/gun/gun2.png" id="1_1bfrn"] +[ext_resource type="Texture2D" uid="uid://b53kofmyan42g" path="res://resource/sprite/gun/weapon0002/Weapon0002.png" id="1_2tglc"] [resource] animations = [{ "frames": [{ "duration": 1.0, -"texture": ExtResource("1_1bfrn") +"texture": ExtResource("1_2tglc") }], "loop": true, "name": &"default", diff --git a/DungeonShooting_Godot/resource/spriteFrames/Weapon0003.tres b/DungeonShooting_Godot/resource/spriteFrames/Weapon0003.tres index 8e8ef6c..a0ca33a 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/Weapon0003.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/Weapon0003.tres @@ -1,12 +1,12 @@ [gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://c7dt1uwdybn5"] -[ext_resource type="Texture2D" uid="uid://c1tnh6laf172u" path="res://resource/sprite/gun/gun3.png" id="1_ru073"] +[ext_resource type="Texture2D" uid="uid://clgf63extg800" path="res://resource/sprite/gun/weapon0003/Weapon0003.png" id="1_ioiy8"] [resource] animations = [{ "frames": [{ "duration": 1.0, -"texture": ExtResource("1_ru073") +"texture": ExtResource("1_ioiy8") }], "loop": true, "name": &"default", diff --git a/DungeonShooting_Godot/scene/test/TestTileLayer.tscn b/DungeonShooting_Godot/scene/test/TestTileLayer.tscn index ddc8bc6..f0dd8ff 100644 --- a/DungeonShooting_Godot/scene/test/TestTileLayer.tscn +++ b/DungeonShooting_Godot/scene/test/TestTileLayer.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=13 format=3 uid="uid://d1m4kunwifxax"] [ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="1"] -[ext_resource type="Texture2D" uid="uid://chd2vtesap5cf" path="res://resource/sprite/role/enemy0001/enemy0001.png" id="2"] +[ext_resource type="Texture2D" uid="uid://chd2vtesap5cf" path="res://resource/sprite/role/enemy0001/Enemy0001.png" id="2"] [ext_resource type="Texture2D" uid="uid://5geiuvv6hyov" path="res://resource/sprite/gun/gun2.png" id="3"] [ext_resource type="Texture2D" uid="uid://dto03bc2qbhnj" path="res://resource/sprite/shell/shellCase.png" id="4"] diff --git a/DungeonShooting_Godot/src/framework/common/Utils.cs b/DungeonShooting_Godot/src/framework/common/Utils.cs index ce86420..5a29fce 100644 --- a/DungeonShooting_Godot/src/framework/common/Utils.cs +++ b/DungeonShooting_Godot/src/framework/common/Utils.cs @@ -15,8 +15,8 @@ { var dateTime = DateTime.Now; var num = dateTime.Year * 100000 + dateTime.Month * 100000 + dateTime.Day * 100000 + dateTime.Hour * 10000 + dateTime.Minute * 100 + dateTime.Second; - _random = new Random(0); - //_random = new Random(num); + //_random = new Random(0); + _random = new Random(num); GD.Print("随机种子为: ", num); } diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index f1e07f6..704edb3 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -95,7 +95,7 @@ DungeonConfig = new DungeonConfig(); DungeonConfig.GroupName = "testGroup"; - DungeonConfig.RoomCount = 5; + DungeonConfig.RoomCount = 20; } public override void _EnterTree() diff --git a/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs b/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs index b8ef2bf..66ebb91 100644 --- a/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs +++ b/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs @@ -41,10 +41,10 @@ //抬起角度 UpliftAngle = 10; //开火位置 - FirePosition = new Vector2(19, -1.5f); - //握把位置 - SpritePosition = new Vector2(4, 0); - //ShellPosition = new Vector2(4, -2.5f); + FirePosition = new Vector2(21, -3f); + //精灵位置 + SpritePosition = new Vector2(6, -1); + ShellPosition = new Vector2(7.5f, -4.5f); AiUseAttribute = Clone(); AiUseAttribute.AiTargetLockingTime = 0.5f; @@ -93,7 +93,10 @@ //抬起角度 UpliftAngle = 30; //开火位置 - FirePosition = new Vector2(12.5F, 2.5F); + FirePosition = new Vector2(13, -2); + //精灵位置 + SpritePosition = new Vector2(5, 0); + ShellPosition = new Vector2(5, -3); AiUseAttribute = Clone(); AiUseAttribute.AiTargetLockingTime = 1f; diff --git a/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs b/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs index 549a8ee..ca471e9 100644 --- a/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs +++ b/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs @@ -42,7 +42,11 @@ MaxBacklash = 6; MinBacklash = 5; //开火位置 - FirePosition = new Vector2(22.5F, 5F); + FirePosition = new Vector2(22, -4); + //精灵位置 + SpritePosition = new Vector2(9, -2); + ShellPosition = new Vector2(3, -4); + BulletId = ActivityIdPrefix.Bullet + "0002"; AiUseAttribute = Clone();