Пример #1
0
    void Start()
    {
        //regularCameraRig.gameObject.SetActive(false);
        //vrCameraRig.gameObject.SetActive(false);

        // VR mode.
        if (King.isInVRMode)
        {
            /*
             *          regularCameraRig.gameObject.SetActive(false);
             *
             *          if (!vrCameraRig.gameObject.activeSelf)
             *                  vrCameraRig.gameObject.SetActive(true);
             *
             *          sight.anchor = vrCenterOfView;
             *          //cameras.Add(vrCameraRig.GetComponent<OVRCameraRig>().leftEyeCamera);
             *          //cameras.Add(vrCameraRig.GetComponent<OVRCameraRig>().rightEyeCamera);
             */
            regularCameraRig.gameObject.SetActive(true);
            //vrCameraRig.gameObject.SetActive(false);

            sight.anchor = regularCenterOfView;
            cameras.Add(regularCameraRig.GetComponentInChildren <Camera>());
        }
        // Regular mode.
        else
        {
            regularCameraRig.gameObject.SetActive(true);
            //vrCameraRig.gameObject.SetActive(false);

            sight.anchor = regularCenterOfView;
            cameras.Add(regularCameraRig.GetComponentInChildren <Camera>());
        }



        // Using Unity's native VR.

        /*
         * regularCameraRig.gameObject.SetActive(true);
         * vrCameraRig.gameObject.SetActive(false);
         *
         * sight.anchor = regularCenterOfView;
         * cameras.Add(regularCameraRig.GetComponentInChildren<Camera>());
         *
         * if (King.isInVRMode)
         *      regularCameraRig.GetComponent<MouseCameraControl>().enabled = false;
         * else
         *      regularCameraRig.GetComponent<MouseCameraControl>().enabled = true;
         */

        soundPlayer = GetComponent <PlaysSoundOnRequest>();

        // Prepare an object for fading main camera in/out.
        //var blinkTextureGO = iTween.CameraFadeAdd();
        //blinkTextureGO.transform.parent = transform;

        screenFader.anchor = sight.anchor;
    }
Пример #2
0
    void Start()
    {
        _animator   = GetComponent <Animator>();
        floater     = GetComponent <Floater>();
        voicePlayer = GetComponent <PlaysSoundOnRequest>();

        StartCoroutine(StartAfterCo(3f));
    }
Пример #3
0
    void Start()
    {
        audioPlayer = GetComponent <PlaysSoundOnRequest>();

        foreach (RecipeIcon icon in recipeIcons)
        {
            icon.GetComponent <InteractiveObject>().isAbleToInteract = false;
        }
    }
Пример #4
0
    protected virtual void Start()
    {
        foreach (var receiver in receivers)
        {
            receiver.AddContributor(this);
        }

        audioPlayer = GetComponent <PlaysSoundOnRequest>();
        if (audioPlayer == null)
        {
            audioPlayer = gameObject.AddComponent <PlaysSoundOnRequest>();
        }
    }
Пример #5
0
    void Start()
    {
        soundPlayer = GetComponent <PlaysSoundOnRequest>();

        onShowPosition = King.visitor.transform.position + Vector3.forward * 1.3f + Vector3.up * 1.88f;
        onHidePosition = onShowPosition + Vector3.up * 1.6f;

        body.transform.position = onHidePosition;

        reticle.SetBody(0);

        body.SetActive(false);
    }
Пример #6
0
    void Start()
    {
        audioPlayer = GetComponent<PlaysSoundOnRequest>();

        foreach(RecipeIcon icon in recipeIcons) {
            icon.GetComponent<InteractiveObject>().isAbleToInteract = false;
        }
    }
Пример #7
0
 void Start()
 {
     soundPlayer = GetComponent<PlaysSoundOnRequest>();
 }
Пример #8
0
 void Start()
 {
     soundPlayer = GetComponent <PlaysSoundOnRequest>();
 }
Пример #9
0
    protected override void Init()
    {
        base.Init ();

        audioPlayer = GetComponent<PlaysSoundOnRequest>();
    }
Пример #10
0
 void Start()
 {
     initScale   = transform.localScale;
     soundPlayer = GetComponent <PlaysSoundOnRequest>();
     StartCoroutine(BeatCo());
 }
Пример #11
0
    protected override void Init()
    {
        base.Init();

        audioPlayer = GetComponent <PlaysSoundOnRequest>();
    }
Пример #12
0
 void Start()
 {
     soundPlayer = GetComponent<PlaysSoundOnRequest>();
     initScale = transform.localScale;
 }
Пример #13
0
 void Start()
 {
     soundPlayer = GetComponent <PlaysSoundOnRequest>();
     initScale   = transform.localScale;
 }
Пример #14
0
    protected virtual void Start()
    {
        foreach (var receiver in receivers) {
            receiver.AddContributor(this);
        }

        audioPlayer = GetComponent<PlaysSoundOnRequest>();
        if (audioPlayer == null) {
            audioPlayer = gameObject.AddComponent<PlaysSoundOnRequest>();
        }
    }
Пример #15
0
    void Start()
    {
        soundPlayer = GetComponent<PlaysSoundOnRequest>();

        onShowPosition = King.visitor.transform.position + Vector3.forward * 1.3f + Vector3.up * 1.88f;
        onHidePosition = onShowPosition + Vector3.up * 1.6f;

        body.transform.position = onHidePosition;

        reticle.SetBody(0);

        body.SetActive(false);
    }
Пример #16
0
 void Start()
 {
     initScale = transform.localScale;
     soundPlayer = GetComponent<PlaysSoundOnRequest>();
     StartCoroutine(BeatCo());
 }