cleanup();
}
@Override
public void initProperties() {
StringLogicProperty type = new StringLogicProperty("type") {
@Override
public String description() {
return "The type of pickup";
}
@Override
public String value() {
return fType;
}
@Override
public String[] choices() {
return Pickup.TYPES;
}
@Override
public void choice(int i) {
fType = Pickup.TYPES[i];
if (fType.equals("TOOL")) fItem = "GAUNTLETZ";
else if (fType.equals("TOY")) fItem = "BEACHBALL";
else if (fType.equals("REWARD")) fItem = "COIN";
else if (fType.equals("POWERUP")) fItem = "GHOST";
else if (fType.equals("CURSE")) fItem = "SCREENSHAKE";
else if (fType.equals("UTILITY")) fItem = "MEGAPHONEZ";
initProperties();
}
};
StringLogicProperty item = new StringLogicProperty("item") {
@Override
public String description() {
return "The item to pickup";
}
@Override
public String value() {
return fItem;
}
@Override
public String[] choices() {
if (fType.equals("TOOL")) return Pickup.TOOLS;
else if (fType.equals("TOY")) return Pickup.TOYS;
else if (fType.equals("POWERUP")) return Pickup.POWERUPS;
else if (fType.equals("CURSE")) return Pickup.CURSES;
else if (fType.equals("REWARD")) return Pickup.REWARDS;
else return Pickup.UTILITIES;
}
@Override
public void choice(int i) {
if (fType.equals("TOOL")) fItem = Pickup.TOOLS[i];
else if (fType.equals("TOY")) fItem = Pickup.TOYS[i];
else if (fType.equals("POWERUP")) fItem = Pickup.POWERUPS[i];
else if (fType.equals("CURSE")) fItem = Pickup.CURSES[i];
else if (fType.equals("REWARD")) fItem = Pickup.REWARDS[i];
else fItem = Pickup.UTILITIES[i];
initProperties();
}
};
StringLogicProperty tileset = new StringLogicProperty("tile layer") {
@Override
public String description() {
return "The layer index of the tile to change";
}
@Override
public String value() {
return fLayer + "";
}
@Override
public String[] choices() {
return null;
}
@Override
public void value(String s) {
try {
fLayer = Integer.parseInt(s);
} catch (Exception e) {
fLayer = 0;
}
}
};
StringLogicProperty tile = new StringLogicProperty("tile type") {
@Override
public String description() {
return "The type of the hidden tile";
}
@Override
public String value() {
return fNewTile;
}
@Override
public String[] choices() {
return null;
}
@Override
public void value(String s) {
fNewTile = s;
}
};
if (fItem != null && fItem.equals("MEGAPHONEZ")) {
StringLogicProperty subtype = new StringLogicProperty("subtype") {
@Override
public String description() {
return "The sub item of pickup";
}
@Override
public String value() {
return fSubType;
}
@Override
public String[] choices() {
return Pickup.MEGAPHONE_TYPES;
}
@Override
public void choice(int i) {
fSubType = Pickup.MEGAPHONE_TYPES[i];
initProperties();
}
};
StringLogicProperty subitem = new StringLogicProperty("subitem") {
@Override
public String description() {
return "The sub type of the pickup";
}