Colours Buttons deaktivieren

master
Zocker1999NET 10 years ago
parent 26d255911f
commit 68828cc7cc

@ -96,58 +96,49 @@ public class Colours extends World implements ButtonEvent
//der per Konstruktor die Daten der Colorklasse übertragen werden, dannach wird die Map die aktive Welt //der per Konstruktor die Daten der Colorklasse übertragen werden, dannach wird die Map die aktive Welt
public void buttonClicked (Button b) public void buttonClicked (Button b)
{ {
if ( b == schwarz && possw == true) if (x < 5) {
{ if (b == schwarz && possw == true) {
color[x] = sw; color[x] = sw;
pn[x]=getName(x,"Schwarz"); pn[x]=getName(x,"Schwarz");
if(pn[x].length() > 0) { if(pn[x].length() > 0) {
x+=1; x+=1;
possw = false; possw = false;
} }
} } else if (b == blau && posbl == true) {
if (b == blau && posbl == true) color[x] = bl;
{ pn[x]=getName(x,"Blau");
color[x] = bl; if(pn[x].length() > 0) {
pn[x]=getName(x,"Blau"); x+=1;
if(pn[x].length() > 0) { posbl = false;
x+=1; }
posbl = false; } else if (b == grün && posgr == true ) {
} color[x] = gr;
} pn[x]=getName(x,"Grün");
if (b == grün && posgr == true ) if(pn[x].length() > 0) {
{ x+=1;
color[x] = gr; posgr = false;
pn[x]=getName(x,"Grün"); }
if(pn[x].length() > 0) { } else if (b == rot && posrt == true) {
x+=1; color[x] = rt;
posgr = false; pn[x]=getName(x,"Rot");
} if(pn[x].length() > 0) {
} x+=1;
if ( b == rot && posrt == true) posrt = false;
{ }
color[x] = rt; } else if (b == gelb && posgb == true) {
pn[x]=getName(x,"Rot"); color [x] = gb;
if(pn[x].length() > 0) { pn[x]=getName(x,"Gelb");
x+=1; if(pn[x].length() > 0) {
posrt = false; x+=1;
} posgb = false;
} }
if ( b == gelb && posgb == true) } else if (b == lila && posli == true) {
{ color [x] = li;
color [x] = gb; pn[x]=getName(x,"Lila");
pn[x]=getName(x,"Gelb"); if(pn[x].length() > 0) {
if(pn[x].length() > 0) { x+=1;
x+=1; posli = false;
posgb = false; }
}
}
if ( b == lila && posli == true)
{
color [x] = li;
pn[x]=getName(x,"Lila");
if(pn[x].length() > 0) {
x+=1;
posli = false;
} }
} }
if(b == remove && x > 0) { if(b == remove && x > 0) {

Loading…
Cancel
Save