Skip to content

Commit

Permalink
实体新增getAllComponents方法
Browse files Browse the repository at this point in the history
  • Loading branch information
esengine committed May 9, 2023
1 parent 487eec4 commit f83d016
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 51 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-release-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,11 @@ jobs:
asset_name: bin.zip
asset_content_type: application/zip
upload_url: ${{ steps.create_release.outputs.upload_url }}
- name: Install dependencies
run: npm ci
- name: Update package version
run: npm version ${{ steps.increment_version.outputs.tag }} --no-git-tag-version
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions source/bin/gs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ declare module gs {
* @returns
*/
getComponent<T extends Component>(componentType: new (entityId: number) => T): T | null;
/**
* 获取所有组件
* @returns
*/
getAllComponents(): Component[];
/**
* 移除组件
* @param componentType
Expand Down
Loading

0 comments on commit f83d016

Please sign in to comment.