void GetReferences() { m_scientistWinScript = scientist.GetComponent <ScientistWin>(); m_safeAS = safe.GetComponent <AudioSource>(); m_freezeControls = gameController.GetComponent <FreezeControls>(); m_hackingDocuments = ai.GetComponent <HackingDocuments>(); m_safeAnim = safe.GetComponent <Animator>(); }
// Use this for initialization void Start() { m_safeLockScript = GetComponent <SafeLocks>(); m_firstPersonControllerScript = scientist.GetComponent <FirstPersonController>(); m_freezeControls = gameController.GetComponent <FreezeControls>(); m_scientistWinScript = scientist.GetComponent <ScientistWin>(); 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() { //print("Start"); m_scientistWinScript = scientist.GetComponent <ScientistWin>(); m_safeAS = safe.GetComponent <AudioSource>(); m_freezeControls = gameController.GetComponent <FreezeControls>(); m_hackingDocuments = ai.GetComponent <HackingDocuments>(); m_safeAnim = safe.GetComponent <Animator>(); UpdatePanels(); m_lockedOutTime = lockedOutTime; m_countingDown = m_lockedOutTime; locksText.text = string.Format("({0}/3) Locks Unlocked", m_locksUnlocked); m_correctStarSign = Random.Range(0, 12); starsignImage.sprite = starsigns[m_currentStarsign]; string starsignMessage = string.Format("////CONFIDENTIAL////\n---For Authorised Personnel Only---\nThe star sign that unlocks the safe is {0}", starsignNames[m_correctStarSign]); documentButtons[0].GetComponent <DocumentButton>().documentText = string.Format("The star sign that unlocks the safe is {0}", starsignNames[m_correctStarSign]); scientistComputerScript.ReceiveStarsign(starsignMessage); m_hackingDocuments.RecieveDocumentMessages(starsignMessage, 4); safeCanvas.SetActive(false); }