|
|
@@ -69,6 +69,7 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
*/
|
|
|
private var countdownSuccess = false
|
|
|
private var gameCode: String = ""
|
|
|
+ private var id: String = ""
|
|
|
private var playClass: String = ""
|
|
|
private var gameType: String = ""
|
|
|
private var url: String = ""
|
|
|
@@ -97,6 +98,7 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
private var gameTimeOut = ""
|
|
|
|
|
|
override fun initViews() {
|
|
|
+ id = intent.getStringExtra("id") ?: ""
|
|
|
gameCode = intent.getStringExtra("gameCode") ?: ""
|
|
|
playClass = intent.getStringExtra("playClass") ?: ""
|
|
|
url = intent.getStringExtra("url") ?: ""
|
|
|
@@ -268,6 +270,7 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
v.startAnimation(getScaleAnimation())
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
MotionEvent.ACTION_UP -> {
|
|
|
v.startAnimation(getEndAnimation())
|
|
|
when (v.id) {
|
|
|
@@ -283,6 +286,7 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
Log.e("wpp", "游戏暂停成功跳转介绍")
|
|
|
ARouter.getInstance().build(RouterUrlCommon.gameIntroduction)
|
|
|
.withString("gameCode", gameCode)
|
|
|
+ .withString("id", id)
|
|
|
.withString("playClass", playClass)
|
|
|
.withTransition(R.anim.leftin, R.anim.leftout)
|
|
|
.navigation(mContext)
|
|
|
@@ -290,6 +294,7 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
R.id.tvFullScreen -> {
|
|
|
runOnUiThread {
|
|
|
if (TextUtils.equals("0", fullFlag)) {
|
|
|
@@ -304,6 +309,7 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
MotionEvent.ACTION_CANCEL -> {
|
|
|
if (v.id == R.id.imagePause || v.id == R.id.tvFullScreen) {
|
|
|
v.startAnimation(getEndAnimation())
|
|
|
@@ -326,18 +332,23 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
"one" -> {
|
|
|
oneStep = it.voiceUrl
|
|
|
}
|
|
|
+
|
|
|
"two" -> {
|
|
|
twoStep = it.voiceUrl
|
|
|
}
|
|
|
+
|
|
|
"three" -> {
|
|
|
threeStep = it.voiceUrl
|
|
|
}
|
|
|
+
|
|
|
"fail" -> {
|
|
|
gameFailed = it.voiceUrl
|
|
|
}
|
|
|
+
|
|
|
"success" -> {
|
|
|
gameSuccess = it.voiceUrl
|
|
|
}
|
|
|
+
|
|
|
"timeout" -> {
|
|
|
gameTimeOut = it.voiceUrl
|
|
|
}
|
|
|
@@ -470,6 +481,7 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
|
|
|
"2", "4" -> {
|
|
|
gameDataBean.isPass = "1"
|
|
|
}
|
|
|
+
|
|
|
"3" -> {
|
|
|
gameDataBean.isPass = "0"
|
|
|
}
|