あべこべを実装する
This commit is contained in:
@@ -516,7 +516,24 @@
|
|||||||
var string = line.toUpperCase().split("")
|
var string = line.toUpperCase().split("")
|
||||||
|
|
||||||
for(let symbol of string){
|
for(let symbol of string){
|
||||||
|
const abekobe = localStorage.getItem("abekobe") ?? "false";
|
||||||
|
|
||||||
|
if (abekobe === "true") {
|
||||||
|
if (symbol === "1") {
|
||||||
|
symbol = "2";
|
||||||
|
} else if (symbol === "2") {
|
||||||
|
symbol = "1";
|
||||||
|
} else if (symbol === "3") {
|
||||||
|
symbol = "4";
|
||||||
|
} else if (symbol === "4") {
|
||||||
|
symbol = "3";
|
||||||
|
} else if (symbol === "A") {
|
||||||
|
symbol = "B";
|
||||||
|
} else if (symbol === "B") {
|
||||||
|
symbol - "A";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var error = false
|
var error = false
|
||||||
switch(symbol){
|
switch(symbol){
|
||||||
|
|
||||||
|
|||||||
@@ -250,6 +250,12 @@ class SongSelect{
|
|||||||
action: "doron",
|
action: "doron",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.songs.push({
|
||||||
|
title: "あべこべ",
|
||||||
|
skin: this.songSkin.customSettings,
|
||||||
|
action: "abekobe",
|
||||||
|
});
|
||||||
|
|
||||||
this.songs.push({
|
this.songs.push({
|
||||||
title: strings.back,
|
title: strings.back,
|
||||||
skin: this.songSkin.back,
|
skin: this.songSkin.back,
|
||||||
@@ -941,6 +947,20 @@ class SongSelect{
|
|||||||
}
|
}
|
||||||
localStorage.setItem("doron", doron);
|
localStorage.setItem("doron", doron);
|
||||||
}, 100);
|
}, 100);
|
||||||
|
} else if (currentSong.action === "abekobe") {
|
||||||
|
this.playSound("se_don");
|
||||||
|
setTimeout(() => {
|
||||||
|
let abekobe = localStorage.getItem("abekobe") ?? "false";
|
||||||
|
const input = prompt("あべこべを有効にするには\"true\"を入力してね!", abekobe);
|
||||||
|
if (input === null) {
|
||||||
|
// キャンセル
|
||||||
|
} else if (input === "") {
|
||||||
|
input = "false";
|
||||||
|
} else {
|
||||||
|
abekobe = input;
|
||||||
|
}
|
||||||
|
localStorage.setItem("abekobe", abekobe);
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.pointer(false)
|
this.pointer(false)
|
||||||
|
|||||||
@@ -1708,7 +1708,7 @@
|
|||||||
|
|
||||||
const doron = localStorage.getItem("doron") ?? "false";
|
const doron = localStorage.getItem("doron") ?? "false";
|
||||||
|
|
||||||
if((!fade || fade < 1) && doron === "false"){
|
if((!fade || fade < 1) && doron !== "true"){
|
||||||
// Main circle
|
// Main circle
|
||||||
ctx.fillStyle = fill
|
ctx.fillStyle = fill
|
||||||
ctx.beginPath()
|
ctx.beginPath()
|
||||||
|
|||||||
Reference in New Issue
Block a user