public Animation(Sprite insprite, int numFrames, TimeSpan inFrame) { FrameNum = numFrames; _frames = new Frame[numFrames]; _sprite = insprite; Speed = AnimSpeed.Dynamic; FrameInterval = inFrame; LastInterval = TimeEventManager.getInstance().GetCurrentTime(); }
public Animation(Sprite insprite, int numFrames, AnimSpeed speed, AnimName inName) { Name = inName; FrameNum = numFrames; _frames = new Frame[numFrames]; _sprite = insprite; Speed = speed; FrameInterval = new TimeSpan(2750000); LastInterval = TimeEventManager.getInstance().GetCurrentTime(); }
/// <summary> /// アニメーション速度の設定 /// </summary> /// <param name="type"></param> public void SetAnimationSpeed(AnimSpeed type) { float speed = 1f; switch (type) { case AnimSpeed.Fast: speed = 2; break; case AnimSpeed.Slow: speed = 0.5f; break; default: break; } this.animSpeed = speed; }
private void setSpeed(AnimSpeed speed) { switch (speed) { case AnimSpeed.Fast: FrameInterval = new TimeSpan(1750000); break; case AnimSpeed.Medium: FrameInterval = new TimeSpan(2750000); break; case AnimSpeed.Slow: FrameInterval = new TimeSpan(5750000); break; case AnimSpeed.Paused: FrameInterval = TimeSpan.MaxValue; break; } }
public void changespeed(TimeSpan inTimespan) { Speed = AnimSpeed.Dynamic; FrameInterval = inTimespan; }
public void changespeed(AnimSpeed inSpeed) { Speed = inSpeed; }