fix:使用完枪械 删除枪械,解决后期卡顿问题
This commit is contained in:
@@ -366,6 +366,7 @@ public class Player : NetworkRoomPlayer,IDamagable
|
||||
if (Guns.Count <= 0)
|
||||
{
|
||||
Debug.Log("无武器");
|
||||
PickUpGun(GunType.Pistol,-999);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -456,7 +457,7 @@ public class Player : NetworkRoomPlayer,IDamagable
|
||||
if (rightGun != null)
|
||||
{
|
||||
rightGun.gameObject.SetActive(false);
|
||||
NetworkServer.UnSpawn(rightGun.gameObject);
|
||||
NetworkServer.Destroy(rightGun.gameObject);
|
||||
rightGun = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user