{
addOption("delay", new Integer(seconds));
}
@Override
public String toJavascript() {
JavascriptBuilder builder = new JavascriptBuilder();
String arrayOfEffects=new String();
boolean first=true;
for(AbstractEffect effect:listOfEffects)
{
effect.setSync(1);
if(first)
{
arrayOfEffects+="[";
first=false;
}
else{
arrayOfEffects+=",";
}
arrayOfEffects+=effect.toJavascript();
}
arrayOfEffects+="]";
// clean all semicolons
arrayOfEffects= arrayOfEffects.replace(";", "");
arrayOfEffects= arrayOfEffects.replace("\n", "");
builder
.addLine("new Effect." + getEffectName() + "(" + arrayOfEffects
+ ", ");
builder.addOptions( options);
builder.addLine(");");
return builder.toJavascript();
}