修改医疗包不消失

This commit is contained in:
ZYT
2025-09-05 10:31:27 +08:00
parent 3ab1f54d28
commit afb7c9211d
5 changed files with 7 additions and 14 deletions

View File

@@ -225,7 +225,7 @@ public class Player : NetworkRoomPlayer,IDamagable
if (other.tag == "WeaponProp")
{
WeaponProp prop = other.transform.GetComponent<WeaponProp>();
//prop.Collider();
if(NowGunIndex==(int)prop.weaponType)
return;

View File

@@ -26,7 +26,8 @@ public class ItemProp : NetworkBehaviour
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
{
Collider();
}, 15f);
NetworkServer.Destroy(transform.gameObject);
}, 8f);
}
[ClientRpc]
@@ -45,6 +46,6 @@ public class ItemProp : NetworkBehaviour
isDeal = true;
box.enabled = false;
transform.gameObject.SetActive(false);
NetworkServer.Destroy(transform.gameObject);
//NetworkServer.Destroy(transform.gameObject);
}
}