Beispiel #1
0
bool Button::touch(Entity* e)
{
	CRASHONNULL2(false);
	if (e->player)
	{
        log("Button is dying");
        for (auto entity : Game->entities)
        {
            Door* d = dynamic_cast<Door*>(entity);
            if (d && d->item == item)
            {
                log("killing door");
                d->fadeDie(FADEDIETIME);
            }
        }
		fadeDie(FADEDIETIME);
	}
	return true;
}