Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我需要它以应用程序 FPS 的 10% 运行,如何为单个位图动画设置帧速度?
谢谢
您可以在 spritesheet 的构造函数中设置动画的频率。
例如:
animations: { // start, end, next, frequency jump: [9,12,"run",2] }
或者
animations: { jump: { frames: [8,9,10,9,8], next: "run", frequency: 2 } }
默认情况下它是 1,所以如果你放 10,它会慢 10 倍。