fix spawn monster
This commit is contained in:
parent
20c6b1dad3
commit
148e1e40e1
@ -61,7 +61,8 @@ namespace Level.BuildModules
|
|||||||
|
|
||||||
private void OnPlayerSpawned()
|
private void OnPlayerSpawned()
|
||||||
{
|
{
|
||||||
print("SASALKASUKABLYAT");
|
if (enemyList.Count == networkManager.maxMonsters) return;
|
||||||
|
|
||||||
if (networkManager.players.Count == networkManager.maxConnections)
|
if (networkManager.players.Count == networkManager.maxConnections)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < networkManager.maxMonsters; i++)
|
for (int i = 0; i < networkManager.maxMonsters; i++)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using Mirror;
|
using Mirror;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -8,7 +9,7 @@ namespace Level.BuildModules
|
|||||||
|
|
||||||
public enum RoomDoor : byte
|
public enum RoomDoor : byte
|
||||||
{
|
{
|
||||||
U,
|
U = 0,
|
||||||
D,
|
D,
|
||||||
L,
|
L,
|
||||||
R,
|
R,
|
||||||
@ -44,7 +45,7 @@ namespace Level.BuildModules
|
|||||||
|
|
||||||
private readonly SyncHashSet<RoomDoor> _disabledDoors = new();
|
private readonly SyncHashSet<RoomDoor> _disabledDoors = new();
|
||||||
|
|
||||||
private void Start()
|
private void Awake()
|
||||||
{
|
{
|
||||||
_doors.AddRange(new List<GameObject>
|
_doors.AddRange(new List<GameObject>
|
||||||
{
|
{
|
||||||
@ -53,7 +54,7 @@ namespace Level.BuildModules
|
|||||||
DoorU3, DoorD3, DoorL3, DoorR3
|
DoorU3, DoorD3, DoorL3, DoorR3
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Debug.Log(_doors.Count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnStartClient()
|
public override void OnStartClient()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user