void Awake() { if(GetComponent<LightPulse>()) { lightPulse = GetComponent<LightPulse>(); // lightPulse.StopCoroutine("Pulsate"); lightPulse.enabled = false; } }
protected override void Start() { base.Start(); SetState(OnNothing); m_PlayerLightPulse = FindObjectOfType <LightPulse>(); ParticleSystem[] particles = GetComponentsInChildren <ParticleSystem>(); m_DarkBreathParticle = particles[0]; m_DistortionParticle = particles[1]; m_FearParticle = particles[2]; m_PounceParticle = particles[3]; }
// Use this for initialization void Awake() { m_Player = FindObjectOfType <PlayerContoller>(); if (m_Player != null) { m_PlayerCamera = FindObjectOfType <CameraFollow>(); LoadLevel(); m_vPlayerInitialPos = m_Player.transform.position; m_abiPulse = m_Player.GetComponent <LightPulse>(); } }
// Increases the range and intensity of light object by set amount public void AmpLight() { // Finds the Player GameObject Player = GameObject.Find("Player"); // Finds the script on the Player responsible for lighting LightPulse lightPulse = Player.GetComponent <LightPulse>(); lightPulse.peakRange += 1f; lightPulse.baseRange += 1f; lightPulse.intensityRamp += 0.5f; lightPulse.baseIntensity += 1f; lightPulse.peakIntensity += 1f; lightPulse.rangeRamp += 0.5f; }
public override void Interact() { base.Interact(); // Finds the Player GameObject Player = GameObject.Find("Player"); // Finds the script on the Player responsible for lighting LightPulse lightPulse = Player.GetComponent <LightPulse>(); lightPulse.peakRange = 13f; // max pingpong point lightPulse.baseRange = 12f; // min ping pong point lightPulse.intensityRamp = 2f; // adjust pulse rate to new intensity lightPulse.baseIntensity = 3f; // min ping pong point lightPulse.peakIntensity = 3.5f; // max ping pong point lightPulse.rangeRamp = 2f; // adjust pulse rate to new range }
// Use this for initialization void Awake() { transform.eulerAngles = Vector3.zero; if (!m_bIsTransparent) { _Activated = true; } m_Shader = Shader.Find("Custom/Waving"); if (m_Shader == null) { throw new System.Exception("You forgot the shader."); } m_mat = new Material(m_Shader); m_player = GameManager.Instance.m_Player; if (m_player) { m_pulse = m_player.GetComponent <LightPulse>(); } SetBounds(); m_Points = CalculatePoints(); m_ShowPoints = new GrassPoints[m_Points.Length]; m_ShowPoints = (GrassPoints[])m_Points.Clone(); for (int i = 0; i < m_ShowPoints.Length; i++) { m_ShowPoints[i].opacity = 1; } m_OutputBuffer = new ComputeBuffer(m_Points.Length, 24); m_OutputBuffer.SetData(m_Points); if (m_bIsTransparent && m_player != null) { StartCoroutine(ShowGrass()); } }
public void Update() { #if UNITY_EDITOR //Bug Report if (Input.GetKeyDown(KeyCode.B)) { Application.OpenURL("https://goo.gl/forms/GgYxsACr0adXpzGc2"); } #endif if (m_Player == null) { m_Player = FindObjectOfType <PlayerContoller>(); if (m_Player != null) { m_vPlayerInitialPos = m_Player.transform.position; m_abiPulse = m_Player.GetComponent <LightPulse>(); } } }
// Use this for initialization void Start() { collisionLayer = ~(1 << 8); GameManager.Instance.m_vPlayerInitialPos = transform.position; rb = GetComponent <Rigidbody>(); camContainer = FindObjectOfType <CameraFollow>().transform; edgeDetection = camContainer.GetComponentInChildren <EdgeDetection>(); //Cursor.lockState = CursorLockMode.Locked; //Cursor.visible = false; // Abilities m_abiLightPulse = GetComponent <LightPulse>(); HealthSound(); StartCoroutine(IdleAnimations()); SoundManager.Instance.PlayEvent(SoundEvents.Play_Teto_Aura, this.gameObject); m_iHealthLastFrame = m_iHealth; GameObject obj = GameObject.Find("WolfFangCanvas"); if (obj) { m_WolfFangAnimator = obj.GetComponentInChildren <Animator>(); } #if CHEATCODE if (LightVeinTeleport.Instance != null) { } #endif }
public LightPulseAction() { finished = false; lightPulse = GameObject.Find ("SurrealLight").GetComponent<LightPulse> (); }
public LightPulseAction() { finished = false; lightPulse = GameObject.Find("SurrealLight").GetComponent <LightPulse> (); }