1545306466486

1111

 gameOver();
 defaultBullet();
 $(".resultPanel").show();
 $('.result_panel_title').html('答题复活');
 $('#gameInTimeBox').show();

放弃按钮:

gameOver();
defaultBullet();
$('#gameEndBox').hide();
    $('.game_background').hide();
    $('.gamePanel').hide();
    $('.homePanel').show();
    $('#countdownTime span:eq(0)').html('02');
    $('#countdownTime span:eq(2)').html('00');
    clearInterval(statusTime);
    setCookie('timeout',0);
    gameTime = 120;
    //调取接口-获取最新次数
    fctyt.homePortAjax();


答题按钮:2222

defaultBullet();
$(".resultPanel").show();
$('.result_prompt').show().html("<p>答题正确可继续游戏</p>");
$('#answerValue').show();
//获取题目---4--
fctyt.questionsPort();
//设置复活答题
setCookie('relive',1);

1545307143715

提交按钮:

answersPort(id,realkey)

回答正确:

var relive = getCookie('relive');
defaultBullet();
$('.resultPanel').show();
$('.result_panel_title').html('回答正确');
if( relive == 1 ){
	$('#gameOnwardBox').show();
	setCookie('relive',0);
} else {
	$('#correctBox').show();
}

1545308084417

继续游戏:

defaultBullet();
    g_isGameStart = true;
    game = new Object();
    $(".gamePanel").hide().show();
    g_drumpNum = 0;
    g_currentScoreAdd = 1;
    game = new Game("gameCanvas");
    for (var i = 0; i < 2; i++) {
        g_boxArr[i] = copyObject(g_boxArrDefined[Math.floor(Math.random() * 8)]);
        if (i == 0) {
            g_boxArr[i].y = 480;
            g_boxArr[i].x = -100;
        } else {
            g_boxArr[i].y = g_boxArr[i - 1].y - 480;
            g_boxArr[i].x = g_boxArr[i - 1].x;
        }
    }
    game.initCanvas(g_ball, g_boxArr);
    update();

回答错误:

var relive = getCookie('relive');
defaultBullet();
$('.resultPanel').show();
$('.result_panel_icon').addClass("result_panel_icon_black");
$('.result_panel_title').html('回答错误');
if( relive == 1 ){
	$('#gameOverBox').fadeIn();
	setCookie('relive',0);
} else {
	$('#errorBox').fadeIn();
}

1545308489919

确定结束

function gameOverGoHome(){
    gameOver();
    defaultBullet();
    $('#gameEndBox').hide();
    $('.game_background').hide();
    $('.gamePanel').hide();
    $('.homePanel').show();
    $('#countdownTime span:eq(0)').html('02');
    $('#countdownTime span:eq(2)').html('00');
    clearInterval(statusTime);
    setCookie('timeout',0);
    gameTime = 120;
    //调取接口-获取最新次数
    fctyt.homePortAjax();
}

跳上logo答题:

defaultBullet();
$('.resultPanel').show();
$('.result_panel_title').html('请答题');
$('.result_prompt').show().html("<p>答题正确获得2奖励值</p><p>答题错误不获得奖励值</p>");
$('#answerValue').show();
//获取题目
fctyt.questionsPort();
//设置logo答题
setCookie('relive',0);

1545309091616

回答正确:

1545309265168

继续:
$('.resultPanel').fadeOut();
    defaultBullet();

回答错误:

1545309439956

$('.resultPanel').fadeOut();
    defaultBullet();

时间到:

gameOver();
clearInterval(statusTime);
defaultBullet();
$('.resultPanel').show();
$('#gameEndBox').show();
$('.result_panel_title').html('时间到 !');

1545309598129

1 失败区域

2,倒计时

3 答题是否覆盖时间结束