|
@@ -60,7 +60,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</Transition>
|
|
|
- <div class="close" v-if="currentGame" @click="getExitGame"></div>
|
|
|
+ <div class="close" v-if="start" @click="getExitGame"></div>
|
|
|
<ActionConfirmWindow ref="actionConfirmRef" @confirmExit="getExitGame(1)" @confirmStart="getStartGame">
|
|
|
</ActionConfirmWindow>
|
|
|
</div>
|
|
@@ -169,9 +169,12 @@ const getInit = async () => {
|
|
|
if (!currentGame.value) {
|
|
|
return false;
|
|
|
}
|
|
|
+ if (!start.value) {
|
|
|
+ //传给预备窗口
|
|
|
+ actionConfirmRef.value.getInit(e);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
let area = e.ctrl_name.replace('bodyposecontroller_', '');
|
|
|
- //传给预备窗口
|
|
|
- actionConfirmRef.value.getInit(e);
|
|
|
//传给游戏窗口
|
|
|
if (currentGame.value == 'bodyposecontroller') {
|
|
|
if (currentGameArea.value.length == 2) {
|
|
@@ -242,18 +245,19 @@ const getExit = () => {
|
|
|
* 退出游戏
|
|
|
*/
|
|
|
const getExitGame = (type: any) => {
|
|
|
- start.value = false;
|
|
|
if (type == 1) {
|
|
|
currentGameArea.value.forEach((item: any) => {
|
|
|
terminateBodypose(item);
|
|
|
})
|
|
|
currentGame.value = "";
|
|
|
+ start.value = false;
|
|
|
} else {
|
|
|
proxy?.$modal.confirm("确定退出吗?").then(() => {
|
|
|
currentGameArea.value.forEach((item: any) => {
|
|
|
terminateBodypose(item);
|
|
|
})
|
|
|
currentGame.value = "";
|
|
|
+ start.value = false;
|
|
|
}).finally(() => {
|
|
|
});
|
|
|
}
|