fix:调整联机时最后一波敌人抖动问题
This commit is contained in:
@@ -247,7 +247,7 @@ public class GameManager : NetworkBehaviour
|
||||
// 延迟1s后给所有人发放武器
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
GivePistol();
|
||||
GivePistol(GunType.Pistol);
|
||||
}, 1f);
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
@@ -257,10 +257,10 @@ public class GameManager : NetworkBehaviour
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
public void GivePistol()
|
||||
public void GivePistol(GunType type)
|
||||
{
|
||||
Debug.Log("创建武器中...");
|
||||
GameLocal.Ins.self.PickUpGun(GunType.Pistol, -999);
|
||||
GameLocal.Ins.self.PickUpGun(type, -999);
|
||||
}
|
||||
|
||||
[Server]
|
||||
@@ -288,7 +288,7 @@ public class GameManager : NetworkBehaviour
|
||||
{
|
||||
Debug.LogError("开启End事件");
|
||||
gameState = GameState.EndEvent;
|
||||
GameLocal.Ins.self.PickUpGun(GunType.MeleeWeapon, -999);
|
||||
GivePistol(GunType.MeleeWeapon);
|
||||
foreach (var item in PlayerAiList.Values)
|
||||
{
|
||||
item.EndEvent();
|
||||
|
||||
Reference in New Issue
Block a user