扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
gametime=0; gametimeoffset=System.currentTimeMillis(); |
gametime=(System.currentTimeMillis()-gametimeoffset)/1000; //转换为秒 |
img=ImageTools.getImage("/pic/b_number.png"); fontbig=new Font(g,img,10,15, new char[]{'0','1','2','3','4','5','6','7','8','9'}); |
fontbig.drawString(String.valueOf(gametime),screenwidth/2-15,10); |
int awardindex=(int)gametime/20;//计算奖励时间 if(awardindex>bombawardtop) awardindex=bombawardtop; if(bombaward[awardindex]!=0){//如果本20s没有奖励 bombnum+=bombaward[awardindex]; bombaward[awardindex]=0;//奖励过了 } |
public class StringTools { protected StringTools() { } public static String timeOpinion(long gametime){ if(gametime<10){ return "Do you play with your foot?"; //return "i can't belive,your are a game master"; }else if(gametime<16){ return "come boy, you can do it!"; }else if(gametime<20){ return "what a pity! try again."; }else if(gametime<25){ return "very well, you are a real man."; }else if(gametime<30){ return "i know you have talent of this game."; }else if(gametime<40){ return "i can't belive, your are a game master."; }else{ return "oh my god, are you a human?"; } } } |
g.drawString(StringTools.timeOpinion(gametime),5,22,g.LEFT|g.TOP); |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者