/** * @brief This function is called when another entity collides with this crystal switch. * @param entity_overlapping the other entity * @param collision_mode the collision mode that detected the collision */ void CrystalSwitch::notify_collision(MapEntity &entity_overlapping, CollisionMode collision_mode) { entity_overlapping.notify_collision_with_crystal_switch(*this, collision_mode); }
/** * @brief Notifies this entity that another sprite is overlapping it. * * This function is called by check_collision(MapEntity*, Sprite*) when another entity's * sprite overlaps a sprite of this detector. * * @param other_entity the entity overlapping this detector * @param other_sprite the sprite of other_entity that is overlapping this detector * @param this_sprite the sprite of this detector that is overlapping the other entity's sprite */ void CrystalSwitch::notify_collision(MapEntity &other_entity, Sprite &other_sprite, Sprite &this_sprite) { other_entity.notify_collision_with_crystal_switch(*this, other_sprite); }