◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:AVGplayer”的版本间的差异
(测试) |
(更新) |
||
第6行: | 第6行: | ||
"M4A1(2)":"http://www.gfwiki.org/images/4/41/M4A1_SAD.png", | "M4A1(2)":"http://www.gfwiki.org/images/4/41/M4A1_SAD.png", | ||
"AR15(2)":"http://www.gfwiki.org/images/3/39/AR15_T.png", | "AR15(2)":"http://www.gfwiki.org/images/3/39/AR15_T.png", | ||
− | "M4A1(0)":"http://www.gfwiki.org/images/4/4e/Pic_M4A1.png" | + | "M4A1(0)":"http://www.gfwiki.org/images/4/4e/Pic_M4A1.png", |
+ | "RO635(0)":"http://www.gfwiki.org/images/a/ae/%E5%B0%91%E5%A5%B3%E5%89%8D%E7%BA%BF-RO635.png", | ||
+ | "RO635(4)":"http://www.gfwiki.org/images/c/c8/Pic_RO635_4.png", | ||
+ | |||
+ | "M4 SOPMOD IIMod(0)":"http://www.gfwiki.org/images/7/70/M4_SOPMOD_IIMod.png", | ||
+ | |||
+ | "NPC-Kalin(0)":"http://www.gfwiki.org/images/2/21/Kalina.png", | ||
+ | "NPC-Kalin(1)":"http://www.gfwiki.org/images/a/a5/Kalina_1.png", | ||
+ | "NPC-Kalin(2)":"http://www.gfwiki.org/images/1/15/Kalina_2.png", | ||
+ | "NPC-Kalin(3)":"http://www.gfwiki.org/images/9/95/Kalina_3.png", | ||
+ | "NPC-Kalin(4)":"http://www.gfwiki.org/images/6/67/Kalina_4.png", | ||
+ | "NPC-Kalin(5)":"http://www.gfwiki.org/images/0/0b/Kalina_5.png", | ||
+ | "NPC-Kalin(6)":"http://www.gfwiki.org/images/0/0c/Kalina_6.png", | ||
+ | "NPC-Kalin(7)":"http://www.gfwiki.org/images/1/11/Kalina_7.png", | ||
+ | "NPC-Kalin(8)":"http://www.gfwiki.org/images/2/29/Kalina_8.png", | ||
+ | |||
+ | "NPC-Jason(0)":"http://www.gfwiki.org/images/e/e5/NPC-Jason.png", | ||
+ | |||
+ | "P22(0)":"http://www.gfwiki.org/images/7/77/Pic_P22.png", | ||
+ | "Lewis(0)":"http://www.gfwiki.org/images/5/5d/Pic_Lewis.png", | ||
}; | }; | ||
第12行: | 第31行: | ||
"BGM_Battle":"http://www.gfwiki.org/images/f/fa/BGM_Battle.wav", | "BGM_Battle":"http://www.gfwiki.org/images/f/fa/BGM_Battle.wav", | ||
"BGM_Empty":"", | "BGM_Empty":"", | ||
+ | "BGM_Truth":"http://www.gfwiki.org/images/b/b3/BGM_Truth.wav", | ||
+ | "BGM_Room":"http://www.gfwiki.org/images/c/c2/BGM_Room.wav", | ||
}; | }; | ||
第17行: | 第38行: | ||
"8":"http://www.gfwiki.org/images/9/9a/%E4%BD%9C%E6%88%98%E5%AE%A4avg.png", | "8":"http://www.gfwiki.org/images/9/9a/%E4%BD%9C%E6%88%98%E5%AE%A4avg.png", | ||
"9":"", | "9":"", | ||
− | "15":"http://www.gfwiki.org/images/a/ab/%E5%AE%A4%E5%86%85%E6%88%98%E6%96%97.png" | + | "15":"http://www.gfwiki.org/images/a/ab/%E5%AE%A4%E5%86%85%E6%88%98%E6%96%97.png", |
+ | "82":"http://www.gfwiki.org/images/6/63/BG-Dorm.png", | ||
+ | "85":"http://www.gfwiki.org/images/b/b8/BG_Inner.png", | ||
+ | "166":"http://www.gfwiki.org/images/7/79/BG-Cybercity.png", | ||
+ | "170":"http://www.gfwiki.org/images/c/c6/19WinterCG1.png", | ||
}; | }; | ||
var linepos = 0; | var linepos = 0; | ||
− | var avgtxt = ""; | + | var avgtxt = ""; //avg文本 |
− | var avgnextline = ""; | + | var avgnextline = ""; //当一个场景有多个+台词时 |
− | var autosign = 0; | + | var autosign = 0; //是否开启自动模式 |
− | var autospeed = 4; | + | var autospeed = 4; //自动速度 |
− | |||
− | var logallsign = 0; | + | var logallsign = 0; //log是否展示全部的标志 |
− | var xmlhttp = new XMLHttpRequest(); | + | var printwordstr; //打印的台词 |
− | xmlhttp.onreadystatechange = function() { | + | var printwordnum; //打印台词的位置 |
− | + | ||
− | }; | + | var blacksign = 0; //黑幕的标志 |
− | xmlhttp.open("GET", " | + | |
− | + | ||
+ | function avgcreat(){ | ||
+ | var output = `<div class="avgchoice" link="http://www.gfwiki.org/images/5/51/AVG0-3-2.txt">测试</div> | ||
+ | <div class="avgchoice" link="http://www.gfwiki.org/images/4/4a/AVG-31-0-1.txt">纪念</div> | ||
+ | <div class="avgchoice" link="http://www.gfwiki.org/images/9/90/AVG-31-1A1-1.txt">幻影的和平 Ⅰ</div> | ||
+ | <div class="avgchoice" link="http://www.gfwiki.org/images/0/04/AVG-31-1A2-1.txt">幻影的和平 Ⅱ</div>`; | ||
+ | |||
+ | $("#avgchosebox").html(output); | ||
+ | $(".avgchoice").css({"border":"1px #8886 solid", "padding":"6px 4px"}); | ||
+ | $(".avgchoice").click(function(){ | ||
+ | var xmlhttp = new XMLHttpRequest(); | ||
+ | xmlhttp.onreadystatechange = function() { | ||
+ | if (this.readyState == 4 && this.status == 200) { avgtxt = (this.responseText); readline(); } | ||
+ | }; | ||
+ | xmlhttp.open("GET", $(this).attr("link"), true); | ||
+ | xmlhttp.send(); | ||
+ | |||
+ | $("#avgbgm").attr("src", ""); | ||
+ | $("#avgbackground").html(""); | ||
+ | $("#avgdollcent").html(""); | ||
+ | $("#avgdollleft").html(""); | ||
+ | $("#avgdollrigh").html(""); | ||
+ | $("#avgdollleftmask").css("display","none"); | ||
+ | $("#avgdollrighmask").css("display","none"); | ||
+ | $("#avgbackground").html(""); | ||
+ | linepos = 0; | ||
+ | avgnextline = 0; | ||
+ | }); | ||
+ | $(".avgchoice").mouseover(function(){ | ||
+ | $(this).css({"background-color":"#eaeaeaaa","color":"black"}); | ||
+ | }); | ||
+ | $(".avgchoice").mouseout(function(){ | ||
+ | $(this).css({"background-color":"inherit","color":"inherit"}); | ||
+ | }); | ||
+ | } | ||
function divcreat(){ | function divcreat(){ | ||
第43行: | 第101行: | ||
<div id="avgauto" class="avgbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">自动</div> | <div id="avgauto" class="avgbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">自动</div> | ||
<div id="avgautospeed" style="display:-webkit-inline-box; border:1px #eaeaea solid; vertical-align:top;"><table><tr> | <div id="avgautospeed" style="display:-webkit-inline-box; border:1px #eaeaea solid; vertical-align:top;"><table><tr> | ||
− | <td id="avgautominus" class=" | + | <td id="avgautominus" class="avgpushbutton" style="width:30%; display:inline-block; user-select:none; border:1px #eaeaea88 solid; padding:2px 10px; cursor:pointer;">-</td> |
<td id="avgautonum" style="width:40%; text-align:center;">4</td> | <td id="avgautonum" style="width:40%; text-align:center;">4</td> | ||
− | <td id="avgautoplus" class=" | + | <td id="avgautoplus" class="avgpushbutton" style="width:30%; display:inline-block; user-select:none; border:1px #eaeaea88 solid; padding:2px 10px; cursor:pointer;">+</td> |
</tr></table></div> | </tr></table></div> | ||
<span style="padding:5px;"></span> | <span style="padding:5px;"></span> | ||
第52行: | 第110行: | ||
<div id="avglogall" class="avgbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">全部</div> | <div id="avglogall" class="avgbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">全部</div> | ||
<span style="padding:5px;"></span> | <span style="padding:5px;"></span> | ||
− | <div id="avgtobegin" class=" | + | <div id="avgtobegin" class="avgpushbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">返回开始</div> |
+ | <div id="avgchose" state="off" class="avgpushbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">选择剧情</div> | ||
</div> | </div> | ||
− | <div id="avgbox" style="width:1200px; height:675px; user-select:none;"> | + | <div id="avgbox" style="width:1200px; height:675px; user-select:none; background-color:#111; border:1px #8888 solid;"> |
− | <div id="avgbackground" style="position:absolute; width:1200px; height:675px; overflow:hidden; background-color:#111; z-index:1 | + | <div id="avgbackground" style="position:absolute; width:1200px; height:675px; overflow:hidden; background-color:#111; z-index:1;"></div> |
<div id="avgdollcent" style="width:675px; height:585px; position:absolute; top:150px; left:262.5px; overflow:hidden; z-index:6;"></div> | <div id="avgdollcent" style="width:675px; height:585px; position:absolute; top:150px; left:262.5px; overflow:hidden; z-index:6;"></div> | ||
第71行: | 第130行: | ||
<div id="avglogbox" style="width:1200px; height:675px; border:1px #8888 solid; overflow-y:scroll; display:none; background-color:#111; margin:10px 0px;"></div> | <div id="avglogbox" style="width:1200px; height:675px; border:1px #8888 solid; overflow-y:scroll; display:none; background-color:#111; margin:10px 0px;"></div> | ||
+ | <div id="avgchosebox" style="width:300px; height:675px; border:1px #8888 solid; overflow-y:scroll; display:none; position:absolute; background-color:#111; left:1220px; top:40px;"></div> | ||
<audio id="avgbgm" controls preload loop style="display:none;"></audio>`; | <audio id="avgbgm" controls preload loop style="display:none;"></audio>`; | ||
第82行: | 第142行: | ||
}); | }); | ||
− | $(". | + | $(".avgpushbutton").mousedown(function(){ |
$(this).css({"background-color":"#f4c430aa","color":"black"}); | $(this).css({"background-color":"#f4c430aa","color":"black"}); | ||
}); | }); | ||
− | $(". | + | $(".avgpushbutton").mouseup(function(){ |
$(this).css({"background-color":"#111111","color":"#eaeaea"}); | $(this).css({"background-color":"#111111","color":"#eaeaea"}); | ||
}); | }); | ||
第91行: | 第151行: | ||
$("#avgauto").click(function(){ | $("#avgauto").click(function(){ | ||
autosign = 1; | autosign = 1; | ||
− | setTimeout(function(){autoreadline();}, 800 * | + | setTimeout(function(){autoreadline();}, 800 * printwordstr.length / autospeed); |
$(this).css({"background-color":"#f4c430","color":"black"}); | $(this).css({"background-color":"#f4c430","color":"black"}); | ||
$("#avghand").css({"background-color":"#111111","color":"#eaeaea"}); | $("#avghand").css({"background-color":"#111111","color":"#eaeaea"}); | ||
第104行: | 第164行: | ||
var numnow = Number($("#avgautonum").html()); | var numnow = Number($("#avgautonum").html()); | ||
$("#avgautonum").html((numnow >= 8) ? 8 : numnow + 1); | $("#avgautonum").html((numnow >= 8) ? 8 : numnow + 1); | ||
+ | autospeed = (numnow >= 8) ? 8 : numnow + 1; | ||
}); | }); | ||
$("#avgautominus").click(function(){ | $("#avgautominus").click(function(){ | ||
var numnow = Number($("#avgautonum").html()); | var numnow = Number($("#avgautonum").html()); | ||
$("#avgautonum").html((numnow <= 1) ? 1 : numnow - 1); | $("#avgautonum").html((numnow <= 1) ? 1 : numnow - 1); | ||
+ | autospeed = (numnow <= 1) ? 1 : numnow - 1; | ||
}); | }); | ||
第137行: | 第199行: | ||
linepos = 0; | linepos = 0; | ||
readline(); | readline(); | ||
+ | }); | ||
+ | $("#avgchose").click(function(){ | ||
+ | if($(this).attr("state") == "on"){ | ||
+ | $(this).attr("state", "off"); | ||
+ | $(this).css({"background-color":"#111111","color":"#eaeaea"}); | ||
+ | $("#avgchosebox").css("display","none"); | ||
+ | } else if($(this).attr("state") == "off"){ | ||
+ | $(this).attr("state", "on"); | ||
+ | $(this).css({"background-color":"#f4c430","color":"black"}); | ||
+ | $("#avgchosebox").css("display","block"); | ||
+ | avglogcreat(); | ||
+ | } | ||
}); | }); | ||
} | } | ||
divcreat(); | divcreat(); | ||
− | $("#avgbox").click(function(){ readline();}); | + | avgcreat(); |
+ | $("#avgbox").click(function(){ | ||
+ | if(autosign == 1) $("#avghand").click(); | ||
+ | if(printwordstr && (printwordnum < printwordstr.length)) {printwordnum = printwordstr.length; printword();} | ||
+ | else readline(); | ||
+ | }); | ||
function readline(){ | function readline(){ | ||
if(avgnextline){ | if(avgnextline){ | ||
− | $("#avgline").html( | + | printwordstr = avgnextline.slice(0, (avgnextline.indexOf("+") == -1) ? avgnextline.length : avgnextline.indexOf("+")); |
+ | var fontcolor = (printwordstr.indexOf("color") == -1) ? "#EAEAEA" : printwordstr.slice(7, 14); | ||
+ | setTimeout(function(){ $("#avgline").html(""); printword(); $("#avgline").css("color", fontcolor);}, 800); | ||
+ | if(printwordstr.indexOf("color") != -1) printwordstr = printwordstr.slice("<color=#00CCFF>".length, printwordstr.indexOf("</color>")); | ||
+ | printwordnum = 1; | ||
if(avgnextline.indexOf("+") == -1) avgnextline = ""; | if(avgnextline.indexOf("+") == -1) avgnextline = ""; | ||
else avgnextline = avgnextline.slice(avgnextline.indexOf("+") + 1, avgnextline.length); | else avgnextline = avgnextline.slice(avgnextline.indexOf("+") + 1, avgnextline.length); | ||
第154行: | 第237行: | ||
//black | //black | ||
− | if(thisline.indexOf("<黑屏2>") != -1){ | + | if(thisline.indexOf("<黑屏2>") != -1 && blacksign == 0){ |
$("#avgdollcent").html(""); | $("#avgdollcent").html(""); | ||
− | $("#avgdollleft").html(""); | + | $("#avgdollleft").html(""); $("#avgdollleftmask").css("display","none"); |
− | $("#avgdollrigh").html(""); | + | $("#avgdollrigh").html(""); $("#avgdollrighmask").css("display","none"); |
− | + | $("#avgspeaker").html(""); $("#avgline").html(""); | |
− | $("# | + | $("#avgbackground").html(""); $("#avgbgm").attr("src", ""); |
− | $("#avgbackground"). | + | $("#avgdollcent").fadeOut(1000 / autospeed); $("#avgdollleft").fadeOut(1000 / autospeed); $("#avgdollrigh").fadeOut(1000 / autospeed); |
+ | $("#avgbackground").fadeOut(1000 / autospeed); $("#avgword").fadeOut(1000 / autospeed); | ||
+ | blacksign = 1; | ||
+ | return; | ||
} | } | ||
第222行: | 第308行: | ||
if(thisline.indexOf("<Speaker>") != -1){ | if(thisline.indexOf("<Speaker>") != -1){ | ||
var speaker = thisline.slice(thisline.indexOf("<Speaker>") + ("<Speaker>").length , thisline.indexOf("</Speaker>")); | var speaker = thisline.slice(thisline.indexOf("<Speaker>") + ("<Speaker>").length , thisline.indexOf("</Speaker>")); | ||
− | $("#avgspeaker").html(speaker); | + | setTimeout(function(){ $("#avgspeaker").html(speaker); }, 500); |
} | } | ||
− | else $("#avgspeaker").html(" "); | + | else setTimeout(function(){ $("#avgspeaker").html(" "); }, 500); |
//word line | //word line | ||
− | if(thisline.indexOf(":") != -1 | + | if(thisline.indexOf(":") != -1){ |
− | $("#avgline").html( | + | var keyword = (thisline.indexOf("+") != -1) ? "+" : "\n"; |
− | + | printwordstr = thisline.slice(thisline.indexOf(":") + 1, thisline.indexOf(keyword)); | |
+ | var fontcolor = (printwordstr.indexOf("color") == -1) ? "#EAEAEA" : printwordstr.slice(7, 14); | ||
+ | |||
+ | $("#avgword").fadeOut(500); | ||
+ | setTimeout(function(){ $("#avgline").html(""); $("#avgword").fadeIn(500);}, 500); | ||
+ | setTimeout(function(){ printword(); $("#avgline").css("color", fontcolor);}, 800); | ||
+ | if(printwordstr.indexOf("color") != -1) printwordstr = printwordstr.slice("<color=#00CCFF>".length, printwordstr.indexOf("</color>")); | ||
+ | printwordnum = 1; | ||
+ | |||
+ | if((thisline.indexOf("+") != -1)) avgnextline = thisline.slice(thisline.indexOf("+") + 1, thisline.length); | ||
+ | } else { | ||
+ | $("#avgword").fadeOut(500); | ||
+ | setTimeout(function(){ $("#avgline").html(""); $("#avgword").fadeIn(500);}, 500); | ||
} | } | ||
− | + | ||
− | $("# | + | if(blacksign == 1){ |
− | + | $("#avgdollcent").fadeIn(3200 / autospeed); $("#avgdollleft").fadeIn(3200 / autospeed); $("#avgdollrigh").fadeIn(3200 / autospeed); | |
− | + | $("#avgbackground").fadeIn(2000 / autospeed); $("#avgword").fadeIn(4000 / autospeed); | |
+ | blacksign = 0; | ||
} | } | ||
− | |||
//position sign | //position sign | ||
第246行: | 第344行: | ||
if(autosign == 0) return; | if(autosign == 0) return; | ||
readline(); | readline(); | ||
− | setTimeout(function(){autoreadline();}, | + | setTimeout(function(){autoreadline();}, 1000 + 500 * printwordstr.length / autospeed); |
+ | } | ||
+ | |||
+ | function printword(){ | ||
+ | $("#avgline").html(printwordstr.slice(0, printwordnum)); | ||
+ | printwordnum ++; | ||
+ | if(printwordnum > printwordstr.length) return; | ||
+ | setTimeout(function(){ printword();}, 300 / autospeed); | ||
} | } | ||
2021年1月24日 (日) 20:25的版本
{{剧情模拟器剧情导航}} {{#Widget:AssembledPlotOptions|title=七周年祝贺|json=AVG_Anniversary_7}} {{#Widget:AVGplayer/css}} {{#Widget:AVGplayer/js}} {{#Widget:AssembledPlotOptions/common}}