Пример #1
0
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;
	}
}
Пример #2
0
static void die()
{
	int i;
	long onGround;

	setEntityAnimation(self, "DIE");

	self->action = &die;

	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();
	}
}
Пример #3
0
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();
}
Пример #4
0
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);
}
Пример #5
0
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();
	}
}
Пример #6
0
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;
    }
}
Пример #7
0
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);
}