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

Kartoffelbrot's Comments

Back to Kartoffelbrot's profile

I have some in my Combinatorial Circuit Editor and in my scenario of the Mandelbrot set.
Maybe the trains should get slower, when having more train cars.
Oh my god, my menu components are sooo bad :D
Very nice textboxes, not as buggy as my one.
I see, that you have the same problem, as me. The image of your knight turns a kind of red, when walking to the tight. Perhaps it's the problem, that you saved the images as JPEG's.
How do you animate? Do you have single images? Do you paint them in Greenfoot, or are they saved in the images folder?
Ich hab jede vom Bild abgedeckte Position des ersten Actors mit jeder vom Bild abgedeckten Position des zweiten Actors vergleichen.
Ok, da war meins viel schlimmer: public final CActor getOneIntersectingObject(Class clss){ List<CActor>cactor = super.getIntersectingObjects(clss); for(CActor c : cactor){ for(int y = getY()-getHeight()/2; y < getY()+getHeight()/2; y++){ for(int x = getX()-getWidth()/2; x < getX()+getWidth()/2; x++){ for(int cy = c.getY()-c.getHeight()/2; cy < c.getY()+c.getHeight()/2; cy++){ for(int cx = c.getX()-c.getWidth()/2; cx < c.getX()+c.getWidth()/2; cx++){ if(x==cx && y==cy){ GreenfootImage a = new GreenfootImage(getImage()), b = new GreenfootImage(c.getImage()); a.rotate(getRotation()); b.rotate(c.getRotation()); int ix = x-(getX()-getWidth()/2), iy = y-(getY()-getHeight()/2), icx = cx-(c.getX()-c.getWidth()/2), icy = cy-(c.getY()-c.getHeight()/2); if(a.getColorAt(ix,iy).getAlpha()>50 && b.getColorAt(icx, icy).getAlpha()>50) return c; } } } } } } return null; } Dann werd ich wohl lieber deins verwenden. Danke :)
Es funktioniert jetzt, ist aber extrem langsam.