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; }
void Start() { _animator = GetComponent <Animator>(); floater = GetComponent <Floater>(); voicePlayer = GetComponent <PlaysSoundOnRequest>(); StartCoroutine(StartAfterCo(3f)); }
void Start() { audioPlayer = GetComponent <PlaysSoundOnRequest>(); foreach (RecipeIcon icon in recipeIcons) { icon.GetComponent <InteractiveObject>().isAbleToInteract = false; } }
protected virtual void Start() { foreach (var receiver in receivers) { receiver.AddContributor(this); } audioPlayer = GetComponent <PlaysSoundOnRequest>(); if (audioPlayer == null) { audioPlayer = gameObject.AddComponent <PlaysSoundOnRequest>(); } }
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); }
void Start() { audioPlayer = GetComponent<PlaysSoundOnRequest>(); foreach(RecipeIcon icon in recipeIcons) { icon.GetComponent<InteractiveObject>().isAbleToInteract = false; } }
void Start() { soundPlayer = GetComponent<PlaysSoundOnRequest>(); }
void Start() { soundPlayer = GetComponent <PlaysSoundOnRequest>(); }
protected override void Init() { base.Init (); audioPlayer = GetComponent<PlaysSoundOnRequest>(); }
void Start() { initScale = transform.localScale; soundPlayer = GetComponent <PlaysSoundOnRequest>(); StartCoroutine(BeatCo()); }
protected override void Init() { base.Init(); audioPlayer = GetComponent <PlaysSoundOnRequest>(); }
void Start() { soundPlayer = GetComponent<PlaysSoundOnRequest>(); initScale = transform.localScale; }
void Start() { soundPlayer = GetComponent <PlaysSoundOnRequest>(); initScale = transform.localScale; }
protected virtual void Start() { foreach (var receiver in receivers) { receiver.AddContributor(this); } audioPlayer = GetComponent<PlaysSoundOnRequest>(); if (audioPlayer == null) { audioPlayer = gameObject.AddComponent<PlaysSoundOnRequest>(); } }
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); }
void Start() { initScale = transform.localScale; soundPlayer = GetComponent<PlaysSoundOnRequest>(); StartCoroutine(BeatCo()); }