Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
    private void Start()
    {
        startNet = NetworkManager.GetComponent <StartNet>();
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        lifeCounter = 2;
    }