public void CreerServeur() { //Création du serveur instantiatedMaster = Instantiate(networkMaster, Vector3.zero, Quaternion.identity) as GameObject; scriptStartNet = instantiatedMaster.GetComponent <StartNet>(); scriptStartNet.server = true; scriptStartNet.listenPort = serverPort; }
public void RejoindreServeur() { //Rejoindre serveur instantiatedMaster = Instantiate(networkMaster, Vector3.zero, Quaternion.identity) as GameObject; scriptStartNet = instantiatedMaster.GetComponent <StartNet>(); scriptStartNet.server = false; scriptStartNet.remoteIP = serverIP; scriptStartNet.listenPort = serverPort; }
private void Start() { startNet = NetworkManager.GetComponent <StartNet>(); if (Instance == null) { Instance = this; } else { Destroy(gameObject); } lifeCounter = 2; }