Assign self when spawning enemies.
This commit is contained in:
parent
46d9983142
commit
70d1101ded
|
@ -455,6 +455,8 @@ static void spawnEnemies(void)
|
||||||
|
|
||||||
u = (Unit*)createEntity(name);
|
u = (Unit*)createEntity(name);
|
||||||
|
|
||||||
|
self = (Entity*)u;
|
||||||
|
|
||||||
u->animate();
|
u->animate();
|
||||||
|
|
||||||
x /= MAP_TILE_SIZE;
|
x /= MAP_TILE_SIZE;
|
||||||
|
|
|
@ -73,5 +73,6 @@ extern void playMusic(int loop);
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
|
extern Entity *self;
|
||||||
extern Game game;
|
extern Game game;
|
||||||
extern World world;
|
extern World world;
|
||||||
|
|
Loading…
Reference in New Issue