bug修复
This commit is contained in:
parent
119570953e
commit
7523611b87
@ -9751,6 +9751,7 @@ core.plugin.animate = {
|
|||||||
this.time = 0;
|
this.time = 0;
|
||||||
this.WindowSkin = false;
|
this.WindowSkin = false;
|
||||||
this.sound = "";
|
this.sound = "";
|
||||||
|
this.beforeSound = 0;
|
||||||
}
|
}
|
||||||
click(px, py) { //点击效果
|
click(px, py) { //点击效果
|
||||||
|
|
||||||
@ -9772,10 +9773,11 @@ core.plugin.animate = {
|
|||||||
const skipbox = makeBox([1400, 1100], [192, 96]);
|
const skipbox = makeBox([1400, 1100], [192, 96]);
|
||||||
const skipboxVertical = makeBox([52, 1400], [96, 192])
|
const skipboxVertical = makeBox([52, 1400], [96, 192])
|
||||||
const autobox = makeBox([1700, 900], [192, 96]);
|
const autobox = makeBox([1700, 900], [192, 96]);
|
||||||
const autoboxVertical = makeBox([352, 1700], [96, 192])
|
const autoboxVertical = makeBox([256, 1700], [96, 192])
|
||||||
if ((core.domStyle.isVertical && inRect(pos, skipboxVertical) && !this.WindowSkin) || (!core.domStyle.isVertical && !this.WindowSkin && inRect(pos, skipbox))) {
|
if ((core.domStyle.isVertical && inRect(pos, skipboxVertical) && !this.WindowSkin) || (!core.domStyle.isVertical && !this.WindowSkin && inRect(pos, skipbox))) {
|
||||||
auto = false;
|
auto = false;
|
||||||
let time = 0
|
let time = 0
|
||||||
|
core.stopSound(this.beforeSound);
|
||||||
core.registerAnimationFrame("skip", true, (timestamp) => {
|
core.registerAnimationFrame("skip", true, (timestamp) => {
|
||||||
if (timestamp > time + 100) {
|
if (timestamp > time + 100) {
|
||||||
time = timestamp
|
time = timestamp
|
||||||
@ -9818,6 +9820,7 @@ core.plugin.animate = {
|
|||||||
if (core.status.event.animateUI) return;
|
if (core.status.event.animateUI) return;
|
||||||
auto = false;
|
auto = false;
|
||||||
const data = core.clone(core.status.event.data.current);
|
const data = core.clone(core.status.event.data.current);
|
||||||
|
|
||||||
// 打字机效果显示全部文字
|
// 打字机效果显示全部文字
|
||||||
if (core.status.event.interval != null) {
|
if (core.status.event.interval != null) {
|
||||||
data.showAll = true;
|
data.showAll = true;
|
||||||
@ -9827,6 +9830,8 @@ core.plugin.animate = {
|
|||||||
core.insertAction(data);
|
core.insertAction(data);
|
||||||
core.doAction();
|
core.doAction();
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
core.stopSound(this.beforeSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
cg.style.display = "none"
|
cg.style.display = "none"
|
||||||
@ -9927,7 +9932,7 @@ core.plugin.animate = {
|
|||||||
|
|
||||||
if (config.time == 0) {
|
if (config.time == 0) {
|
||||||
while (_drawNext());
|
while (_drawNext());
|
||||||
if (auto && !this.WindowSkin && !this.sound) {
|
if (auto && !this.WindowSkin && !core.ui.cgText.sound || (core.ui.cgText.sound && !core.musicStatus.soundStatus)) {
|
||||||
setTimeout(() => { if (auto) core.doAction() }, 2000)
|
setTimeout(() => { if (auto) core.doAction() }, 2000)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -9936,7 +9941,7 @@ core.plugin.animate = {
|
|||||||
if (!_drawNext()) {
|
if (!_drawNext()) {
|
||||||
clearInterval(core.status.event.interval);
|
clearInterval(core.status.event.interval);
|
||||||
core.status.event.interval = null;
|
core.status.event.interval = null;
|
||||||
if (auto && !this.WindowSkin && !this.sound) setTimeout(() => { if (auto) core.doAction() }, 2000)
|
if (auto && !this.WindowSkin && !core.ui.cgText.sound || (core.ui.cgText.sound && !core.musicStatus.soundStatus)) setTimeout(() => { if (auto) core.doAction() }, 2000)
|
||||||
}
|
}
|
||||||
}, config.time);
|
}, config.time);
|
||||||
}
|
}
|
||||||
@ -9949,6 +9954,7 @@ core.plugin.animate = {
|
|||||||
}
|
}
|
||||||
background() {
|
background() {
|
||||||
const img = core.material.images.images?.[this.image]
|
const img = core.material.images.images?.[this.image]
|
||||||
|
|
||||||
if (core.domStyle.isVertical) {
|
if (core.domStyle.isVertical) {
|
||||||
ctx.canvas.width = 1248;
|
ctx.canvas.width = 1248;
|
||||||
ctx.canvas.height = 2028;
|
ctx.canvas.height = 2028;
|
||||||
@ -9990,9 +9996,9 @@ core.plugin.animate = {
|
|||||||
core.fillBoldText(ctx, autoText, 1722, 966, '#FFFFFF', '#000000', "bold 48px Verdana")
|
core.fillBoldText(ctx, autoText, 1722, 966, '#FFFFFF', '#000000', "bold 48px Verdana")
|
||||||
}
|
}
|
||||||
if (this.name) core.fillBoldText(ctx, `【${this.name}】`, 500, 880, '#FFFFFF', '#000000', "bold 48px Verdana") //绘制名字
|
if (this.name) core.fillBoldText(ctx, `【${this.name}】`, 500, 880, '#FFFFFF', '#000000', "bold 48px Verdana") //绘制名字
|
||||||
if (this.sound && core.material.sounds[this.sound] && !core.getFlag("skip", false)) {
|
if (this.sound && core.material.sounds[this.sound] && !core.getFlag("skip", false) && core.musicStatus.soundStatus) {
|
||||||
core.playSound(this.sound, null, () => {
|
this.beforeSound = core.playSound(this.sound, null, () => {
|
||||||
if (auto && !this.WindowSkin) {
|
if (this.sound && auto && !this.WindowSkin && core.musicStatus.soundStatus) {
|
||||||
setTimeout(() => { if (auto) core.doAction() }, 2000)
|
setTimeout(() => { if (auto) core.doAction() }, 2000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user