private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
void Start() { if (PlayerPrefs.HasKey("SecondPlayer")) { SecondPlayerBought = PlayerPrefs.GetInt("SecondPlayer"); } if (PlayerPrefs.HasKey("ThirdPlayer")) { ThirdPlayerBought = PlayerPrefs.GetInt("ThirdPlayer"); } if (PlayerPrefs.HasKey("ForthPlayer")) { ForthPlayerBought = PlayerPrefs.GetInt("ForthPlayer"); } Character2True = 0; SecondPlayerBought = 0; ThirdPlayerBought = 0; ForthPlayerBought = 0; theDiamondManager = FindObjectOfType <DiamondManager>(); diamondCountStore = theDiamondManager.diamondCount; }
void Awake() { _instance = this; }
// Use this for initialization void Start() { theDiamondManager = FindObjectOfType <DiamondManager>(); DiamondSound = GameObject.Find("Pickup Coin").GetComponent <AudioSource>(); }
void Awake(){ _instance = this; }