void PrepareToCharge() { actionState = ActionState.ChargePreparation; flameEnchant.Stop(); flameEnchant.Play(); enemyAttackAudioSource.clip = elephantAttackAudio; enemyAttackAudioSource.loop = false; enemyAttackAudioSource.Play(); Invoke("StartCharge", 1.5f); }
// Use this for initialization void Start() { _loopingSound = GameObject.Find ("Wormhole Loop Sound").GetComponent<FadingAudioSource>(); _loopingSound.FadeTime = timeToScaleDown; _loopingSound.Play(); _startTime = Time.time; }
// Use this for initialization void Start() { _loopingSound = GameObject.Find("Wormhole Loop Sound").GetComponent <FadingAudioSource>(); _loopingSound.FadeTime = timeToScaleDown; _loopingSound.Play(); _startTime = Time.time; }
void StartGravityEffect() { m_ballManager.GravBalls(); // Allow ball to experience gravity. m_prevTime = Time.fixedTime; m_gravitySound.Play(); m_running = true; // Randomise initial side of gravity. float rand = Random.Range(0.0f, 1.0f); if (rand <= 0.5f) { m_gravity = m_strongLeft; gravEffectLeft.GetComponent<GravityEffectController>().EffectOn(); } else { m_gravity = m_strongRight; gravEffectRight.GetComponent<GravityEffectController>().EffectOn(); } }