GrandLarceny.Player.changedSubImage C# (CSharp) 메소드

changedSubImage() 개인적인 메소드

private changedSubImage ( float a_from, float a_to ) : void
a_from float
a_to float
리턴 void
        private void changedSubImage(float a_from, float a_to)
        {
            if (m_currentState == State.Walking)
            {
                if (m_runMode)
                {
                    if ((a_from < 1 && a_to >= 1) ||
                        (a_from < 5 && a_to >= 5))
                    {
                        m_runSound.play();
                    }
                }
                else
                {
                    if ((a_from < 2 && a_to >= 2) ||
                        (a_from < 6 && a_to >= 6))
                    {
                        m_stepSound.play();
                    }
                }
            }
            else if(m_currentState == State.Ventilation)
            {
                if (a_from < 3 && a_to >= 3)
                {
                    m_ventilationMoveSound.play();
                }
            }
            else if (m_currentState == State.Climbing)
            {
                if ((a_from < 4 && a_to >= 4) ||
                    a_from > 4 && a_to <= 4)
                {
                    m_ladderSound.play();
                }
            }
        }