Пример #1
0
    public void RequestAnimation(string id)
    {
        currentAnimID = id;
        AnimationData animData = unitData.GetAnimation(id);

        if (anim == null)
        {
            anim = new AnimationSystem(animData.frames, animData.loop, animData.spf);
        }
        else
        {
            anim.SetFrames(animData.frames, animData.loop, animData.spf);
        }
    }
 public void RequestAnimation(string animID, bool loop = false, bool resetIndex = true, float spf = 0.12f)
 {
     if (anim == null)
     {
         anim = new AnimationSystem(info.animationData[animID], loop, spf);
     }
     else
     {
         anim.SetFrames(info.animationData[animID]);
         anim.SetLoop(loop);
         anim.SetSpf(spf);
     }
     if (resetIndex)
     {
         anim.ResetIndex();
     }
 }