public IEnumerator MoveBackward(params object[] list)
    {
        float  duration = System.Convert.ToSingle(list[0]);
        float  dist     = System.Convert.ToSingle(list[1]);
        string aniType  = System.Convert.ToString(list[2]);

        Actor.AniType eAniType = m_Owner.GetAniType(aniType);

        float ElapsedTime = 0;
        float SumX        = 0;

        while (ElapsedTime < duration)
        {
            ElapsedTime += Time.deltaTime;
            Vector3 vPos  = m_Owner.transform.position;
            float   tickX = (Time.deltaTime / duration) * dist;
            SumX += tickX;
            if (SumX >= dist)
            {
                tickX = 0;
            }

            if (m_Owner.IsMyTeam)
            {
                tickX *= -1;
            }

            vPos.x += tickX;
            m_Owner.transform.position = vPos;

            m_Owner.PlayAnimation(eAniType);
            yield return(new WaitForEndOfFrame());
        }
    }
    public IEnumerator FadeOut(params object[] list)
    {
        float  duration = System.Convert.ToSingle(list[0]);
        float  dummy    = System.Convert.ToSingle(list[1]);
        string aniType  = System.Convert.ToString(list[2]);

        Actor.AniType eAniType = m_Owner.GetAniType(aniType);

        m_Owner.PlayAnimation(eAniType);
        yield return(m_Owner.HeroAlphaFade(duration));
    }
    public IEnumerator AnimationDelay(params object [] list)
    {
        float  delay   = System.Convert.ToSingle(list[0]);
        float  dummy   = System.Convert.ToSingle(list[1]);
        string aniType = System.Convert.ToString(list[2]);

        Actor.AniType eAniType = m_Owner.GetAniType(aniType);
        m_Owner.PlayAnimation(eAniType);

        yield return(new WaitForSeconds(delay));
    }
예제 #4
0
    public IEnumerator FadeOut(params object[] list)
    {
        Actor actor = list[0] as Actor;

        float delay = Convert.ToSingle(list[1]);

        Actor.AniType eAniType = (Actor.AniType)list[3];

        actor.PlayAnimation(eAniType);
        yield return(HeroAlphaFade(actor, delay));
    }
예제 #5
0
    public IEnumerator AnimationDelay(params object[] list)
    {
        Actor actor = list[0] as Actor;

        float delay = Convert.ToSingle(list[1]);

        Actor.AniType eAniType = (Actor.AniType)list[3];
        actor.PlayAnimation(eAniType);

        yield return(new WaitForSeconds(delay));
    }
    public IEnumerator MoveBackwardMoment(params object[] list)
    {
        float  duration = System.Convert.ToSingle(list[0]);
        float  dist     = System.Convert.ToSingle(list[1]);
        string aniType  = System.Convert.ToString(list[2]);

        Actor.AniType eAniType = m_Owner.GetAniType(aniType);

        if (m_Owner.IsMyTeam)
        {
            dist *= -1;
        }

        Vector3 vPos = m_Owner.transform.position;

        vPos.x += dist;
        m_Owner.transform.position = vPos;

        m_Owner.PlayAnimation(eAniType);
        yield return(new WaitForSeconds(duration));
    }
예제 #7
0
    public IEnumerator MoveBackwardMoment(params object[] list)
    {
        Actor actor    = list[0] as Actor;
        bool  IsMyTeam = Convert.ToBoolean(list[1]);
        float duration = Convert.ToSingle(list[2]);
        float dist     = Convert.ToSingle(list[3]);

        Actor.AniType eAniType = (Actor.AniType)list[4];

        if (IsMyTeam)
        {
            dist *= -1;
        }

        Vector3 vPos = actor.transform.position;

        vPos.x += dist;
        actor.transform.position = vPos;

        actor.PlayAnimation(eAniType);
        yield return(new WaitForSeconds(duration));
    }
예제 #8
0
    public IEnumerator MoveBackward(params object[] list)
    {
        Actor actor    = list[0] as Actor;
        bool  IsMyTeam = Convert.ToBoolean(list[1]);

        float duration = Convert.ToSingle(list[2]);
        float dist     = Convert.ToSingle(list[3]);

        Actor.AniType eAniType = (Actor.AniType)list[4];

        float ElapsedTime = 0;
        float SumX        = 0;

        while (ElapsedTime < duration)
        {
            ElapsedTime += Time.deltaTime;
            Vector3 vPos  = actor.transform.position;
            float   tickX = (Time.deltaTime / duration) * dist;
            SumX += tickX;
            if (SumX >= dist)
            {
                tickX = 0;
            }

            if (IsMyTeam)
            {
                tickX *= -1;
            }

            vPos.x += tickX;
            actor.transform.position = vPos;

            actor.PlayAnimation(eAniType);
            yield return(new WaitForEndOfFrame());
        }
    }