Make destructable objects throw debris when destroyed.

This commit is contained in:
Steve 2018-03-24 08:16:33 +00:00
parent 464874faa2
commit 745075172b
2 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,8 @@ static void action(void)
addExplosion(s->x, s->y, 50, self);
s->dx = rrnd(-10, 10);
s->dy = rrnd(-10, 10);
throwDebris(s->x + s->w / 2, s->y + s->h / 2, 1);
}
if (s->health <= -50)

View File

@ -28,6 +28,7 @@ extern Structure *createStructure(void);
extern void dropCarriedItem(void);
extern Sprite *getSprite(char *name);
extern int rrnd(int low, int high);
extern void throwDebris(float x, float y, int amount);
extern void updateObjective(char *targetName);
extern Entity *self;