mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-30 04:57:10 +01:00
idk 2
This commit is contained in:
@@ -12,11 +12,19 @@ using UnityEngine;
|
||||
public class GameMaster : MonoBehaviour
|
||||
{
|
||||
[Header("GameMaster")]
|
||||
<<<<<<< Updated upstream
|
||||
[SerializeField] private List<Player> Players = new List<Player>();
|
||||
private void Start()
|
||||
{
|
||||
|
||||
}
|
||||
=======
|
||||
[SerializeField] private List<Player> Players = new List<Player>();
|
||||
[SerializeField] private int countOfRounds = 10;
|
||||
|
||||
public GameObject localPlayer;
|
||||
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
private void Update()
|
||||
{
|
||||
@@ -33,4 +41,13 @@ public class GameMaster : MonoBehaviour
|
||||
Cursor.visible = false;
|
||||
}
|
||||
}
|
||||
<<<<<<< Updated upstream
|
||||
=======
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
>>>>>>> Stashed changes
|
||||
}
|
||||
|
||||
18
Assets/Scripts/GameManager/JoinLeaveManager.cs
Normal file
18
Assets/Scripts/GameManager/JoinLeaveManager.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Mirror;
|
||||
using UnityEngine;
|
||||
|
||||
public class JoinLeaveManager : MonoBehaviour
|
||||
{
|
||||
private NetworkManager networkManager;
|
||||
|
||||
public void Join(string ip, string username)
|
||||
{
|
||||
networkManager = GetComponent<NetworkManager>();
|
||||
|
||||
Debug.Log("[JoinLeaveManager] Trying to join server: " + ip + " as " + username);
|
||||
|
||||
networkManager.StartClient();
|
||||
networkManager.networkAddress = ip;
|
||||
Debug.Log("[JoinLeaveManager] " + username + " joined the server: " + ip);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/GameManager/JoinLeaveManager.cs.meta
Normal file
11
Assets/Scripts/GameManager/JoinLeaveManager.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b62b46838717d934483010f517c5b772
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user