mirror of
https://github.com/Gongxh0901/kunpolibrary
synced 2025-04-04 10:41:04 +00:00
754 B
754 B
项目配置
-
新建项目,创建首场景文件
-
编写入口脚本
import { _decorator } from "cc"; /** 引入kunpocc入口 */ import { CocosEntry, log } from "kunpocc"; const { ccclass, property, menu } = _decorator; @ccclass("GameEntry") @menu("kunpo/GameEntry") export class GameEntry extends CocosEntry { @property(cc.Node) private root: cc.Node = null; onInit(): void { log("GameEntry onInit"); } }
-
创建入口节点
GameEntry
,创建UI模块节点UI
、UI容器节点window
, 并关联对应的脚本 -
配置完毕