Make destructable objects throw debris when destroyed.
This commit is contained in:
parent
464874faa2
commit
745075172b
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue