| 
														
															@@ -1,6 +1,7 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 package com.yingyangfly.game.play 
														 | 
														
														 | 
														
															 package com.yingyangfly.game.play 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import android.annotation.SuppressLint 
														 | 
														
														 | 
														
															 import android.annotation.SuppressLint 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import android.content.Intent 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import android.os.Build 
														 | 
														
														 | 
														
															 import android.os.Build 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import android.os.Bundle 
														 | 
														
														 | 
														
															 import android.os.Bundle 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import android.text.TextUtils 
														 | 
														
														 | 
														
															 import android.text.TextUtils 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -28,6 +29,9 @@ import com.yingyangfly.game.dialog.GameResultDialog 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.yingyangfly.game.entity.GameBean 
														 | 
														
														 | 
														
															 import com.yingyangfly.game.entity.GameBean 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.yingyangfly.game.entity.GameDataBean 
														 | 
														
														 | 
														
															 import com.yingyangfly.game.entity.GameDataBean 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.yingyangfly.game.utils.AndroidToJs 
														 | 
														
														 | 
														
															 import com.yingyangfly.game.utils.AndroidToJs 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import gorden.rxbus2.RxBus 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import gorden.rxbus2.Subscribe 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import gorden.rxbus2.ThreadMode 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 /** 
														 | 
														
														 | 
														
															 /** 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  * 玩游戏页面 
														 | 
														
														 | 
														
															  * 玩游戏页面 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -45,6 +49,17 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         super.onCreate(savedInstanceState) 
														 | 
														
														 | 
														
															         super.onCreate(savedInstanceState) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    override fun onNewIntent(intent: Intent?) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        super.onNewIntent(intent) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        runOnUiThread { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            binding.webView.evaluateJavascript( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                "javascript:CallContinueGame()" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            ) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     override fun initViews() { 
														 | 
														
														 | 
														
															     override fun initViews() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (gameBean != null) { 
														 | 
														
														 | 
														
															         if (gameBean != null) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             val url = gameBean!!.gameUrl + "?startLv=" + gameBean!!.gameLevel + "&maxLv=" + 
														 | 
														
														 | 
														
															             val url = gameBean!!.gameUrl + "?startLv=" + gameBean!!.gameLevel + "&maxLv=" + 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -118,7 +133,7 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         }, success = { 
														 | 
														
														 | 
														
															         }, success = { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             runOnUiThread { 
														 | 
														
														 | 
														
															             runOnUiThread { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 if (TextUtils.equals("2", gameDataBean.isPass)) { 
														 | 
														
														 | 
														
															                 if (TextUtils.equals("2", gameDataBean.isPass)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    //退出游戏 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    RxBus.get().send(RxBusCodes.QUITGAME) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     finish() 
														 | 
														
														 | 
														
															                     finish() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } else if (TextUtils.equals("3", gameDataBean.isPass)) { 
														 | 
														
														 | 
														
															                 } else if (TextUtils.equals("3", gameDataBean.isPass)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     //游戏通关 
														 | 
														
														 | 
														
															                     //游戏通关 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -219,6 +234,11 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         binding.webView.evaluateJavascript( 
														 | 
														
														 | 
														
															                         binding.webView.evaluateJavascript( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                             "javascript:CallPauseGame()" 
														 | 
														
														 | 
														
															                             "javascript:CallPauseGame()" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         ) { 
														 | 
														
														 | 
														
															                         ) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            ARouter.getInstance().build(RouterUrlCommon.gameIntroduction) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                .withString("gameCode", gameBean!!.gameCode) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                .withString("playClass", gameBean!!.playClass) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                .withTransition(R.anim.leftin, R.anim.leftout) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                .navigation(mContext) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         } 
														 | 
														
														 | 
														
															                         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     } 
														 | 
														
														 | 
														
															                     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -268,4 +288,15 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @Subscribe(code = RxBusCodes.CALLQUITGAME, threadMode = ThreadMode.MAIN) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    fun callQuitGame() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        runOnUiThread { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            binding.webView.evaluateJavascript( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                "javascript:CallQuitGame()" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            ) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 |