diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn index 543177a..e6b0739 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=10 format=3 uid="uid://doj2eilx1xtxf"] -[ext_resource type="Script" path="res://src/game/activity/weapon/gun/Shotgun.cs" id="1_8kiv4"] +[ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_hgtyo"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_8nvny"] [ext_resource type="SpriteFrames" uid="uid://domhmo4flmlt0" path="res://resource/spriteFrames/Weapon0002.tres" id="3_4h3je"] @@ -59,7 +59,7 @@ [node name="Weapon0002" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] collision_layer = 4 -script = ExtResource("1_8kiv4") +script = ExtResource("1_hgtyo") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") GripPoint = NodePath("GripPoint") diff --git a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn index 7c48b25..379a4bf 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn +++ b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn @@ -20,7 +20,7 @@ position = Vector2(129, 68) script = ExtResource("3_m4jrh") Type = 5 -ItemExpression = "0002" +ItemExpression = "0002(CurrAmmon:0)" WaveNumber = 2 [node name="ActivityMark5" type="Node2D" parent="."] diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs index 06d1a0c..5347809 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs @@ -1161,7 +1161,7 @@ } } - if (ResidueAmmo != 0 && CurrAmmo != Attribute.AmmoCapacity) //继续装弹 + if (!_aloneReloadStop && ResidueAmmo != 0 && CurrAmmo != Attribute.AmmoCapacity) //继续装弹 { ReloadHandler(); } @@ -1197,7 +1197,7 @@ //帧动画播放结束 private void OnAnimationFinished() { - GD.Print("帧动画播放结束..."); + // GD.Print("帧动画播放结束..."); AnimatedSprite.Play(AnimatorNames.Default); } diff --git a/DungeonShooting_Godot/src/game/activity/weapon/gun/Shotgun.cs b/DungeonShooting_Godot/src/game/activity/weapon/gun/Shotgun.cs deleted file mode 100644 index 4525bc5..0000000 --- a/DungeonShooting_Godot/src/game/activity/weapon/gun/Shotgun.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Godot; - -[Tool, GlobalClass] -public partial class Shotgun : Weapon -{ - protected override void OnFire() - { - //创建一个弹壳 - ThrowShell(ActivityObject.Ids.Id_shell0001); - - if (Master == Player.Current) - { - //创建抖动 - GameCamera.Main.DirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 2f); - } - - //创建开火特效 - var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_ShotFire_tscn); - var sprite = packedScene.Instantiate(); - sprite.GlobalPosition = FirePoint.GlobalPosition; - sprite.GlobalRotation = FirePoint.GlobalRotation; - sprite.AddToActivityRoot(RoomLayerEnum.YSortLayer); - } - - protected override void OnShoot(float fireRotation) - { - ShootBullet(fireRotation, Attribute.BulletId); - } -}