Commit d1d9c91e authored by Valentin Bartschies's avatar Valentin Bartschies
Browse files

Centering the projectile

parent 05d83730
......@@ -72,5 +72,5 @@ void destructGame() {
void spawnPlayerProjectile() {
playerProj = malloc(sizeof *playerProj);
playerProj->movingUp = true;
playerProj->pos = (Vector2) { laserCanonPos.x + laserCanon.width / 2, laserCanonPos.y - PROJECTILE_HEIGHT };
playerProj->pos = (Vector2) { laserCanonPos.x + laserCanon.width / 2 - PROJECTILE_WIDTH / 2, laserCanonPos.y - PROJECTILE_HEIGHT };
}
......@@ -6,7 +6,7 @@
#include <stdlib.h>
#define PROJECTILE_HEIGHT 10
#define PROJECTILE_WIDTH 5
#define PROJECTILE_WIDTH 4
extern const int GAME_SCREEN_HEIGHT;
......
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