很多游戏都有Credits show, 如何实现呢 ? 请看:
Easy scrolling credits, just stick this in your main loop and replace ITEXTUREHERE with your itexture pointer, and replace driver and device etc if you use custom-named variables:
Code: |
u32 time = device->getTimer()->getTime(); driver->draw2DImage(ITEXTUREHERE, position2d<s32>((driver->getScreenSize().Width - ITEXTUREHERE->getOriginalSize().Width)/2, ((time/20)%(driver->getScreenSize().Height+ITEXTUREHERE->getOriginalSize().Height))-ITEXTUREHERE->getOriginalSize().Height)); |
To speed it up or slow it down, decrease (faster) or increase (slower) this part:
Code: |
time/20 |