我决定做一个windows 7 ps3战利品app..the点故障如下
每个级别的细分是
在此之后,到2000年每个等级的上升到第12级,在第13级的16000点,它会上升到24000,并且随着每一个接续的水平增加到8000。
我能确定12级之前的水平.如果点> =16000 ...can u解释确定point>16000 ?的逻辑??12级之后的水平上限是一个恒定的8000.
发布于 2012-08-09 17:41:26
如果我的理解正确的话,那就像
int levelCap = (8000 * (level % 12)) + 16000;请注意,只有当您在12级或以上时,此逻辑才能工作。
发布于 2012-08-10 14:38:41
这是一个非常嵌套的循环,所以如果点只够2级,它就检查第3级,当它将其视为false时,它就会逃避整个事件。
int const level = 1;
int const level2 = 200;
int const level6 = 4000;
int const level12 = 16000;
if (points >= level2)
level = 2;
if (points >= 3*level2)
level = 3;
if (points >= 6*level2)
level = 4;
if (points >= 12*level2)
level = 5;
if ((points >= level6) && (points < level12))
// because you're dividing integer by integer,
// 39999/2000 should = 1, correct?
level = ((points - level6) / 2000) + 6;
else if (points >= level12)
level = ((points - level12 / 8000) + 12;https://stackoverflow.com/questions/11888828
复制相似问题