void activateSwitch(Action *action){ dprintf(("*************** switch activated ***************\n")); //Scene *scene = (Scene *)(action->data); Door *door = (Door *)(action->data); //action->source->animate(); //scene->entities.remove(trashCan); action->source->playSound(); door->toggle(); }
// ayction->data must be a Door void toggleDoor(Action *action){ dprintf(("*************** toggle Door ***************\n")); Door *door = (Door *)(action->data); door->toggle(); //door1->toggle(); //source->setSceneCoord(source->getX()-source->getWidth(), source->getY()); //action->source->toggle(); // set the tile map to passable as the door opens }