public void Update(float dt) { if (animtype == ANIMTYPE._static) return; if (animtype == ANIMTYPE.once) { if (time.End()) { animtype = ANIMTYPE._static; AnimMul = tuv; return; } AnimPos = new Vector2(time.getInterval(AnimCount.X), AnimPos.Y); } if (animtype == ANIMTYPE.loop) { if (time.End()) time.Restart(); AnimPos = new Vector2(time.getInterval(AnimCount.X), AnimPos.Y); } }
public void Stop() { animtype = ANIMTYPE._static; AnimPos = tuv; }
public void PlayLoop(float dt, float ix, float iy) { animtype = ANIMTYPE.loop; tuv = AnimPos; time.Start(p, dt); AnimPos = new Vector2(ix, iy) / animcount; }
public void PlayOnce(float dt) { animtype = ANIMTYPE.once; tuv = AnimPos; time.Start(p, dt); }
public void PlayLoop(float dt) { animtype = ANIMTYPE.loop; tuv = AnimPos; time.Start(p, dt); }