【发布时间】:2018-04-15 09:09:27
【问题描述】:
动画类的更新方法:
public void Update(GameTime gameTime)
{
Timer += gameTime.ElapsedGameTime.Milliseconds;
if (Timer > FrameTime){
CurrentFrame++;
if (CurrentFrame == TotalFrames)
{
CurrentFrame = 0;
Done = true;
}
Timer = 0;
}
}
如何修改这段代码来制作动画单循环?
【问题讨论】:
-
如果
Done等于 false,只需添加到第一个 if 语句。
标签: c# .net animation xna monogame