mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Start monster beat-down after application is loaded in Lens
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
1 parent
00831edd55
commit
bd2e60bfa7
3 files changed
+21
-2
No files matched your search
@@ -31,6 +31,7 @@
|
||||
"lint:fix": "lens-lint --fix"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@k8slens/application": "*",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||
"@ogre-tools/fp": "^15.1.2",
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { gameInjectable } from "./monster-beatdown.injectable";
|
||||
import { afterApplicationIsLoadedInjectionToken } from "@k8slens/application";
|
||||
|
||||
const startGameAfterApplicationIsLoadedInjectable = getInjectable({
|
||||
id: "start-game-after-application-is-loaded",
|
||||
|
||||
instantiate: (di) => ({
|
||||
run: () => {
|
||||
di.inject(gameInjectable).start();
|
||||
},
|
||||
}),
|
||||
|
||||
injectionToken: afterApplicationIsLoadedInjectionToken,
|
||||
});
|
||||
|
||||
export default startGameAfterApplicationIsLoadedInjectable;
|
||||
Reference in new issue
Block a user