public string getRandomEffect()
{
string json = null;
if (this.getPersistantBool("useTransitions") && this.effects != null) {
jsonFolder effect = jsonFolder.getRandomSelected(this.effects.children);
jsonFolder direction = null;
if (effect == null) {
json = "{\"effect\":\"fade\", \"duration\":100}";
} else {
json += "{\"effect\":\"" + effect.key + "\"";
if (effect.children.Count > 0) {
direction = jsonFolder.getRandomSelected(effect.children);
if (direction != null) json += ", \"direction\":\"" + direction.title.ToLower() + "\"";
}
json += ", \"duration\":1000}";
}
}
return json;
}