void GetReferences()
 {
     generatePassword        = FindObjectOfType <GeneratePassword>();
     m_safeLocksScript       = safeLogic.GetComponent <SafeLocks>();
     m_hackingDocumentScript = ai.GetComponent <HackingDocuments>();
     m_passwordSavingScript  = gameObject.GetComponent <Passwords>();
 }
 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_totalPower        = totalPower;
     m_lightPower        = lightPower;
     m_cameraPower       = cameraPower;
     m_doorUnlockedPower = doorUnlockedPower;
     m_doorLockedPower   = doorLockedPower;
     UpdatePowerText();
     UpdatePowerBar();
     m_hackingDocScript            = gameObject.GetComponent <HackingDocuments>();
     m_hackingDocScript.powerValue = m_totalPower;
     m_aiSwitchButtonPower         = aiSwitchButtonPower;
 }
 // Use this for initialization
 void Start()
 {
     m_scientistButtonNo          = Random.Range(0, 8);
     m_aiButtonNo                 = Random.Range(0, 8);
     m_blackoutScript             = blackoutCanvas.GetComponent <Blackout>();
     m_doorControllerScript       = ai.GetComponent <DoorController>();
     m_aiPowerScript              = ai.GetComponent <AIPower>();
     m_robotBodyScript            = robotBody.GetComponent <RobotBody>();
     m_timerScript                = gameController.GetComponent <Timer>();
     m_hackingDocumentScript      = ai.GetComponent <HackingDocuments>();
     m_aiButtonPressedText        = aiButtonPressedGO.GetComponent <Text>();
     m_scientistButtonPressedText = scientistButtonPressedGO.GetComponentInChildren <Text>();
     TextWriteUp();
 }
Exemple #5
0
    // Use this for initialization
    void Start()
    {
        m_blackoutScript        = blackoutCanvas.GetComponent <Blackout>();
        m_doorControllerScript  = ai.GetComponent <DoorController>();
        m_lightControllerScript = ai.GetComponent <LightController>();
        m_cameraController      = ai.GetComponent <CameraController>();
        m_aiPowerScript         = ai.GetComponent <AIPower>();
        m_robotBodyScript       = robotBody.GetComponent <RobotBody>();
        m_timerScript           = gameController.GetComponent <Timer>();
        m_hackingDocumentScript = ai.GetComponent <HackingDocuments>();
        m_buttonAudioSource     = switchesButton.GetComponent <AudioSource>();
        m_buttonAnimator        = switchesButton.GetComponent <Animator>();
        m_randObjects           = Random.Range(0, 3);
        m_randPower             = Random.Range(0, 3);

        for (int i = 0; i < m_actionNumber.Length; i++)
        {
            m_numberList.Add(i);
        }

        for (int i = 0; i < m_actionNumber.Length; i++)
        {
            int randomNo = Random.Range(0, m_numberList.Count);
            m_actionNumber[i] = m_numberList[randomNo];

            m_numberList.Remove(m_numberList[randomNo]);
            if (m_actionNumber[i] != 7)
            {
                m_actionMessages[i] = string.Format("Switches on {0} will {1}", m_switchPositions[i], m_actions[m_actionNumber[i]]);
            }
            else
            {
                m_actionMessages[i] = string.Format("Switches on {0} will increase {1} by {2} power", m_switchPositions[i], m_poweredObjects[m_randObjects], m_powerIncreased[m_randPower]);
            }
            if (i == 0)
            {
                m_currentNumber = m_actionNumber[i];
                //print(m_currentNumber);
            }
            if (m_actionNumber[i] == 3)
            {
                robotBodySwitches.text = string.Format("Switches are required to be at: {0}", m_switchPositions[i]);
            }
        }
        ScientistSwitchInfo();
        AISwitchInfo();
    }
    // 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();
    }
Exemple #7
0
    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();
    }
Exemple #8
0
    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);
    }