0.2.9 • Published 3 years ago

@ailhc/enet-pinus-pb v0.2.9

Weekly downloads
16
License
MIT
Repository
github
Last release
3 years ago

@ailhc/enet-pinus-pb

基于enet.IProtoHandler的适用于Pinus或pomelo的前端协议处理器

特性

  1. typescript
  2. 支持pinus,pomelo

安装

  1. 通过npm安装
    npm i @ailhc/enet-pinus-pb  
  2. 本地link npm包

    a. clone 项目仓库

     git clone https://github.com/AILHC/EasyGameFrameworkOpen

    b. 在packages/enet-pinus-pb文件夹下

    ```bash
    npm link
    ```

    c. 在项目游戏项目目录下

    ```bash
    npm link @ailhc/enet-pinus-pb
    ```   
  3. 使用源码

    a. clone 项目仓库

    ```bash
    git clone https://github.com/AILHC/EasyGameFrameworkOpen
    ```

    b. 直接复制packages/enet-pinus-pb/src下的ts源码到项目文件夹下使用(排除index.ts)

Demo

案例可见examples/pinus-enet-chat

使用

//注入NetNode,具体使用可见examples/egf-net-ws/egf-ccc-net-ws/assets/testcases/protobuf-test
const netMgr = new NetNode<string>();
const protoHandler = new PinusProtoHandler();
netMgr.init({
    protoHandler: protoHandler
})

CHANGELOG

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.2.2

3 years ago

0.0.1

3 years ago