UnRegisterPlayer() public static method

public static UnRegisterPlayer ( string _playerID ) : void
_playerID string
return void
Beispiel #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);
    }
Beispiel #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);
    }
    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);
 }
Beispiel #7
0
    void OnDisable()
    {
        if (playerUIInstance != null)
        {
            Destroy(playerUIInstance.gameObject);
        }

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

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

        GameManager.UnRegisterPlayer(transform.name);
    }
Beispiel #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);
    }
Beispiel #14
0
    void OnDisable()
    {
        Destroy(playerUIinstance);
        if (maincamera != null)
        {
            maincamera.gameObject.SetActive(true);
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
Beispiel #15
0
 private void OnDisable()
 {
     Destroy(playerUIInstance);
     if (sceneCamera)
     {
         Debug.Log("reactivate scene camera");
         sceneCamera.gameObject.SetActive(true);
     }
     GameManager.UnRegisterPlayer(transform.name);
 }
Beispiel #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);
 }
Beispiel #17
0
    void OnDisable()
    {
        Debug.LogError("OnDisable");
        Destroy(guiInstance);

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

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

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

        GameManager.UnRegisterPlayer(transform.name);
    }
Beispiel #20
0
    void OnDisable()
    {
        Destroy(playerUIInstance);

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

        GameManager.instance.SetSceneCameraActive(true);

        GameManager.UnRegisterPlayer(transform.name);
    }
Beispiel #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);
    }
Beispiel #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);
        }
Beispiel #23
0
    //When we are destroyed
    void OnDisable()
    {
        StopAllCoroutines();

        Destroy(playerUIInstance);

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

        GameManager.UnRegisterPlayer(transform.name);
    }
Beispiel #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);
    }
Beispiel #26
0
    private void OnDisable()
    {
        Destroy(playerUIInstance);

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

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

        GameManager.UnRegisterPlayer(transform.name);
    }
Beispiel #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);
    }
    // When we are destroyed
    void OnDisable()
    {
        Destroy(playerUIInstance);

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

            Cursor.lockState = CursorLockMode.None;
        }

        GameManager.UnRegisterPlayer(transform.name);
    }
    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);
    }
Beispiel #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);
    }