示例#1
0
 private void Start()
 {
     xrayTimeRemaining     = maxXrayDuration;
     cooldownTimeRemaining = maxCooldownTime;
     xrayEffect            = GetComponent <ReplacementShaderEffect>();
     StopXray();
 }
示例#2
0
    void Start()
    {
        // Getting the gamepad
        manager = GamepadManager.Instance;
        gamepad = manager.GetGamepad(playerIndex);

        // Getting the shader scripts from the camera
        bawShader   = Camera.main.GetComponent <ReplacementShaderEffect>();
        postProcess = Camera.main.GetComponent <PostProcessingBehaviour>();
        glowFlash   = Camera.main.GetComponent <QuickGlow>();

        // Finding the black image animator inside the scene
        Animator[] _allAnimator = FindObjectsOfType <Animator>();
        foreach (Animator anim in _allAnimator)
        {
            if (anim.gameObject.name == "BlackImage")
            {
                blackImageAnimator = anim;
            }
        }

        // Finding the white image animator inside the scene
        foreach (Animator anim in _allAnimator)
        {
            if (anim.gameObject.name == "WhiteImage")
            {
                whiteImageAnimator = anim;
            }
        }

        lightManager = Camera.main.GetComponent <LightManager>();

        // Setting the light rendering settings in the camera
        if (isCrane == true)
        {
            lightManager.hasCraneLights = true;
        }

        // Adding the appropriate lense to the list if toggled in the inspector
        if (isCrane == false)
        {
            lensesList.Add("bawLense");
        }

        if (isCrane == true)
        {
            // later on : the nightLense should be added to the lenseList if the crane bird takes it
            lensesList.Add("nightLense");
        }

        // Setting no lense as the initial lense
        lensCounter = 0;
        currentLens = lensesList[lensCounter];
    }
示例#3
0
 // Use this for initialization
 void Start()
 {
     smallPlayer = FindObjectOfType <SmallPlayerController>();
     xRayPowerUp = false;
     centerEye   = GameObject.Find("CenterEyeAnchor");
     xRay        = centerEye.GetComponent <ReplacementShaderEffect>();
     hackPoints  = FindObjectOfType <HackPoints>();
     VictorySmallPlayer(false); //turning off the victory sign (and possibly sounds and other stuff)
     DeathSmallPlayer(false);
     gameIsPaused = false;
     pauseText.gameObject.SetActive(false);
     pauseVRText.gameObject.SetActive(false);
     Portal.SetActive(false);
 }