diff --git a/DungeonShooting_Godot/src/game/item/weapon/bullet/Bullet.cs b/DungeonShooting_Godot/src/game/item/weapon/bullet/Bullet.cs
index d8c9cc7..bd44f44 100644
--- a/DungeonShooting_Godot/src/game/item/weapon/bullet/Bullet.cs
+++ b/DungeonShooting_Godot/src/game/item/weapon/bullet/Bullet.cs
@@ -39,6 +39,7 @@
{
//移动
var lastSlideCollision = GetLastSlideCollision();
+ //撞到墙
if (lastSlideCollision != null)
{
//创建粒子特效
diff --git a/DungeonShooting_Godot/src/game/role/Role.cs b/DungeonShooting_Godot/src/game/role/Role.cs
index b05f635..883e7c5 100644
--- a/DungeonShooting_Godot/src/game/role/Role.cs
+++ b/DungeonShooting_Godot/src/game/role/Role.cs
@@ -255,7 +255,7 @@
for (int i = 0; i < _interactiveItemList.Count; i++)
{
var item = _interactiveItemList[i];
- if (item == null)
+ if (item == null || item.IsDestroyed)
{
_interactiveItemList.RemoveAt(i--);
}
@@ -520,13 +520,12 @@
}
///
- /// 连接信号: InteractiveArea.area_entered
+ /// 连接信号: InteractiveArea.BodyEntered
/// 与物体碰撞
///
private void _OnPropsEnter(Node2D other)
{
- ActivityObject propObject = other.AsActivityObject();
- if (propObject != null)
+ if (other is ActivityObject propObject)
{
if (!_interactiveItemList.Contains(propObject))
{
@@ -536,13 +535,12 @@
}
///
- /// 连接信号: InteractiveArea.area_exited
+ /// 连接信号: InteractiveArea.BodyExited
/// 物体离开碰撞区域
///
private void _OnPropsExit(Node2D other)
{
- ActivityObject propObject = other.AsActivityObject();
- if (propObject != null)
+ if (other is ActivityObject propObject)
{
if (_interactiveItemList.Contains(propObject))
{