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); }
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); }
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; } } }