Commit 75feb070 authored by Valentin Bartschies's avatar Valentin Bartschies
Browse files

Added so only alive aliens will be drawn

parent e0d58fe8
......@@ -45,12 +45,12 @@ void drawAliens(Aliens *aliens) {
bool up = (i + j) % 2 == (FRAMES_COUNT / FRAME_RATE) % 2;
texture = up ? &ALIEN_UP : &ALIEN_DOWN;
}
DrawTexture(*texture, aliens->pos.x + j * (ALIEN_SIZE + ALIEN_OFFSET), aliens->pos.y + i * (ALIEN_SIZE + ALIEN_OFFSET), WHITE);
if (alien->alive) {
DrawTexture(*texture, aliens->pos.x + j * (ALIEN_SIZE + ALIEN_OFFSET), aliens->pos.y + i * (ALIEN_SIZE + ALIEN_OFFSET), WHITE);
}
}
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment