|
|
@@ -440,12 +440,30 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
RxBus.get().send(RxBusCodes.QUITGAME)
|
|
|
finish()
|
|
|
} else if (TextUtils.equals("3", isPass)) {
|
|
|
- //游戏通关
|
|
|
- ARouter.getInstance().build(RouterUrlCommon.gameSettlement)
|
|
|
- .withString("gameCode", gameCode)
|
|
|
- .withString("playClass", playClass)
|
|
|
- .withTransition(R.anim.leftin, R.anim.leftout)
|
|
|
- .navigation(mContext)
|
|
|
+ val score: Int = gameTotalScore.toInt() + gameDataBean.curLevelScore.toInt()
|
|
|
+ gameTotalScore = score.toString()
|
|
|
+ if (TextUtils.equals("A", playClass)) {
|
|
|
+ val completionTrainingDialog = CompletionTrainingDialog()
|
|
|
+ completionTrainingDialog.setData(
|
|
|
+ gameTotalScore,
|
|
|
+ gameDataBean.curLevelScore
|
|
|
+ )
|
|
|
+ completionTrainingDialog.onDialogClickListener = {
|
|
|
+ finish()
|
|
|
+ LiveEventBusUtil.send(RxBusCodes.GAMEOVERTIME, "")
|
|
|
+ }
|
|
|
+ completionTrainingDialog.show(
|
|
|
+ supportFragmentManager,
|
|
|
+ "completionTrainingDialog"
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ //游戏通关
|
|
|
+ ARouter.getInstance().build(RouterUrlCommon.gameSettlement)
|
|
|
+ .withString("gameCode", gameCode)
|
|
|
+ .withString("playClass", playClass)
|
|
|
+ .withTransition(R.anim.leftin, R.anim.leftout)
|
|
|
+ .navigation(mContext)
|
|
|
+ }
|
|
|
} else {
|
|
|
val score: Int = gameTotalScore.toInt() + gameDataBean.curLevelScore.toInt()
|
|
|
gameTotalScore = score.toString()
|