Code Monkey home page Code Monkey logo

kbengine_typescript_plugin's Introduction

kbengine_typescript_plugin

for kst
用于在cocos creator平台对接kst版本kbe的typescript插件,已经实际用于微信小游戏开发并有上线项目。
kbe服务器引擎:https://github.com/imgamer/kbengine.git 其中develop1.x为最新分支。

使用方法说明

1. 插件部署

  1. 把插件代码置于项目的assets目录:assets/kbengine_typescript_plugin
  2. 项目代码目录为assets/scripts

2. 定义entity

  1. 项目的 entity 定义在assets/scripts/kbengine目录中
  2. entity需继承于assets/kbengine_typescript_plugin/kbengine/Entity
  3. 重要:必须在entity定义后注册脚本。例如:Account.RegisterScript(Account.SCRIPT_NAME, Account);请参考assets/kbengine_typescript_plugin/entities的范例。

3. kbe插件初始化

  1. 在cocos creator场景创建空节点KBEMain,添加组件assets/kbengine_typescript_plugin/ClientApp.ts
  2. 配置KBEMain节点的kbe参数,详细参数说明请查看ClientApp.ts
  3. KBEMain.instance.run()初始化kbe
  4. KBEMain.instance.Login(account, password, userData)登录kbe服务器。

4. 参考项目

https://github.com/imgamer/wechat_game_demo.git

kbengine_typescript_plugin's People

Contributors

imgamer 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.