Add generic GameCore::onUnitDestroyed() function.