private void Start() { player = FlameKeeper.Get().levelController.GetPlayer(); particleSystems = new List <ParticleSystem>(GetComponentsInChildren <ParticleSystem>()); WhiteOutBehaviour whiteOutBehaviour = whiteOutAnimator.GetBehaviour <WhiteOutBehaviour>(); whiteOutBehaviour.totemController = this; WhiteInBehaviour whiteInBehaviour = whiteOutAnimator.GetBehaviour <WhiteInBehaviour>(); whiteInBehaviour.totemController = this; if (startWhite) { whiteOutAnimator.SetBool("StartWhite", true); whiteOutAnimator.SetBool("WhiteIn", false); whiteOutAnimator.SetBool("WhiteOut", true); player.DisableInput(); if (!FlameKeeper.Get().levelController.CutscenesDisabled() && startingCutscene != null && startingCamera != null) { startingCamera.Priority = 100; // Start on the cutscene camera, but don't play it just yet } } foreach (ParticleSystem particleSystem in particleSystems) { particleSystem.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear); } }
private void Start() { player = FlameKeeper.Get().levelController.GetPlayer(); targetRotation = Quaternion.identity; startingPosition = this.transform.position; targetPosition = this.transform.position; }
IEnumerator Freeze() { yield return(new WaitForSeconds(0.1f)); player = FlameKeeper.Get().levelController.GetPlayer(); player.DisableInput(); yield return(new WaitForSeconds(duration)); player.EnableInput(); }
private void Update() { PlayerControllerSimple player = FlameKeeper.Get().levelController.GetPlayer(); float playerZ = player.transform.position.z; float t = Mathf.Clamp((playerZ - startingZValue) / (endingZValue - startingZValue), 0.0f, 1.0f); float depth = Mathf.Lerp(startingCameraDepth, endingCameraDepth, t); float height = Mathf.Lerp(startingCameraHeight, endingCameraHeight, t); levelCamera.transform.localPosition = new Vector3(levelCamera.transform.localPosition.x, height, depth); pedestalSpotlight.intensity = Mathf.Lerp(startingSpotlightIntensity, endingSpotlightIntensity, t); }
void Start() { shouldTransitionIn = !FlameKeeper.Get().levelController.CutscenesDisabled(); player = FlameKeeper.Get().levelController.GetPlayer(); TutorialFadeStateBehaviour tutorialFadeBehaviour = fadeInAnimator.GetBehaviour <TutorialFadeStateBehaviour>(); tutorialFadeBehaviour.tutorialTransition = this; if (!shouldTransitionIn) { overlayImage.color = Color.clear; fadeInAnimator.SetBool("Skip", true); } else { overlayImage.color = Color.black; player.DisableInput(); startingCamera.Priority = 100; // Start on the cutscene camera, but don't play it just yet fadeInAnimator.SetBool("Start", true); } }
/// <summary> /// Assign gameobject references and initialize variables /// </summary> private void Start() { currentLevel = startLevel; currentOrbitals = startLevel; pointLightController.Setup(this); player = FlameKeeper.Get().levelController.GetPlayer(); // Check to see if the pedestal is set up correctly if (orbitalTargets.Count != maxLevel) { Debug.LogWarning("Not enough orbital targets set for " + this); } if (emitters.Count != maxLevel) { Debug.LogWarning("Not enough emitters set for " + this); } if (currentLevel > 0) { activated = true; ActivatePedestal(); } if (emitters.Count > 0) { emissionColor = emitters[0].materials[1].color; } foreach (MeshRenderer ren in emitters) { emissionColorLerpTimes.Add(0.0f); } audioController = (GameObject)Instantiate(Resources.Load("audioController"), this.transform.position, this.transform.rotation); audioController.transform.SetParent(this.transform); flameParticleSystems = GetParticleSystems(); }
void Start() { played = false; player = FlameKeeper.Get().levelController.GetPlayer(); }
private void Start() { player = FlameKeeper.Get().levelController.GetPlayer(); startingRotation = this.transform.rotation; }