UnRegisterPlayer() public static method

public static UnRegisterPlayer ( string _playerID ) : void
_playerID string
return void
Ejemplo n.º 1
0
 void OnDisable()
 {
     if (sceneCamera != null)
     {
         sceneCamera.gameObject.SetActive(true);
     }
     GameManager.UnRegisterPlayer(transform.name);
 }
    // When we are destroyed
    void OnDisable()
    {
        Destroy(playerUIInstance);

        GameManager.instance.SetSceneCameraActive(true);

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 3
0
 private void OnDisable()
 {
     if (cam.gameObject != null)
     {
         cam.gameObject.SetActive(true);
         GameManager.UnRegisterPlayer(transform.name);
     }
 }
    void OnDisable() //To re-enable sceneCamera when player disconnects.
    {
        if (sceneCamera != null)
        {
            sceneCamera.gameObject.SetActive(true);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 5
0
    void OnDisable()
    {
        if (startUpCamera != null)
        {
            Camera.main.gameObject.SetActive(true);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
 void OnDisable()  //Is called when objectis destroyed
 {
     Cursor.lockState = CursorLockMode.None;
     if (sceneCamera != null)
     {
         sceneCamera.gameObject.SetActive(true);
     }
     GameManager.UnRegisterPlayer(transform.name);
 }
Ejemplo n.º 7
0
    void OnDisable()
    {
        if (playerUIInstance != null)
        {
            Destroy(playerUIInstance.gameObject);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 8
0
 void OnDisable()
 {
     if (isLocalPlayer)
     {
         GameManager.inst.SetSceneCameraActive(true);
     }
     GameManager.UnRegisterPlayer(networkID);
     Destroy(GUIInst);
 }
Ejemplo n.º 9
0
 private void OnDisable()
 {
     Destroy(playerUIInstance);
     if (isLocalPlayer)
     {
         GameManager.instance.SetSceneCameraActive(true);
     }
     GameManager.UnRegisterPlayer(transform.name);
 }
Ejemplo n.º 10
0
 private void OnDisable()
 {
     Destroy(playerUIInstance);
     if (sceneCamera != null)
     {
         sceneCamera.gameObject.SetActive(true);
     }
     GameManager.UnRegisterPlayer(transform.name);
 }
Ejemplo n.º 11
0
    void OnDisable()
    {
        if (isLocalPlayer)
        {
            GameManager.Instance.SetSceneCameraActive(true);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 12
0
    // When we are destroyed
    void OnDisable()
    {
        if (isLocalPlayer)
        {
            Destroy(playerUIInstance);
            GameManager.singleton.SetSceneCameraActive(true);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 13
0
    //When object is destroyed
    void OnDisable()
    {
        Debug.Log("destroyed or maybe not active");

        if (isLocalPlayer)
        {
            GameManager.instance.SetSceneCameraActive(true);
        }
        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 14
0
    void OnDisable()
    {
        Destroy(playerUIinstance);
        if (maincamera != null)
        {
            maincamera.gameObject.SetActive(true);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 15
0
 private void OnDisable()
 {
     Destroy(playerUIInstance);
     if (sceneCamera)
     {
         Debug.Log("reactivate scene camera");
         sceneCamera.gameObject.SetActive(true);
     }
     GameManager.UnRegisterPlayer(transform.name);
 }
Ejemplo n.º 16
0
 void OnDisable()
 {
     Destroy(playerUIInstance);
     // Re enable scene camera
     if (sceneCamera != null)
     {
         sceneCamera.gameObject.SetActive(true);
     }
     // Unregister when is destroy
     GameManager.UnRegisterPlayer(transform.name);
 }
Ejemplo n.º 17
0
    void OnDisable()
    {
        Debug.LogError("OnDisable");
        Destroy(guiInstance);

        if (isLocalPlayer)
        {
            GameManager.Instance.SetSceneCameraActive(true);
        }
        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 18
0
    void OnDisable()//when this gameObject is disabled
    {
        Destroy(playerGUIInstance);

        if (isLocalPlayer)
        {
            GameManager.instance.SetSceneCamera(true);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 19
0
    void OnDisable()
    {
        if (isLocalPlayer)
        {
            GameManager.singelton.SetSceneCameraActive(true);
            Destroy(playerUIInstance);
            Cursor.visible = true;
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 20
0
    void OnDisable()
    {
        Destroy(playerUIInstance);

        // if(sceneCamera != null) {
        //     sceneCamera.gameObject.SetActive(true);
        // }

        GameManager.instance.SetSceneCameraActive(true);

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 21
0
    //When we are destroyed
    void OnDisable()
    {
        Destroy(playerUIInstance);

        //Re-enable the scene camera
        if (sceneCamera != null)
        {
            sceneCamera.gameObject.SetActive(false);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 22
0
        /*
         * Called when an object is destroyed
         * In this case if a player is destroyed the scene camera is set to active
         * This will be helpful on disconnect.
         *
         * And we get the players name and we UnRegister the player
         */
        private void OnDisable()
        {
            Debug.Log("DISABLED " + name);
            Destroy(_playerUiInstance);
            if (isLocalPlayer)
            {
                GameManager.Singleton.SetSceneCamera(true);
            }


            //Deregister player
            GameManager.UnRegisterPlayer(transform.name);
        }
Ejemplo n.º 23
0
    //When we are destroyed
    void OnDisable()
    {
        StopAllCoroutines();

        Destroy(playerUIInstance);

        if (isLocalPlayer)
        {
            GameManager.instance.SetSceneCameraActive(true);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 24
0
    //when player is destroyed
    private void OnDisable()
    {
        //destory player UI
        Destroy(playerUIInstance);

        if (isLocalPlayer)
        {
            //Re-enable the scene camera
            GameManager.instance.SetSceneCameraActive(true);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
    // wenn der Spieler deaktiviert (oder gelöscht) wurde, dann zeige wieder die sceneCamera
    void OnDisable()
    {
        // Cursor wieder sichtbar machen
        Cursor.lockState = CursorLockMode.None;

        Destroy(playerUIInstance);

        if (sceneCamera != null)
        {
            sceneCamera.gameObject.SetActive(true);
        }
        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 26
0
    private void OnDisable()
    {
        Destroy(playerUIInstance);

        if (isLocalPlayer)
        {
            GameManager.instance.SetSceneCameraActive(true);
        }

        string _netID = GetComponent <NetworkIdentity>().netId.ToString();

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 27
0
    //When we are destroyed
    //To re enable the camera
    void OnDisable()
    {
        //To destroy player UI
        Destroy(playerUIInstance);

        if (isLocalPlayer)
        {
            GameManager.instance.SetSceneCameraActive(true);
        }

        //To deregister players once they are killed
        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 28
0
    // When we are destroyed
    void OnDisable()
    {
        Destroy(playerUIInstance);

        if (isLocalPlayer)
        {
            GameManager.instance.SetSceneCameraActive(true);

            Cursor.lockState = CursorLockMode.None;
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 29
0
    private void OnDisable()
    {
        if (isLocalPlayer)
        {
            Cursor.lockState = CursorLockMode.None;
            Cursor.visible   = true;

            // This is only to get rid of errors when exiting the game while in the unity editor
            if (sceneCamera != null)
            {
                sceneCamera.SetActive(true);
            }
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Ejemplo n.º 30
0
    void OnDisable()
    {
        if (!this.isLocalPlayer)
        {
            return;
        }

        if (sceneCamera != null)
        {
            sceneCamera.gameObject.SetActive(true);
        }
        Cursor.visible   = true;
        Cursor.lockState = CursorLockMode.None;

        GameManager.UnRegisterPlayer(transform.name);
    }