}
//System.out.println(" pl= " + obj1r.getCenterX() +"x"+ obj1r.getCenterY());
if (obj instanceof Animal) {
anical = true;
Animal chk = (Animal) obj;
obj1r = chk.getBounds();
}
if (obj instanceof MousePoint) {
ismouse = true;
MousePoint ms = (MousePoint) obj;
obj1r = ms.getBounds();
}
if (obj instanceof Missile) {
misile = true;
Missile mis = (Missile) obj;
inittr = mis;
obj1r = mis.getBounds();
}
for (Entity chCol : World.objecz) {
if ( chCol instanceof StaticObj) {
StaticObj ob = (StaticObj) chCol;
obj2r = ob.getBounds();
if (ismouse) {
statObj = true;
}
if (misile) {
tgt = chCol;
}
}
if ( chCol instanceof Animal && !chCol.equals(obj) && !player) {
animal = true;
Animal an = (Animal) chCol;
if (!an.dead) {
obj2r = an.getBounds();
if (misile || ismouse) {
tgt = chCol;
}
}
}
if ( chCol instanceof Missile) {
Missile an = (Missile) chCol;
if (an.stuck && !anical) {
misileget = true;
obj2r = an.getBounds();
}
}
if (obj1r.intersects(obj2r)) {
if (misile) {
Missile mis = (Missile) inittr;
if (!mis.stuck && animal) {
//System.out.println("olen ranen");
Animal an = (Animal) tgt;
tgt = an;
mis.stuck = true;
// kopie
playSound(5,getDRX(an.x),getDRY(an.y));
an.criticalWound = true;
an.hp -= 50;
an.attacked(mis.host);
switch (an.type) {
case 0:
playSound(9,getDRX(an.x),getDRY(an.y));
break;
case 1: