void Start() { audioCtrlScript = GetComponent <audioControl>(); dedCam = GameObject.Find("waitingCam"); // if (PlayerPrefs.HasKey("coins")) // { // totalCoins = PlayerPrefs.GetInt("coins"); // } // PlayerPrefs.SetInt ("coins", totalCoins); rb = GetComponent <Rigidbody2D> (); SetCheckpoint(false); res = false; dead = false; dc = GetComponent <DiscordController>(); dc.updateDetails(String.Format("In Multiplayer | ♥ {1}", SceneManager.GetActiveScene().name.Substring(3), health)); dc.updateStartTime(); if (!isServer) { dedCam.SetActive(false); } if (!GetComponent <Camera>().GetComponent <NetworkView>().isMine) { Camera.main.GetComponent <Camera>().enabled = false; } }
void Start() { audioCtrlScript = GetComponent <audioControl>(); PlayerPrefs.SetInt("health", 3); if (PlayerPrefs.HasKey("coins")) { totalCoins = PlayerPrefs.GetInt("coins"); } PlayerPrefs.SetInt("coins", totalCoins); rb = GetComponent <Rigidbody2D> (); SetCheckpoint(false); res = false; dead = false; dc = GetComponent <DiscordController>(); dc.updateDetails(String.Format("In Level {0} | ♥ {1}", SceneManager.GetActiveScene().name.Substring(3), health)); dc.updateStartTime(); }