diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityBase.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityBase.xlsx index 493e10a..93b8a71 100644 --- a/DungeonShooting_Godot/excel/excelFile/ActivityBase.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/ActivityBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx b/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx index c694b8d..385ecc5 100644 --- a/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/BulletBase.xlsx b/DungeonShooting_Godot/excel/excelFile/BulletBase.xlsx index e92fca5..2777096 100644 --- a/DungeonShooting_Godot/excel/excelFile/BulletBase.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/BulletBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx index d2b3795..a1a82fc 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/WeaponBase.xlsx b/DungeonShooting_Godot/excel/excelFile/WeaponBase.xlsx index 72f5665..c8f287d 100644 --- a/DungeonShooting_Godot/excel/excelFile/WeaponBase.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/WeaponBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn new file mode 100644 index 0000000..e20c5ef --- /dev/null +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn @@ -0,0 +1,107 @@ +[gd_scene load_steps=10 format=3 uid="uid://2lb2h8qunqyu"] + +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_6fbtx"] +[ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_eprgt"] +[ext_resource type="SpriteFrames" uid="uid://c0xwj3kpk02ua" path="res://resource/spriteFrames/weapon/Weapon0009.tres" id="2_4kxpd"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] +resource_local_to_scene = true +shader = ExtResource("1_6fbtx") +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 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"] +resource_local_to_scene = true +shader = ExtResource("1_6fbtx") +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 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_jbuu3"] +size = Vector2(18, 6) + +[sub_resource type="Animation" id="Animation_x136i"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0] +} + +[sub_resource type="Animation" id="Animation_3piau"] +resource_name = "floodlight" +length = 3.0 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 2.3, 2.6, 2.7, 3), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 0, +"values": [0, 0, 0.5, 0.5, 0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"] +_data = { +"RESET": SubResource("Animation_x136i"), +"floodlight": SubResource("Animation_3piau") +} + +[node name="Weapon0009" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_eprgt") +FirePoint = NodePath("AnimatedSprite/FirePoint") +ShellPoint = NodePath("AnimatedSprite/ShellPoint") +GripPoint = NodePath("GripPoint") +AnimationPlayer = NodePath("AnimationPlayer") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_cbiyh") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_o36tv") +sprite_frames = ExtResource("2_4kxpd") +frame_progress = 1.0 + +[node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] +position = Vector2(-1, -1) + +[node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] +position = Vector2(13, -0.5) + +[node name="GripPoint" type="Marker2D" parent="."] +position = Vector2(-6, 1) + +[node name="Collision" type="CollisionShape2D" parent="."] +visible = false +position = Vector2(0, 1) +shape = SubResource("RectangleShape2D_jbuu3") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_trkjd") +} diff --git a/DungeonShooting_Godot/resource/config/ActivityBase.json b/DungeonShooting_Godot/resource/config/ActivityBase.json index f411760..eba092a 100644 --- a/DungeonShooting_Godot/resource/config/ActivityBase.json +++ b/DungeonShooting_Godot/resource/config/ActivityBase.json @@ -100,6 +100,16 @@ "ShowInMapEditor": true }, { + "Id": "weapon0009", + "Type": 5, + "Name": "\u69B4\u5F39\u53D1\u5C04\u5668", + "Intro": "", + "Details": "", + "Prefab": "res://prefab/weapon/Weapon0009.tscn", + "Icon": "res://resource/sprite/weapon/weapon0009/Weapon0009.png", + "ShowInMapEditor": true + }, + { "Id": "bullet0001", "Type": 6, "Name": "", diff --git a/DungeonShooting_Godot/resource/config/WeaponBase.json b/DungeonShooting_Godot/resource/config/WeaponBase.json index 73ae345..13e9c1c 100644 --- a/DungeonShooting_Godot/resource/config/WeaponBase.json +++ b/DungeonShooting_Godot/resource/config/WeaponBase.json @@ -1466,5 +1466,97 @@ "__OtherSoundMap": null, "__AiUseAttribute": "", "__AiAttackAttr": "0007" + }, + { + "Id": "0017", + "ActivityId": "weapon0009", + "Remark": "\u69B4\u5F39\u53D1\u5C04\u5668", + "Weight": 40, + "WeightType": 1, + "ContinuousShoot": false, + "AmmoCapacity": 10, + "MaxAmmoCapacity": 240, + "StandbyAmmoCapacity": 120, + "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": 300, + "FinalFiringSpeed": 300, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 0, + "FinalScatteringRange": 20, + "ScatteringRangeAddValue": 4, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 2, + "BacklashRange": [ + 2, + 3 + ], + "BacklashRegressionSpeed": 25, + "UpliftAngle": 13, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire2.tscn", + "BulletId": "1001", + "HarmRange": [ + 5 + ], + "RepelRnage": [ + 0 + ], + "BulletDeviationAngleRange": [ + 0 + ], + "BulletSpeedRange": [ + 300, + 330 + ], + "BulletDistanceRange": [ + 270, + 360 + ], + "ShellId": "", + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRnage": [ + 100 + ], + "__ShootSound": "shooting0010", + "__BeginReloadSound": "reloadBegin0011", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "reloadFinish0003", + "ReloadFinishSoundAdvanceTime": 0.8, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0016", + "__AiAttackAttr": "" } ] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png new file mode 100644 index 0000000..78f9343 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png.import b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png.import new file mode 100644 index 0000000..f19320c --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://qd7hufitblaf" +path="res://.godot/imported/weapon0009.png-f160d5b5d752036e5597a2e48024e6b3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/weapon/weapon0009/weapon0009.png" +dest_files=["res://.godot/imported/weapon0009.png-f160d5b5d752036e5597a2e48024e6b3.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/spriteFrames/weapon/Weapon0009.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0009.tres new file mode 100644 index 0000000..fc38f54 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0009.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://c0xwj3kpk02ua"] + +[ext_resource type="Texture2D" uid="uid://qd7hufitblaf" path="res://resource/sprite/weapon/weapon0009/weapon0009.png" id="1_kidjv"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_kidjv") +}], +"loop": false, +"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 bec1e3d..47d68f0 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs @@ -59,6 +59,11 @@ /// public const string Id_weapon0008 = "weapon0008"; /// + /// 名称: 榴弹发射器
+ /// 简介: + ///
+ public const string Id_weapon0009 = "weapon0009"; + /// /// 名称:
/// 简介: ///
@@ -186,6 +191,7 @@ _activityRegisterMap.Add("weapon0006", new RegisterActivityData("res://prefab/weapon/Weapon0006.tscn", ExcelConfig.ActivityBase_Map["weapon0006"])); _activityRegisterMap.Add("weapon0007", new RegisterActivityData("res://prefab/weapon/Weapon0007.tscn", ExcelConfig.ActivityBase_Map["weapon0007"])); _activityRegisterMap.Add("weapon0008", new RegisterActivityData("res://prefab/weapon/Weapon0008.tscn", ExcelConfig.ActivityBase_Map["weapon0008"])); + _activityRegisterMap.Add("weapon0009", new RegisterActivityData("res://prefab/weapon/Weapon0009.tscn", ExcelConfig.ActivityBase_Map["weapon0009"])); _activityRegisterMap.Add("bullet0001", new RegisterActivityData("res://prefab/bullet/normal/Bullet0001.tscn", ExcelConfig.ActivityBase_Map["bullet0001"])); _activityRegisterMap.Add("bullet0002", new RegisterActivityData("res://prefab/bullet/normal/Bullet0002.tscn", ExcelConfig.ActivityBase_Map["bullet0002"])); _activityRegisterMap.Add("bullet0003", new RegisterActivityData("res://prefab/bullet/normal/Bullet0003.tscn", ExcelConfig.ActivityBase_Map["bullet0003"])); diff --git a/DungeonShooting_Godot/src/framework/map/image/RoomStaticSprite.cs b/DungeonShooting_Godot/src/framework/map/image/RoomStaticSprite.cs index ae5b3c9..8eeb2bb 100644 --- a/DungeonShooting_Godot/src/framework/map/image/RoomStaticSprite.cs +++ b/DungeonShooting_Godot/src/framework/map/image/RoomStaticSprite.cs @@ -20,7 +20,7 @@ //最大残骸数量 private int _maxCount = 1000; //每个格子中最大残骸数量 - private int _stepMaxCount = 25; + private int _stepMaxCount = 30; private int _num = 0; public RoomStaticSprite(RoomInfo roomInfo) @@ -88,7 +88,8 @@ var tempList = _list[0]; if (tempList.Count > 0) { - var sprite = Utils.Random.RandomChooseAndRemove(tempList); + var sprite = tempList[0]; + tempList.RemoveAt(0); sprite.Destroy(); _count--; } diff --git a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs index fa90623..dcd0f15 100644 --- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs +++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs @@ -52,11 +52,11 @@ // CollisionMask = 0; //GameCamera.Main.Zoom = new Vector2(0.2f, 0.2f); //GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f); - // this.CallDelay(0.5f, () => - // { - // var weapon = Create(Ids.Id_weapon0008); - // PickUpWeapon(weapon); - // }); + this.CallDelay(0.5f, () => + { + var weapon = Create(Ids.Id_weapon0009); + PickUpWeapon(weapon); + }); //注册状态机 StateController.Register(new PlayerIdleState()); diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 1fff899..39004a4 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -79,6 +79,7 @@ public const string prefab_weapon_Weapon0006_tscn = "res://prefab/weapon/Weapon0006.tscn"; public const string prefab_weapon_Weapon0007_tscn = "res://prefab/weapon/Weapon0007.tscn"; public const string prefab_weapon_Weapon0008_tscn = "res://prefab/weapon/Weapon0008.tscn"; + public const string prefab_weapon_Weapon0009_tscn = "res://prefab/weapon/Weapon0009.tscn"; public const string prefab_weapon_WeaponTemplate_tscn = "res://prefab/weapon/WeaponTemplate.tscn"; public const string resource_config_ActivityBase_json = "res://resource/config/ActivityBase.json"; public const string resource_config_AiAttackAttr_json = "res://resource/config/AiAttackAttr.json"; @@ -157,6 +158,7 @@ public const string resource_sprite_effects_Explosion_png = "res://resource/sprite/effects/Explosion.png"; public const string resource_sprite_effects_common_Effect1_png = "res://resource/sprite/effects/common/Effect1.png"; public const string resource_sprite_effects_common_Smoke_png = "res://resource/sprite/effects/common/Smoke.png"; + public const string resource_sprite_effects_common_Smoke2_png = "res://resource/sprite/effects/common/Smoke2.png"; public const string resource_sprite_effects_explode_Explode_circle0001_png = "res://resource/sprite/effects/explode/Explode_circle0001.png"; public const string resource_sprite_effects_explode_Explode_line0001_png = "res://resource/sprite/effects/explode/Explode_line0001.png"; public const string resource_sprite_effects_weapon_Collision1_png = "res://resource/sprite/effects/weapon/Collision1.png"; @@ -293,6 +295,7 @@ public const string resource_sprite_weapon_weapon0007_Weapon0007_png = "res://resource/sprite/weapon/weapon0007/Weapon0007.png"; public const string resource_sprite_weapon_weapon0008_Weapon0008_png = "res://resource/sprite/weapon/weapon0008/Weapon0008.png"; public const string resource_sprite_weapon_weapon0008_Weapon0008_reloading_png = "res://resource/sprite/weapon/weapon0008/Weapon0008_reloading.png"; + public const string resource_sprite_weapon_weapon0009_weapon0009_png = "res://resource/sprite/weapon/weapon0009/weapon0009.png"; public const string resource_spriteFrames_bullet_Bullet0001_tres = "res://resource/spriteFrames/bullet/Bullet0001.tres"; public const string resource_spriteFrames_bullet_Bullet0002_tres = "res://resource/spriteFrames/bullet/Bullet0002.tres"; public const string resource_spriteFrames_bullet_Bullet0003_tres = "res://resource/spriteFrames/bullet/Bullet0003.tres"; @@ -328,20 +331,19 @@ public const string resource_spriteFrames_weapon_Weapon0006_tres = "res://resource/spriteFrames/weapon/Weapon0006.tres"; public const string resource_spriteFrames_weapon_Weapon0007_tres = "res://resource/spriteFrames/weapon/Weapon0007.tres"; public const string resource_spriteFrames_weapon_Weapon0008_tres = "res://resource/spriteFrames/weapon/Weapon0008.tres"; + public const string resource_spriteFrames_weapon_Weapon0009_tres = "res://resource/spriteFrames/weapon/Weapon0009.tres"; public const string resource_theme_mainTheme_tres = "res://resource/theme/mainTheme.tres"; public const string resource_theme_theme1_tres = "res://resource/theme/theme1.tres"; public const string scene_Main_tscn = "res://scene/Main.tscn"; public const string scene_World_tscn = "res://scene/World.tscn"; - public const string scene_test_TestCommpont_tscn = "res://scene/test/TestCommpont.tscn"; public const string scene_test_TestCreateSector_tscn = "res://scene/test/TestCreateSector.tscn"; - public const string scene_test_TestExpression_tscn = "res://scene/test/TestExpression.tscn"; - public const string scene_test_TestGenerateDungeon_tscn = "res://scene/test/TestGenerateDungeon.tscn"; + public const string scene_test_TestDrawSprite_tscn = "res://scene/test/TestDrawSprite.tscn"; + public const string scene_test_TestGridData_tscn = "res://scene/test/TestGridData.tscn"; public const string scene_test_TestNavigation2_tscn = "res://scene/test/TestNavigation2.tscn"; public const string scene_test_TestNavigationPolygon_tscn = "res://scene/test/TestNavigationPolygon.tscn"; public const string scene_test_TestNewTileMap_tscn = "res://scene/test/TestNewTileMap.tscn"; public const string scene_test_TestOptimizeSprite_tscn = "res://scene/test/TestOptimizeSprite.tscn"; public const string scene_test_TestOutline_tscn = "res://scene/test/TestOutline.tscn"; - public const string scene_test_TestReadExcel_tscn = "res://scene/test/TestReadExcel.tscn"; public const string scene_test_TestRoomFog_tscn = "res://scene/test/TestRoomFog.tscn"; public const string scene_test_TestTileLayer_tscn = "res://scene/test/TestTileLayer.tscn"; } \ No newline at end of file