Exemplo n.º 1
0
    private Stance m_eCurrentStance = Stance.IDLE;                                              // Current Stance
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Redefined Method: Start
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    public override void Start()
    {
        base.Start();
        CreateFullPath();

        m_DeathHissAudioSource = SoundPlayerManager.AddAudio(gameObject, m_DeathHissSoundClip);
    }
Exemplo n.º 2
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Redefined Method: Start
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    public override void Start()
    {
        base.Start();
        CreateFullPath();

        // Add Audio
        m_HissSoundAudioSource = SoundPlayerManager.AddAudio(gameObject, m_HissSound);

        SetCurrentStance((m_ePathChoosing == PathChoosing.FOLLOW_PLAYER) ? Stance.FOLLOW_PLAYER_BEGIN : Stance.IDLE);
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Setup Sounds
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    private void SetupSounds()
    {
        m_SoundFiles.FlyInSource = new AudioSource[m_SoundFiles.FlyInSFX.Length];
        for (int i = 0; i < m_SoundFiles.FlyInSFX.Length; ++i)
        {
            m_SoundFiles.FlyInSource[i] = SoundPlayerManager.AddAudio(gameObject, m_SoundFiles.FlyInSFX[i], false, false, 0.8f);
        }

        m_SoundFiles.FlyOutSource = new AudioSource[m_SoundFiles.FlyOutSFX.Length];
        for (int i = 0; i < m_SoundFiles.FlyOutSFX.Length; ++i)
        {
            m_SoundFiles.FlyOutSource[i] = SoundPlayerManager.AddAudio(gameObject, m_SoundFiles.FlyOutSFX[i], false, false, 0.8f);
        }

        m_SoundFiles.TextSource = SoundPlayerManager.AddAudio(gameObject, m_SoundFiles.TextSFX, false, false, 0.8f);
    }
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* Redefined Method: Start
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 void Start()
 {
     m_HealthAlarmSource = SoundPlayerManager.AddAudio(gameObject, m_HealthAlarmSound, false, false, 1.0f);
 }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Setup Instance Variables
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    private void SetupInstanceVariables()
    {
        m_fJumpVelocity = (m_fJumpVelocity < 0.001f) ? 300.0f : m_fJumpVelocity;

        m_AttachHissSource = SoundPlayerManager.AddAudio(gameObject, m_AttachHissSound);
    }