From f229ce7fa0fc5c6a51407cfdb95bcc625e7b34c7 Mon Sep 17 00:00:00 2001 From: yangwen Date: Wed, 14 May 2025 19:22:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E8=84=9A=E6=9C=AC=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Entry.ts | 4 ++-- src/{types => models}/DOBlock.ts | 3 +-- src/{types => models}/DOBlock.ts.meta | 0 src/{types => models}/DOCandy.ts | 2 +- src/{types => models}/DOCandy.ts.meta | 0 src/{types => models}/DOStage.ts | 2 +- src/{types => models}/DOStage.ts.meta | 0 src/models/StorageManager.ts | 2 +- src/{types => views}/Block.ts | 2 +- src/{types => views}/Block.ts.meta | 0 src/{types => views}/Candy.ts | 2 +- src/{types => views}/Candy.ts.meta | 0 12 files changed, 8 insertions(+), 9 deletions(-) rename src/{types => models}/DOBlock.ts (97%) rename src/{types => models}/DOBlock.ts.meta (100%) rename src/{types => models}/DOCandy.ts (90%) rename src/{types => models}/DOCandy.ts.meta (100%) rename src/{types => models}/DOStage.ts (98%) rename src/{types => models}/DOStage.ts.meta (100%) rename src/{types => views}/Block.ts (98%) rename src/{types => views}/Block.ts.meta (100%) rename src/{types => views}/Candy.ts (96%) rename src/{types => views}/Candy.ts.meta (100%) diff --git a/src/Entry.ts b/src/Entry.ts index 25cfee2..d660727 100644 --- a/src/Entry.ts +++ b/src/Entry.ts @@ -16,9 +16,9 @@ Laya.addBeforeInitCallback((stageConfig) => { export async function main() { console.log("entry") - const { breakpoint } = config + const { BREAK_POINT } = config // 加载场景并打开场景 - if (window.innerWidth / window.innerHeight <= breakpoint) { + if (window.innerWidth / window.innerHeight <= BREAK_POINT) { Laya.Scene.open("Scene.ls") } else { diff --git a/src/types/DOBlock.ts b/src/models/DOBlock.ts similarity index 97% rename from src/types/DOBlock.ts rename to src/models/DOBlock.ts index 373809c..931be75 100644 --- a/src/types/DOBlock.ts +++ b/src/models/DOBlock.ts @@ -1,7 +1,6 @@ -import { StorageManager } from "../models/StorageManager" - +import { StorageManager } from "./StorageManager" export class DOBlock { diff --git a/src/types/DOBlock.ts.meta b/src/models/DOBlock.ts.meta similarity index 100% rename from src/types/DOBlock.ts.meta rename to src/models/DOBlock.ts.meta diff --git a/src/types/DOCandy.ts b/src/models/DOCandy.ts similarity index 90% rename from src/types/DOCandy.ts rename to src/models/DOCandy.ts index 8f5bba0..c4521fc 100644 --- a/src/types/DOCandy.ts +++ b/src/models/DOCandy.ts @@ -1,6 +1,6 @@ -import { StorageManager } from "../models/StorageManager" +import { StorageManager } from "./StorageManager" export class DOCandy { diff --git a/src/types/DOCandy.ts.meta b/src/models/DOCandy.ts.meta similarity index 100% rename from src/types/DOCandy.ts.meta rename to src/models/DOCandy.ts.meta diff --git a/src/types/DOStage.ts b/src/models/DOStage.ts similarity index 98% rename from src/types/DOStage.ts rename to src/models/DOStage.ts index d56bf67..25600a2 100644 --- a/src/types/DOStage.ts +++ b/src/models/DOStage.ts @@ -1,6 +1,6 @@ -import { StorageManager } from "../models/StorageManager" +import { StorageManager } from "./StorageManager" import { DOBlock } from "./DOBlock" import { DOCandy } from "./DOCandy" diff --git a/src/types/DOStage.ts.meta b/src/models/DOStage.ts.meta similarity index 100% rename from src/types/DOStage.ts.meta rename to src/models/DOStage.ts.meta diff --git a/src/models/StorageManager.ts b/src/models/StorageManager.ts index c892bc2..b5ae8ef 100644 --- a/src/models/StorageManager.ts +++ b/src/models/StorageManager.ts @@ -1,5 +1,5 @@ import { config } from "../constants/config" -import { DOStage } from "../types/DOStage" +import { DOStage } from "./DOStage" export class StorageManager { diff --git a/src/types/Block.ts b/src/views/Block.ts similarity index 98% rename from src/types/Block.ts rename to src/views/Block.ts index 84992a9..c35dd5c 100644 --- a/src/types/Block.ts +++ b/src/views/Block.ts @@ -1,5 +1,5 @@ import { G_ShowScoreTips } from "../views/GUITips"; -import { DOBlock } from "./DOBlock"; +import { DOBlock } from "../models/DOBlock"; const { regClass, property } = Laya; diff --git a/src/types/Block.ts.meta b/src/views/Block.ts.meta similarity index 100% rename from src/types/Block.ts.meta rename to src/views/Block.ts.meta diff --git a/src/types/Candy.ts b/src/views/Candy.ts similarity index 96% rename from src/types/Candy.ts rename to src/views/Candy.ts index 69a53c8..c1f105d 100644 --- a/src/types/Candy.ts +++ b/src/views/Candy.ts @@ -1,4 +1,4 @@ -import { DOCandy } from "./DOCandy"; +import { DOCandy } from "../models/DOCandy"; const { regClass, property } = Laya; diff --git a/src/types/Candy.ts.meta b/src/views/Candy.ts.meta similarity index 100% rename from src/types/Candy.ts.meta rename to src/views/Candy.ts.meta