aboutsummaryrefslogtreecommitdiff
path: root/src/enemy.c
blob: 3fc49a0155f0c6f7ab3b57b4b308444580fde06c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "enemy.h"
#include "game.h"
#include <stdlib.h>

void enemyDestroy(int id)
{
	if (enemies[id] != NULL) {
		if (enemies[id]->data != NULL) {
			free(enemies[id]->data);
		}
		enemies[id]->data = NULL;
	
		free(enemies[id]);
	}	
	enemies[id] = NULL;
}