动画竖屏修复

This commit is contained in:
草莓 2025-04-15 22:51:09 +08:00
parent 7205b83bf9
commit 4746459714

View File

@ -17588,16 +17588,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} }
popDamage(damage, onhero) { popDamage(damage, onhero) {
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0); //重新定位右上角为基准
ctx.rotate(Math.PI / 2); //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
let color = "#FFFFFF"; let color = "#FFFFFF";
if (typeof damage === "number") { if (typeof damage === "number") {
color = damage < 0 ? "#22FF44" : "lightcoral"; color = damage < 0 ? "#22FF44" : "lightcoral";
@ -17611,6 +17602,16 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (start === 0) start = temptime if (start === 0) start = temptime
let farme = Math.floor((temptime - start) / (1000 / 60)) let farme = Math.floor((temptime - start) / (1000 / 60))
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0); //重新定位右上角为基准
ctx.rotate(Math.PI / 2); //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
core.clearMap(ctx); core.clearMap(ctx);
core.setTextAlign(ctx, "center"); core.setTextAlign(ctx, "center");
core.fillBoldText1( core.fillBoldText1(
@ -17624,7 +17625,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
"bold 72px Arial" "bold 72px Arial"
); );
ctx2.restore(); ctx.restore();
if (farme > 30) { if (farme > 30) {
core.unregisterAnimationFrame("popDamageonboss"); core.unregisterAnimationFrame("popDamageonboss");
@ -17763,6 +17764,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} }
} }
drawchoose() { drawchoose() {
boss7.style.display = "block";
if (core.domStyle.isVertical) { if (core.domStyle.isVertical) {
ctx7.canvas.width = 1248; ctx7.canvas.width = 1248;
ctx7.canvas.height = 2028; ctx7.canvas.height = 2028;
@ -17773,7 +17775,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
ctx7.canvas.width = 2028; ctx7.canvas.width = 2028;
ctx7.canvas.height = 1248; ctx7.canvas.height = 1248;
} }
boss7.style.display = "block";
core.clearMap(ctx7); core.clearMap(ctx7);
if (this.hasEnemy()) { if (this.hasEnemy()) {
core.drawWindowSkin( core.drawWindowSkin(
@ -17824,6 +17826,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
); );
core.drawLine(ctx7, 850, 390, 1250, 390, "#FFFFFF", 6); core.drawLine(ctx7, 850, 390, 1250, 390, "#FFFFFF", 6);
} }
ctx7.restore();
} }
moreShow(select) { moreShow(select) {
if (core.domStyle.isVertical) { if (core.domStyle.isVertical) {
@ -17894,6 +17897,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
}); });
} }
posy += 50; posy += 50;
core.setTextAlign(ctx8, "center")
core.fillBoldText1( core.fillBoldText1(
ctx8, ctx8,
"主角所造成的伤害将提升主角速度与怪物敌人速度值之比", "主角所造成的伤害将提升主角速度与怪物敌人速度值之比",
@ -18118,12 +18122,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
this.drawchoose(); this.drawchoose();
const skill = await getClick(); const skill = await getClick();
this.onchoose = false this.onchoose = false
core.clearMap(ctx7)
let select = this.boss; let select = this.boss;
if (this.selection !== "" && this.selection !== "boss") if (this.selection !== "" && this.selection !== "boss")
select = this.enemy[this.selection]; select = this.enemy[this.selection];
this.skill(skill, this.hero, select); this.skill(skill, this.hero, select);
core.clearMap(ctx7);
break; break;
case "boss": case "boss":
if (this.boss.hp > 0) { if (this.boss.hp > 0) {