|
|
@@ -75,11 +75,6 @@ abstract class BaseCocosWebGameFragment<VM : BaseCocosWebGameViewModel<*, *, *,
|
|
|
override fun initViews() {
|
|
|
super.initViews()
|
|
|
val contentViewBinding = contentView()
|
|
|
- onCocosGameViewCreated(contentViewBinding)
|
|
|
- if (!AppBaseInfo.isRelease) {
|
|
|
- // DEBUG包打印游戏路径
|
|
|
- showToast("DEBUG: gameCode:${cocosGame()}, gameUrl:${gameUrl()}")
|
|
|
- }
|
|
|
fixSafeView()
|
|
|
cocosViewModel.onCreate()
|
|
|
cocosViewModel.initGame(
|
|
|
@@ -88,6 +83,11 @@ abstract class BaseCocosWebGameFragment<VM : BaseCocosWebGameViewModel<*, *, *,
|
|
|
InitGameData(cocosGame(), 58.dp())
|
|
|
)
|
|
|
loadUrlAfterViewCreated()
|
|
|
+ onCocosGameViewCreated(contentViewBinding)
|
|
|
+ if (!AppBaseInfo.isRelease) {
|
|
|
+ // DEBUG包打印游戏路径
|
|
|
+ showToast("DEBUG: gameCode:${cocosGame()}, gameUrl:${gameUrl()}")
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
open fun fixSafeView() {
|