PDA

View Full Version : CHI ha osato, **CHI**?? :@


71104
19-05-2006, 15:36
cioč dico, non so se vi eravate vagamente resi conto della schifezza/porcheria che era presente fino a poco fa nel costruttore di AbstractDroppable...

protected AbstractDroppable(EngineInterface engine, DroppableType type,
DroppableColor color, int animationDelay)
{

String appendedColor = java.io.File.separator + color.getName();

String textureName = DROPPABLE_PATH.concat(type.getName()).concat(
appendedColor);

if (type.isDynamite())
{
textureName = DROPPABLE_PATH.concat(ADVANCED).concat(
type.getName());
}


sprite = new Sprite(0, 0, engine.createImage(textureName));
sprite.setSize(DROPPABLE_SIZE, DROPPABLE_SIZE);

this.type = type;
this.color = color;

addFrame(0, 0, animationDelay);
}


NAUSEA +O(

l'ho corretto:


protected AbstractDroppable(EngineInterface engine, DroppableType type,
DroppableColor color, int animationDelay)
{

sprite = new Sprite(0, 0, engine.createImage(getTextureName(type, color)));

sprite.setSize(DROPPABLE_SIZE, DROPPABLE_SIZE);

this.type = type;
this.color = color;

addFrame(0, 0, animationDelay);
}


protected String getTextureName(DroppableType type, DroppableColor color)
{
String appendedColor = java.io.File.separator + color.getName();
return DROPPABLE_PATH.concat(type.getName()).concat(appendedColor);
}



public final class Dynamite extends AbstractDroppable
{
.
.
.

protected String getTextureName(DroppableType type, DroppableColor color)
{
return DROPPABLE_PATH.concat(ADVANCED).concat(type.getName());
}

71104
19-05-2006, 15:44
chissā che avanti di questo passo non riusciamo ad eliminare getType :)

Ufo13
19-05-2006, 17:30
La responsabilitā sul codice č di tutti noi :P comunque ottimo lavoro :)

71104
19-05-2006, 18:18
La responsabilitā sul codice č di tutti noi :P oh non frainterdermi, quel post non era da prendere troppo seriamente ^^
ho dimenticato questa faccina --> :D
si trattava di un umorismo un po' alla "fek spezza-ditine" :p