mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 01:08:25 +07:00
Refactor UncivGame initialization - add UncivGameParameters. (#2779)
This commit is contained in:

committed by
GitHub

parent
79ff8c2ecf
commit
5356e63249
@ -7,6 +7,7 @@ import androidx.work.WorkManager
|
||||
import com.badlogic.gdx.backends.android.AndroidApplication
|
||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.UncivGameParameters
|
||||
import com.unciv.logic.GameSaver
|
||||
import java.io.File
|
||||
|
||||
@ -23,12 +24,13 @@ class AndroidLauncher : AndroidApplication() {
|
||||
}
|
||||
|
||||
val config = AndroidApplicationConfiguration().apply { useImmersiveMode = true }
|
||||
val game = UncivGame (
|
||||
val androidParameters = UncivGameParameters(
|
||||
version = BuildConfig.VERSION_NAME,
|
||||
crashReportSender = CrashReportSenderAndroid(this),
|
||||
exitEvent = this::finish,
|
||||
fontImplementation = NativeFontAndroid(45)
|
||||
)
|
||||
)
|
||||
val game = UncivGame ( androidParameters )
|
||||
initialize(game, config)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user