Exemple #1
0
    /// <summary>
    /// Starts the win animation.
    /// </summary>
    protected override void StartWinAnimation()
    {
        // Change face into a happy one
        m_browLeft.SetScaleY(-m_browLeft.transform.localScale.y);
        m_browLeft.Rotate(Vector3.forward * 35.0f);
        m_browRight.SetScaleY(-m_browRight.transform.localScale.y);
        m_browRight.Rotate(Vector3.forward * -35.0f);
        m_mouth.Rotate(Vector3.forward * 180.0f);
        m_chin.gameObject.SetActive(false);

        // Disable wasp sound
        if (m_waspSound != null)
        {
            RemoveFromSoundObjectList(m_waspSound);
            m_waspSound.Delete();
            m_waspSound = null;
        }

        // Hide that last wasp...
        foreach (Wasp wasp in m_wasps)
        {
            if (wasp != null)
            {
                wasp.gameObject.SetActive(false);
            }
        }
    }
Exemple #2
0
 /// <summary>
 /// Starts the win animation.
 /// </summary>
 protected override void StartWinAnimation()
 {
     RemoveFromSoundObjectList(m_fireBurningSound);
     m_fireBurningSound.Delete();
     m_fire.SetActive(false);
     m_fireAnimator.speed = 0f;
     RemoveFromAnimatorList(m_fireAnimator);
     m_characterAnimator.Play("CharacterFireMGYeah");
 }
Exemple #3
0
 /// <summary>
 /// Plays the character call sound
 /// </summary>
 private void PlayCharacterCallSound()
 {
     if (Random.value <= m_charSoundProb && (m_charSound == null || !m_charSound.IsPlaying))
     {
         if (m_charSound != null)
         {
             m_charSound.Delete();
         }
         m_charSound = m_soundManager.PlayCharacterCallSound(m_type);
     }
 }
    /// <summary>
    /// Stops the sounds
    /// </summary>
    protected void StopSounds()
    {
        if (m_passingSound != null)
        {
            m_passingSound.Delete();
            m_passingSound = null;
        }

        m_hornTime  = 0f;
        m_hornTimer = 0f;
    }
Exemple #5
0
 /// <summary>
 /// Plays a new win/lose SFX.
 /// </summary>
 /// <param name="sfxID">Sfx I.</param>
 private void PlayNewWinLoseSFX(SoundInfo.SFXID sfxID)
 {
     if (m_winLoseSFX != null)
     {
         m_winLoseSFX.Delete();
     }
     m_winLoseSFX = Locator.GetSoundSystem().PlaySound(sfxID);
 }
 /// <summary>
 /// Stops the river sound
 /// </summary>
 private void StopRiverSound()
 {
     if (m_riverSound != null)
     {
         m_riverSound.Delete();
         m_riverSound = null;
     }
 }
Exemple #7
0
    /// <summary>
    /// Updates the win animation.
    /// </summary>
    protected override void UpdateWinAnimation()
    {
        m_plane.transform.Translate(Vector3.right * m_planeWinSpeed * Time.deltaTime, Space.Self);

        if (m_endingAnimationTimer >= m_endingAnimationDuration)
        {
            RemoveFromSoundObjectList(m_planeSound);
            m_planeSound.Delete();
            m_planeSound = null;
        }
        Vector3 cloudMoveVector = m_plane.transform.TransformDirection(Vector3.left);

        cloudMoveVector *= m_cloudSpeedFactor * Time.deltaTime;
        foreach (Cloud cloud in m_clouds)
        {
            cloud.transform.Translate(cloudMoveVector * cloud.MoveSpeed);
        }
    }
Exemple #8
0
    /// <summary>
    /// Updates the train movement.
    /// </summary>
    private void UpdateTrainMovement()
    {
        m_train.transform.Translate(Vector3.right * m_trainSpeed * Time.deltaTime);

        if (m_endingAnimationTimer >= m_endingAnimationDuration)
        {
            RemoveFromSoundObjectList(m_trainSound);
            m_trainSound.Delete();
            m_trainSound = null;
        }
    }
Exemple #9
0
    /// <summary>
    /// Deactivates the warning lights
    /// </summary>
    private void DeactivateWarningLights()
    {
        m_lightsBox.localPosition = m_lightsBoxOffPos;
        m_lightTracks.gameObject.SetActive(false);
        m_light1.gameObject.SetActive(false);
        m_light2.gameObject.SetActive(false);

        if (m_warningSound != null)
        {
            m_warningSound.Delete();
            m_warningSound = null;
        }
    }