示例#1
0
    //! 상태를 갱신한다
    public override void Update()
    {
        base.Update();

        if (m_bIsPlaying)
        {
            m_fSkipTime += Time.deltaTime;

            if (m_fSkipTime >= m_fDelayPerUnit)
            {
                m_fSkipTime = 0.0f;

                if (m_nIndex < m_oFilepaths.Length - 1)
                {
                    var oFilepath = m_oFilepaths[++m_nIndex];
                    m_oSprite.SetSprite(oFilepath);
                }
                else
                {
                    if (!m_bIsLoop)
                    {
                        this.StopAnimation();
                    }
                    else
                    {
                        this.PlayAnimation(m_oFilepaths,
                                           m_fDelayPerUnit,
                                           m_bIsLoop);
                    }
                }
            }
        }
    }