if (type.equals("entity"))
blocked[w][h] = NO_SOLID;
if (img != null) {
if (type.equalsIgnoreCase("background")) {
// background
StaticActor te = new StaticActor(w
* img.getWidth(), h * img.getHeight(),
img.getWidth(), img.getHeight(), img);
te.collidable = false;
te.depth = -100;
te.collidable = false;
te.setAlpha(0.4f);
add(te);
} else if (type.equalsIgnoreCase("star")) {
starsNumber++;
// stars
Star star = new Star(w * img.getWidth(), h
* img.getHeight());
add(star);
} else if (type.equalsIgnoreCase("enemies")) {
String enemyType = map.getTileProperty(tid,
"type", null);
if (enemyType != null) {
if (enemyType.equalsIgnoreCase("slime")) {
// slime
add(new FuzzyGreenSlime(w * 32, h * 32));
} else if (enemyType
.equalsIgnoreCase("bat")) {
// slime
add(new FuzzyBat(w * 32, h * 32));
} else if (enemyType
.equalsIgnoreCase("arrowTrap")) {
// slime
add(new FuzzyArrowTrap(w * 32, h * 32));
} else if (enemyType
.equalsIgnoreCase("boss1")) {
// slime
add(new FuzzyBoss(w * 32, h * 32));
}
}
} else {
String tileType = map.getTileProperty(tid,
"type", null);
if (tileType != null
&& tileType.equals("spikes")) {
// spike
Spike spike = new Spike(w * img.getWidth(),
h * img.getHeight());
add(spike);
} else if (tileType != null
&& tileType.equals("fuzzyBlock")) {
// fuzzyBlock
FuzzyBlock fz = new FuzzyBlock(w
* img.getWidth(), h
* img.getHeight(), img);
add(fz);
} else if (tileType != null
&& tileType.equals("tappo")) {
// FuzzyDestroyableBlock
FuzzyDestroyableBlock fd = new FuzzyDestroyableBlock(
w * img.getWidth(), h
* img.getHeight(), img);
add(fd);
} else if (tileType != null
&& tileType.equals("targetBlock")) {
// targetBlock
TargetBlock fz = new TargetBlock(w
* img.getWidth(), h
* img.getHeight(), img);
add(fz);
} else {
// blocks
StaticActor te = new StaticActor(w
* img.getWidth(), h
* img.getHeight(), img.getWidth(),
img.getHeight(), img);
if (type.equals("entity")) {
blocked[w][h] = SOLID;