Ejemplo n.º 1
0
        public int queryAnimationFrame(Model anim_model, string Anim)
        {
            AnimComponent ac = anim_model.Components[anim_model.animComponentID] as AnimComponent;
            AnimData      ad = ac.getAnimation(Anim);

            if (ad != null)
            {
                return(ad.ActiveFrame);
            }
            return(-1);
        }
Ejemplo n.º 2
0
        public int queryAnimationFrameCount(Model anim_model, string Anim)
        {
            AnimComponent ac = anim_model.Components[anim_model.animComponentID] as AnimComponent;
            AnimData      ad = ac.getAnimation(Anim);

            if (ad != null)
            {
                return((ad.FrameEnd == 0 ? ad.animMeta.FrameCount : ad.FrameEnd) - (ad.FrameStart != 0 ? ad.FrameStart : 0));
            }
            return(-1);
        }
Ejemplo n.º 3
0
        public void StartAnimation(Model anim_model, string Anim)
        {
            AnimComponent ac = anim_model.Components[anim_model.animComponentID] as AnimComponent;
            AnimData      ad = ac.getAnimation(Anim);

            if (ad != null)
            {
                if (!ad.IsPlaying)
                {
                    ad.IsPlaying = true;
                }
            }
        }