|
|
@@ -5,6 +5,7 @@ import android.app.Activity
|
|
|
import android.app.ActivityManager
|
|
|
import android.content.Context
|
|
|
import android.content.Intent
|
|
|
+import android.os.Bundle
|
|
|
import android.text.TextUtils
|
|
|
import android.text.method.ScrollingMovementMethod
|
|
|
import android.view.MotionEvent
|
|
|
@@ -57,14 +58,13 @@ class GameIntroductionActivity :
|
|
|
*/
|
|
|
private var voicePlayer: VoicePlayer? = null
|
|
|
|
|
|
- override fun initViews() {
|
|
|
+ override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
id = intent.getStringExtra("id") ?: ""
|
|
|
desn = intent.getStringExtra("desn") ?: ""
|
|
|
gameCode = intent.getStringExtra("gameCode") ?: ""
|
|
|
playClass = intent.getStringExtra("playClass") ?: ""
|
|
|
isPlayGameJump = intent.getBooleanExtra("isPlayGameJump", false)
|
|
|
- voicePlayer = VoicePlayer.getInstance(mContext)
|
|
|
- mVodPlayer = TXVodPlayer(mContext)
|
|
|
+ super.onCreate(savedInstanceState)
|
|
|
if (isPlayGameJump.not()) {
|
|
|
val gameLoadingDialog = GameLoadingDialog()
|
|
|
gameLoadingDialog.onDialogClickListener = {
|
|
|
@@ -72,6 +72,11 @@ class GameIntroductionActivity :
|
|
|
}
|
|
|
gameLoadingDialog.show(supportFragmentManager, "gameLoadingDialog")
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ override fun initViews() {
|
|
|
+ voicePlayer = VoicePlayer.getInstance(mContext)
|
|
|
+ mVodPlayer = TXVodPlayer(mContext)
|
|
|
if (User.isUpdateSaveGameSound()) {
|
|
|
User.saveSaveGameSoundDate(User.getNowDay())
|
|
|
getGameSound()
|
|
|
@@ -217,9 +222,7 @@ class GameIntroductionActivity :
|
|
|
LiveEventBusUtil.send(RxBusCodes.CALLQUITGAME, "")
|
|
|
finish()
|
|
|
} else {
|
|
|
- ActivityManagers.instance.finishActivity(
|
|
|
- PlayGameActivity::class.java
|
|
|
- )
|
|
|
+ LiveEventBusUtil.send(RxBusCodes.FINISHPLAYGAME, "")
|
|
|
finish()
|
|
|
}
|
|
|
}
|
|
|
@@ -255,6 +258,7 @@ class GameIntroductionActivity :
|
|
|
.withString("gameName", gameBean!!.gameName)
|
|
|
.withTransition(R.anim.leftin, R.anim.leftout)
|
|
|
.navigation(mContext)
|
|
|
+ isPlayGameJump = true
|
|
|
reportLog("进入游戏页面,游戏名称:" + gameBean!!.gameName + "游戏code: " + gameCode + " playClass:" + playClass + " gameId:" + id)
|
|
|
}
|
|
|
}
|
|
|
@@ -347,7 +351,12 @@ class GameIntroductionActivity :
|
|
|
finish()
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ //结束游戏
|
|
|
+ LiveEventBusUtil.observer<String>(this, RxBusCodes.FINISHGAMEINTRODUCTION) {
|
|
|
+ runOnUiThread {
|
|
|
+ finish()
|
|
|
+ }
|
|
|
+ }
|
|
|
//游戏加载完成
|
|
|
LiveEventBusUtil.observer<String>(this, RxBusCodes.LOADINGOVER) {
|
|
|
runOnUiThread {
|