If you think the Android project LucyTheMoocher listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.lucythemoocher.loops;
//www.java2s.comimport android.graphics.Color;
import com.lucythemoocher.Globals.Globals;
publicclass CreditsLoop extends Loop {
privatefloat printPos_;
private String[] credits_;
privatefloat textSpace_;
privatefloat textSpeed_;
public CreditsLoop() {
super();
printPos_ = Globals.getInstance().getCamera().physicalH();
credits_ = new String[]{
"It was...",
"",
"... Lucy The Moocher",
"",
"I small video game, for a bit of fun.",
"",
"",
"Here are some thanks...",
"... because I don't have",
" much to put into these credits",
"",
"",
"~~Special thanks to~~",
"",
"Super Daddy Gloupsy",
"JunioR",
"Mister Popop",
"My",
"Polymorf",
""};
Globals.getInstance().getGame().stop();
textSpace_ = Globals.getInstance().getCamera().physicalH() / 6;
textSpeed_ = textSpace_/500;
}
@Override
publicvoid update() {
printPos_ -= textSpeed_ * Globals.getInstance().getTimer().getDt();
if (printPos_ + credits_.length * textSpace_ < 0) { changeCurrentLoop(new InitMenuLoop()); }
}
@Override
publicvoid render() {
Globals.getInstance().getCamera().drawFullColor(0xFF00FFCC);
int i=0;
for (String s : credits_) {
Globals.getInstance().getCamera().drawText(s, Color.WHITE, printPos_+i);
i += textSpace_;
}
}
}