This site requires JavaScript, please enable it in your browser!
Greenfoot back

stevenGrohe's Comments

Back to stevenGrohe's profile

how can I share the source code?
I donĀ“t really know whether you mean this, but I think so: import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) public class NextLevel extends HUD { public int alpha; private int fadeKind; private int fadeSpeed = 4; public boolean active = true; public int xAdd; public int yAdd; private Level lv; public NextLevel() { fadeKind = 0; //0 = fade out, 1 = fade in alpha = 0; getImage().setTransparency(alpha); xAdd = 320; yAdd = 240; lv = (Level)getWorld(); } public void act() { getImage().setTransparency(alpha); if (fadeKind == 0) { if ((alpha + fadeSpeed) <= 255) { alpha += fadeSpeed; } else { fadeKind = 1; alpha = 255; lv.finished = false; CONSTS.nextLevel(); lv.mustRestart = true; } } else { if ((alpha - fadeSpeed) >= 0) { alpha -= fadeSpeed; } else { alpha = 0; if (CONSTS.current_level != CONSTS.level_amount) lv.running = true; getWorld().removeObject(this); } } setLocation((int)View.get_x()+xAdd,(int)View.get_x()+yAdd); } public int getAlpha() { return alpha; } public int getx() { return xAdd; } public int gety() { return yAdd; } public void setState(int st) { fadeKind = st; } }
thank you guys ! :)
my highscore: 3070
You can save integers and strings, and these you can read out and build the game from them (for example an int which saves at which level the player is)
not bad, how did you make this online highscore table?
i like the design of the game, but not the engine
made a lot of fun :D