mirror of
https://github.com/Gongxh0901/kunpolibrary
synced 2025-05-14 22:34:21 +00:00
兼容creator3.7+版本支持
This commit is contained in:
parent
351c806d1b
commit
17d3cc968e
@ -16,3 +16,5 @@
|
||||
- 修复热更新manifest文件cdn缓存导致检测不到更新的问题
|
||||
## 1.0.33
|
||||
- UI模块添加fgui控制器和动画装饰器,详情见 [UI模块](./docs/UI.md)
|
||||
## 1.0.34
|
||||
- 兼容性修改,兼容creator3.7及之后的版本
|
||||
|
10
README.md
10
README.md
@ -1,7 +1,13 @@
|
||||
# KunpoLib
|
||||
基于 Cocos Creator 3.0+ 的一套游戏框架,提供了一系列实用模块,帮助开发者快速构建高质量的游戏项目。
|
||||
基于 Cocos Creator 的一套游戏框架,提供了一系列实用模块,帮助开发者快速构建高质量的游戏项目。
|
||||
项目持续优化中,敬请期待~~~
|
||||
|
||||
|
||||
#### 版本支持
|
||||
- creator 3.7之前的版本理论上也支持,未测试
|
||||
- creator 3.7+ 支持
|
||||
- creator 3.8+ 支持
|
||||
|
||||
> 此项目是框架源码,不是creator项目
|
||||
>
|
||||
> demo见最下方仓库地址
|
||||
@ -66,7 +72,7 @@ gongxh
|
||||
* 邮箱: gong.xinhai@163.com
|
||||
|
||||
## 仓库
|
||||
[kunpocc gitree地址](https://gitee.com/gongxinhai/kunpolibrary)
|
||||
[kunpocc gitee地址](https://gitee.com/gongxinhai/kunpolibrary)
|
||||
|
||||
[kunpocc github地址](https://github.com/Gongxh0901/kunpolibrary)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kunpocc",
|
||||
"version": "1.0.33",
|
||||
"version": "1.0.34",
|
||||
"description": "基于creator3.0+的kunpocc库",
|
||||
"main": "./dist/kunpocc.cjs",
|
||||
"module": "./dist/kunpocc.mjs",
|
||||
|
@ -32,7 +32,7 @@ export class AssetPool {
|
||||
this.add(item, bundle, batchName);
|
||||
}
|
||||
} else {
|
||||
let uuid = asset.uuid;
|
||||
let uuid = asset.uuid || asset._uuid;
|
||||
if (this._uuidToName.has(uuid)) {
|
||||
return;
|
||||
}
|
||||
|
@ -38,17 +38,22 @@ export class CocosAdapter extends Adapter {
|
||||
* @internal
|
||||
*/
|
||||
protected registerResizeCallback(callback: (...args: any) => void): void {
|
||||
ccScreen.on("window-resize", (...args: any) => {
|
||||
debug("window-resize");
|
||||
callback(...args);
|
||||
}, this);
|
||||
ccScreen.on("orientation-change", (...args: any) => {
|
||||
debug("orientation-change");
|
||||
callback(...args);
|
||||
}, this);
|
||||
ccScreen.on("fullscreen-change", (...args: any) => {
|
||||
debug("fullscreen-change");
|
||||
callback(...args);
|
||||
}, this);
|
||||
if (ccScreen && ccScreen.on) {
|
||||
ccScreen.on("window-resize", (...args: any) => {
|
||||
debug("window-resize");
|
||||
callback(...args);
|
||||
}, this);
|
||||
ccScreen.on("orientation-change", (...args: any) => {
|
||||
debug("orientation-change");
|
||||
callback(...args);
|
||||
}, this);
|
||||
ccScreen.on("fullscreen-change", (...args: any) => {
|
||||
debug("fullscreen-change");
|
||||
callback(...args);
|
||||
}, this);
|
||||
} else {
|
||||
// 3.8.0之前的版本
|
||||
view.setResizeCallback(callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,10 +3,11 @@
|
||||
* @Date: 2024-12-07
|
||||
* @Description: cocos UI模块
|
||||
*/
|
||||
import { _decorator, debug } from "cc";
|
||||
import { _decorator } from "cc";
|
||||
|
||||
import { GRoot } from "fairygui-cc";
|
||||
import { ModuleBase } from "../module/ModuleBase";
|
||||
import { debug } from "../tool/log";
|
||||
import { WindowManager } from "../ui/WindowManager";
|
||||
import { WindowResPool } from "../ui/WindowResPool";
|
||||
import { CocosWindowContainer } from "./CocosWindowContainer";
|
||||
|
Loading…
x
Reference in New Issue
Block a user