// Update is called once per frame void Update() { if (Application.loadedLevel == 6 && GameObject.FindWithTag("GLOBALTIMER") != null) { globalTimer = GameObject.FindWithTag("GLOBALTIMER").GetComponent <GLOBALTIMER>(); } if (Application.loadedLevel == 1) { shouldUserBeRemembered = false; } if (globalTimer != null && shouldUserBeRemembered) { savedUsername = globalTimer.nameInputField.text; savedPassword = globalTimer.passwordInputField.text; } if (!shouldUserBeRemembered && globalTimer != null && globalTimer.actualNameInputField != null && globalTimer.actualPasswordInputfield != null) { globalTimer.actualNameInputField.text = savedUsername; globalTimer.actualPasswordInputfield.text = savedPassword; // globalTimer.nameInputField.text = "AAA"; //globalTimer.passwordInputField.text = "AAA"; //Debug.Log("AAA"); shouldUserBeRemembered = true; } }
void Start() { badWords = new string[] { "shit", "c**t", "c**k", "f**k", "asshole", "bitch", "hell", "nigger", "bastard", "f****t", "suck", "dick", "crap", "rape", "rapist", "pussy" }; startLoading = true; loadTimer = 0f; if (Application.loadedLevel == 6 && GameObject.FindWithTag("GLOBALTIMER") != null && GameObject.FindWithTag("REMEMBERME") != null) { globalTimer = GameObject.FindWithTag("GLOBALTIMER").GetComponent <GLOBALTIMER>(); rememberMe = GameObject.FindWithTag("REMEMBERME").GetComponent <RememberMe>(); roundedScore = Mathf.Round(globalTimer.globalTimer * 1000f) / 1000f; } }
void Awake() { DontDestroyOnLoad(gameObject); // If no player ever existed, we are it. if (instance6 == null) { instance6 = this; } // If one already exists, its because it came from another level. else if (instance6 != this) { Destroy(gameObject); return; } if (Application.loadedLevel == 6 && GameObject.FindWithTag("GLOBALTIMER") != null) { globalTimer = GameObject.FindWithTag("GLOBALTIMER").GetComponent <GLOBALTIMER>(); } }