Giter VIP home page Giter VIP logo

ccc-tnt-framework's Introduction

CocosCreator 3.x 游戏开发框架

介绍

TNT 是基于 Cocos Creator 3.x 的游戏框架。

使用本框架可以不再深度依赖编辑器,不需要在编辑器中挂载脚本到节点(多语言还是需要的),在运行时会自动挂载脚本到节点。
这样做的优势在于可控性高,团队协作方便。
框架所有管理者单例和大部分类都挂载到了全局变量 tnt 上。
游戏启动需要有一个启动类和启动场景,将启动类挂载到启动场景中,在后续使用过程中,基本不再需要手动在节点挂载组件了。

安装

方式一 (推荐)

通过 Cocos Store 下载 TNT 插件安装

方式二

通过 仓库 Release 直接下载解压

启动

框架启动需要实现 IStartupOptions
详细的使用可以启动实例 Launcher.scene 查看,脚本同名。


// 框架初始化
tnt.startup(startupOptions);

本框架作为单独的 Bundle 使用,Bundle 名为 framework
Releases 中发布的 tnt.zip 已内置 preload-tnt.js 脚本,作用是在引擎加载阶段加载 framework Bundle
为保证在编辑器内优先加载框架代码,这里名为 framework 的 Bundle 使用了 a-framework 作为文件夹名,开发过程中其他 Bundle 尽量保证在框架 Bundle 后加载

从本仓库获取到的插件请在插件目录 ./extensions/{插件} 下执行 npm install 进行安装所需要的包

文档目录

在线示例

https://onvia.gitlab.io/ccc-demo/tnt-example/

感谢

Preview 插件@卡西法 提供
psd2ui 插件 Mac 版@bophie 提供部分支持

QQ群

  • 858173205

参考

MVVM

https://forum.cocos.org/t/topic/78821
https://github.com/wsssheep/cocos_creator_mvvm_tools
https://github.com/vuejs/core.git
https://github.com/sl1673495/typescript-proxy-reactive.git

其他

https://github.com/AILHC/EasyGameFrameworkOpen
https://blog.csdn.net/xzben/article/details/120039818
https://github.com/1226085293/nodes/blob/master/assets/essential/engine/node/nodes.js
https://github.com/fairygui/FairyGUI-cocoscreator/blob/master/source/src/fairygui/GObject.ts
https://github.com/fairygui/FairyGUI-cocoscreator/blob/master/source/src/fairygui/DragDropManager.ts
https://github.com/mapeditor/tiled

ccc-tnt-framework's People

Contributors

onvia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.