void GetReferences() { generatePassword = FindObjectOfType <GeneratePassword>(); m_safeLocksScript = safeLogic.GetComponent <SafeLocks>(); m_hackingDocumentScript = ai.GetComponent <HackingDocuments>(); m_passwordSavingScript = gameObject.GetComponent <Passwords>(); }
// Use this for initialization void Start() { m_safeLockScript = GetComponent <SafeLocks>(); m_firstPersonControllerScript = scientist.GetComponent <FirstPersonController>(); m_freezeControls = gameController.GetComponent <FreezeControls>(); m_agentWinScript = scientist.GetComponent <AgentWin>(); m_hackingDocumentScript = ai.GetComponent <HackingDocuments>(); m_receivePasswordScript = gameObject.GetComponent <ReceivePasswords>(); m_countingDown = m_lockedOutTime; Invoke("GetPassword", 1f); starSignImage.sprite = starSigns[m_currentStarSignNo]; RandomiseButtonOrder(); m_correctStarSign = Random.Range(0, 12); //print("correct star sign is: " + m_correctStarSign); CheckLocks(); }
void Start() { m_receivePasswordsKeys = receivePasswordsKeys; m_receivePasswordsLocks = receivePasswordsLocks; m_allPasswords = new string[m_receivePasswordsKeys.Count]; m_safeLocksScript = safeLogic.GetComponent <SafeLocks>(); m_hackingDocumentScript = ai.GetComponent <HackingDocuments>(); m_passwordSavingScript = gameObject.GetComponent <Passwords>(); for (int i = 0; i < 4; i++) { m_numbers.Add(i); } for (int i = 0; i < m_receivePasswordsLocks.Count; i++) { m_lockNumbers.Add(i); } //print(m_lockNumbers.Count); CreatePassword(); }