GithubHelp home page GithubHelp logo

y3-lua-types's Introduction

代码主要由工具生成, 目前我对y3还不熟悉,暂时不会手动维护,如果可以,你可以PR

目前因为工具那边注释生成还未解决完成,暂时不支持注解生成=-=,后续如果解决了,在更新

TS的开发模板,模板中附带的测试代码

已知问题:

  1. 因为工具在转换时一些信息丢失了,我无法知道方法是静态还是成员的,导致一些静态方法调用时转换为lua会出问题
  • 如: y3.unit.create_unit

v0.1.4 更新

  1. y3.game.event进行了处理,现在会扫描event.luaeventconfig.lua 生成ts的声明文件,获得更好的智能提示,效果如下, 感谢@西索酱的PR给我的提示

Z{_NQD%@QP71}$7 YPW@33 FK9Q NT)GB{H}BAVUVSMSGL

手动扩展方式需要写2个必须定义和1个可选定义:

  1. GameEventDeclarations 接口,写事件的定义
    • 结构为: 事件名 : 事件回调参数类型 | GameEventCallbackParamsDeclarations["name]
  1. GameEventParamsDeclarations 接口, 写事件的参数定义
    • 结构的固定格式: 事件名 : (...事件参数列表, act:Action1<Trigger, GameEventDeclarations['事件名']>)->void;
  1. [可选]GameEventCallbackParamsDeclarations 接口, 写事件的回调参数定义,就是事件触发后的action中的参数
    • 结构为: 名字 : 类型定义

y3-lua-types's People

Contributors

yika-aixi avatar cabinikaros avatar takegine 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.