From: fredboy Date: Sat, 25 May 2024 04:52:14 +0000 (+0700) Subject: MainComponent in kotlin X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=3a443514027417133d7a7e18766720dfea028a87;p=cavedroid.git MainComponent in kotlin --- diff --git a/core/src/ru/deadsoftware/cavedroid/MainComponent.java b/core/src/ru/deadsoftware/cavedroid/MainComponent.java deleted file mode 100644 index b487c6d..0000000 --- a/core/src/ru/deadsoftware/cavedroid/MainComponent.java +++ /dev/null @@ -1,21 +0,0 @@ -package ru.deadsoftware.cavedroid; - -import dagger.Component; -import ru.deadsoftware.cavedroid.game.GameScreen; -import ru.deadsoftware.cavedroid.menu.MenuScreen; -import ru.deadsoftware.cavedroid.misc.utils.AssetLoader; -import ru.deadsoftware.cavedroid.prefs.PreferencesStore; - -import javax.inject.Singleton; - -@Singleton -@Component(dependencies = {CaveGame.class, PreferencesStore.class}) -public interface MainComponent { - GameScreen getGameScreen(); - - MenuScreen getMenuScreen(); - - MainConfig getMainConfig(); - - AssetLoader getAssetLoader(); -} diff --git a/core/src/ru/deadsoftware/cavedroid/MainComponent.kt b/core/src/ru/deadsoftware/cavedroid/MainComponent.kt new file mode 100644 index 0000000..b2a77ee --- /dev/null +++ b/core/src/ru/deadsoftware/cavedroid/MainComponent.kt @@ -0,0 +1,22 @@ +package ru.deadsoftware.cavedroid + +import dagger.Component +import ru.deadsoftware.cavedroid.game.GameScreen +import ru.deadsoftware.cavedroid.menu.MenuScreen +import ru.deadsoftware.cavedroid.misc.utils.AssetLoader +import ru.deadsoftware.cavedroid.prefs.PreferencesStore +import javax.inject.Singleton + +@Singleton +@Component(dependencies = [CaveGame::class, PreferencesStore::class]) +interface MainComponent { + + val gameScreen: GameScreen + + val menuScreen: MenuScreen + + val mainConfig: MainConfig + + val assetLoader: AssetLoader + +} \ No newline at end of file