static void dieWait() { Entity *e; self->thinkTime--; if (self->thinkTime <= 0) { clearContinuePoint(); freeBossHealthBar(); e = addKeyItem("item/heart_container", self->x + self->w / 2, self->y); e->x -= e->w; e->dirY = ITEM_JUMP_HEIGHT; self->action = &entityDieVanish; fadeBossMusic(); player.alpha = 255; } }
static void die() { int i; long onGround; setEntityAnimation(self, "DIE"); self->action = ¨ self->damage = 0; self->flags &= ~FLY; onGround = self->flags & ON_GROUND; checkToMap(self); if (landedOnGround(onGround) == TRUE) { playSoundToMap("sound/enemy/red_grub/thud", BOSS_CHANNEL, self->x, self->y, 0); shakeScreen(LIGHT, 15); for (i=0;i<20;i++) { addSmoke(self->x + prand() % self->w, self->y + self->h - prand() % 10, "decoration/dust"); } fireTrigger(self->objectiveName); fireGlobalTrigger(self->objectiveName); self->die = &entityDieNoDrop; self->action = &dieWait; clearContinuePoint(); increaseKillCount(); freeBossHealthBar(); fadeBossMusic(); } }
static void dieWait() { Entity *e; clearContinuePoint(); increaseKillCount(); freeBossHealthBar(); e = addKeyItem("item/heart_container", self->x + self->w / 2, self->y); e->dirY = ITEM_JUMP_HEIGHT; fadeBossMusic(); entityDieVanish(); }
static void entityWait() { Entity *e; if (self->damage == 0) { self->thinkTime--; self->flags &= ~FLY; if (self->thinkTime <= 0) { clearContinuePoint(); freeBossHealthBar(); e = addKeyItem("item/heart_container", self->x + self->w / 2, self->y); e->y -= e->h; e->dirY = ITEM_JUMP_HEIGHT; fadeBossMusic(); entityDieVanish(); } } else if (self->damage == self->mental && self->health == self->maxHealth) { self->targetY--; if (self->targetY <= 0) { self->targetY = 0; } } checkToMap(self); }
static void dieFinish() { Entity *e; self->thinkTime--; if (self->thinkTime <= 0) { clearContinuePoint(); increaseKillCount(); freeBossHealthBar(); e = addKeyItem("item/heart_container", self->x + self->w / 2, self->y); e->dirY = ITEM_JUMP_HEIGHT; fadeBossMusic(); entityDieNoDrop(); } }
void freeGameResources() { freeLevelResources(); /* Free the Global Triggers */ freeGlobalTriggers(); /* Free the map triggers */ freeMapTriggers(); /* Free the Objectives */ freeObjectives(); /* Free the scripts */ freeScript(); /* Free the inventory */ freeInventory(); /* Free the player */ freePlayer(); /* Clear the boss meter */ freeBossHealthBar(); /* Free the title screen */ freeTitle(); }
static void dieWait() { Entity *e; checkToMap(self); self->thinkTime--; if (self->thinkTime <= 0) { clearContinuePoint(); increaseKillCount(); freeBossHealthBar(); e = addKeyItem("item/heart_container", self->x + self->w / 2, self->y); e->dirY = ITEM_JUMP_HEIGHT; entityDieNoDrop(); e = self; self = self->target; while (self != NULL) { self->die(); self = self->target; } self = e; } }
static void dieWait() { int i; Entity *e; self->thinkTime--; if (self->mental == 0) { self->x = self->startX + sin(DEG_TO_RAD(self->endX)) * 4; self->endX += 90; if (self->endX >= 360) { self->endX = 0; } } if (self->thinkTime <= 0) { if (self->mental == 0) { self->x = self->startX; self->layer = MID_GROUND_LAYER; setEntityAnimation(self, "DIE_2"); shakeScreen(MEDIUM, 60); playSoundToMap("sound/common/crash", BOSS_CHANNEL, self->x, self->y, 0); for (i=0;i<300;i++) { e = addSmoke(self->x + (prand() % self->w), self->y + self->h, "decoration/dust"); if (e != NULL) { e->y -= prand() % e->h; } } self->mental = 1; self->thinkTime = 120; } else { fireTrigger(self->objectiveName); fireGlobalTrigger(self->objectiveName); clearContinuePoint(); freeBossHealthBar(); } } checkToMap(self); }