SDK相关的整理

This commit is contained in:
chen wei bo
2025-09-26 17:34:07 +08:00
parent ed525d9ed2
commit 361afaacf2
40 changed files with 713 additions and 4379 deletions
@@ -6,6 +6,11 @@ import { sys } from "cc";
*/
export class PlatformHelper {
/** 是否Luffa平台 */
public static isLuffa(): boolean {
return sys.platform === sys.Platform.WECHAT_GAME && typeof window["wx"] !== "undefined";
}
/** 是否微信小游戏 */
public static isWechat(): boolean {
return sys.platform === sys.Platform.WECHAT_GAME && typeof window["wx"] !== "undefined";
@@ -73,6 +78,7 @@ export class PlatformHelper {
/** 获取当前平台名称(调试用) */
public static getPlatformName(): string {
if (this.isLuffa()) return "Luffa平台";
if (this.isWechat()) return "微信小游戏";
if (this.isByteDance()) return "字节跳动小游戏";
if (this.isKuaishou()) return "快手小游戏";