添加横屏页面

This commit is contained in:
2025-05-26 19:57:17 +08:00
parent 354194358b
commit 468f40351d
71 changed files with 11796 additions and 42067 deletions

View File

@@ -1,5 +1,6 @@
import { G_ShowScoreTips } from "../views/common/GUITips";
import { DOBlock } from "../models/DOBlock";
import { config } from "../constants/config";
const { regClass, property } = Laya;
@@ -59,12 +60,15 @@ export class Block extends Laya.Script {
}
public setBlockColor(color: string, alpha: number=1, animated: boolean=false, completedColor: string = "", completedAlpha: number=1): void {
var blockSize = 116
if (config.H_SCREEN)
blockSize = 96
this.owner.graphics.clear()
this.owner.graphics.drawRect(0, 0, 116, 116, color)
this.owner.graphics.drawRect(0, 0, blockSize, blockSize, color)
if (animated) {
Laya.Tween.to(this.owner, {alpha:alpha}, 500, Laya.Ease.elasticOut, Laya.Handler.create(this, () => {
this.owner.graphics.clear()
this.owner.graphics.drawRect(0, 0, 116, 116, completedColor)
this.owner.graphics.drawRect(0, 0, blockSize, blockSize, completedColor)
this.owner.alpha = completedAlpha
}))
}
@@ -92,11 +96,14 @@ export class Block extends Laya.Script {
}
public setTipsBgColor(visible: boolean, noteNumber: number=0, color: string="", alpha: number=1): void {
var blockSize = 38
if (config.H_SCREEN)
blockSize = 30
if (visible) {
var obj = this.tips_bgs[noteNumber-1]
obj.visible = true
obj.graphics.clear()
obj.graphics.drawRect(0, 0, 38, 38, color)
obj.graphics.drawRect(0, 0, blockSize, blockSize, color)
obj.alpha = alpha
}
else {