From 451f4317770394b63388c48fe698d3d186f69e67 Mon Sep 17 00:00:00 2001
From: lujun <495904500@qq.com>
Date: Thu, 9 Feb 2023 17:25:08 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B02.4.11=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
2.4.11/.gitignore | 53 +
2.4.11/assets/lcc-ui-sorting-group.meta | 13 +
.../lcc-ui-sorting-group/engine-extend.meta | 13 +
.../engine-extend/node.ts | 111 +
.../engine-extend/node.ts.meta | 10 +
.../engine-extend/render-component.ts | 10 +
.../engine-extend/render-component.ts.meta | 10 +
.../engine-extend/render-flow.ts | 153 +
.../engine-extend/render-flow.ts.meta | 10 +
.../engine-extend/trans-pool.meta | 13 +
.../engine-extend/trans-pool/index.js | 35 +-
.../engine-extend/trans-pool/index.js.meta | 10 +
.../engine-extend/trans-pool/mem-pool.js | 109 +
.../engine-extend/trans-pool/mem-pool.js.meta | 10 +
.../engine-extend/trans-pool/node-mem-pool.js | 68 +-
.../trans-pool/node-mem-pool.js.meta | 10 +
.../engine-extend/trans-pool/node-unit.js | 158 +
.../trans-pool/node-unit.js.meta | 10 +
.../engine-extend/trans-pool/unit-base.js | 167 +
.../trans-pool/unit-base.js.meta | 10 +
.../lcc-ui-sorting-group/sorting-define.ts | 0
.../sorting-define.ts.meta | 10 +
.../lcc-ui-sorting-group/sorting-group.ts | 55 +
.../sorting-group.ts.meta | 10 +
2.4.11/assets/test.meta | 13 +
2.4.11/assets/test/prefabs.meta | 13 +
.../test/prefabs/ListTestItem-sorting.prefab | 1322 +
.../prefabs/ListTestItem-sorting.prefab.meta | 9 +
.../assets/test/prefabs/ListTestItem.prefab | 1172 +
.../test/prefabs/ListTestItem.prefab.meta | 9 +
2.4.11/assets/test/scenes.meta | 13 +
.../test/scenes/test-scene-sorting.fire | 1124 +
.../test/scenes/test-scene-sorting.fire.meta | 8 +
2.4.11/assets/test/scenes/test-scene.fire | 1124 +
.../assets/test/scenes/test-scene.fire.meta | 8 +
2.4.11/assets/test/scripts.meta | 13 +
2.4.11/assets/test/scripts/list-test-item.ts | 43 +
.../test/scripts/list-test-item.ts.meta | 10 +
2.4.11/assets/test/scripts/test-scene.ts | 28 +
2.4.11/assets/test/scripts/test-scene.ts.meta | 10 +
2.4.11/assets/test/textures.meta | 13 +
2.4.11/assets/test/textures/AutoAtlas.pac | 3 +
.../assets/test/textures/AutoAtlas.pac.meta | 23 +
.../assets}/test/textures/box-1.png | Bin
2.4.11/assets/test/textures/box-1.png.meta | 38 +
.../assets}/test/textures/box-2.png | Bin
2.4.11/assets/test/textures/box-2.png.meta | 38 +
.../assets}/test/textures/box-3.png | Bin
2.4.11/assets/test/textures/box-3.png.meta | 38 +
.../assets}/test/textures/box-4.png | Bin
2.4.11/assets/test/textures/box-4.png.meta | 38 +
.../assets}/test/textures/box-5.png | Bin
2.4.11/assets/test/textures/box-5.png.meta | 38 +
.../assets}/test/textures/box-6.png | Bin
2.4.11/assets/test/textures/box-6.png.meta | 38 +
.../assets}/test/textures/box-7.png | Bin
2.4.11/assets/test/textures/box-7.png.meta | 38 +
.../assets}/test/textures/box-8.png | Bin
2.4.11/assets/test/textures/box-8.png.meta | 38 +
.../assets}/test/textures/box-9.png | Bin
2.4.11/assets/test/textures/box-9.png.meta | 38 +
.../assets}/test/textures/btn-black.png | Bin
.../assets/test/textures/btn-black.png.meta | 38 +
.../assets}/test/textures/btn-white-2.png | Bin
.../assets/test/textures/btn-white-2.png.meta | 38 +
.../assets}/test/textures/btn-white.png | Bin
.../assets/test/textures/btn-white.png.meta | 38 +
.../test/textures/circle-countdown.png | Bin
.../test/textures/circle-countdown.png.meta | 38 +
.../test/textures/flag-disconnection.png | Bin
.../test/textures/flag-disconnection.png.meta | 38 +
.../assets}/test/textures/flag-eliminated.png | Bin
.../test/textures/flag-eliminated.png.meta | 38 +
.../assets}/test/textures/flag-escape.png | Bin
.../assets/test/textures/flag-escape.png.meta | 38 +
.../assets}/test/textures/gold.png | Bin
2.4.11/assets/test/textures/gold.png.meta | 38 +
2.4.11/creator.d.ts | 32207 ++++++++++++++++
2.4.11/jsconfig.json | 15 +
.../cocos/renderer/scene/ModelBatcher.cpp | 397 +
.../cocos/renderer/scene/ModelBatcher.hpp | 178 +
.../cocos/renderer/scene/NodeMemPool.cpp | 196 +
.../cocos/renderer/scene/NodeMemPool.hpp | 217 +
.../cocos/renderer/scene/NodeProxy.cpp | 633 +
.../cocos/renderer/scene/NodeProxy.hpp | 379 +
.../cocos/renderer/scene/RenderFlow.cpp | 381 +
.../cocos/renderer/scene/RenderFlow.hpp | 180 +
.../scene/assembler/AssemblerBase.cpp | 69 +
.../scene/assembler/AssemblerBase.hpp | 193 +
.../scene/assembler/MaskAssembler.cpp | 92 +
.../scene/assembler/MaskAssembler.hpp | 62 +
.../js-bindings/auto/jsb_renderer_auto.cpp | 4767 +++
2.4.11/lcc-ui-sorting-group-native/readme.txt | 1 +
2.4.11/project.json | 8 +
2.4.11/settings/builder.json | 55 +
2.4.11/settings/project.json | 37 +
2.4.11/settings/services.json | 6 +
2.4.11/tsconfig.json | 19 +
.gitignore => 3.6.3/.gitignore | 0
LICENSE => 3.6.3/LICENSE | 42 +-
.../assets}/lcc-ui-sorting-group.meta | 0
.../lcc-ui-sorting-group/engine-extend.meta | 0
.../engine-extend/node.jsb.ts | 0
.../engine-extend/node.jsb.ts.meta | 0
.../engine-extend/ui-renderer.ts | 0
.../engine-extend/ui-renderer.ts.meta | 0
.../engine-extend/ui-transform.ts | 0
.../engine-extend/ui-transform.ts.meta | 0
.../lcc-ui-sorting-group/engine-extend/ui.ts | 0
.../engine-extend/ui.ts.meta | 0
.../lcc-ui-sorting-group/sorting-define.ts | 23 +
.../sorting-define.ts.meta | 0
.../lcc-ui-sorting-group/sorting-group.ts | 0
.../sorting-group.ts.meta | 0
{assets => 3.6.3/assets}/test.meta | 0
{assets => 3.6.3/assets}/test/prefabs.meta | 0
.../test/prefabs/ListTestItem-sorting.prefab | 0
.../prefabs/ListTestItem-sorting.prefab.meta | 0
.../assets}/test/prefabs/ListTestItem.prefab | 0
.../test/prefabs/ListTestItem.prefab.meta | 0
{assets => 3.6.3/assets}/test/scenes.meta | 0
.../test/scenes/test-scene-sorting.scene | 0
.../test/scenes/test-scene-sorting.scene.meta | 0
.../assets}/test/scenes/test-scene.scene | 0
.../assets}/test/scenes/test-scene.scene.meta | 0
{assets => 3.6.3/assets}/test/scripts.meta | 0
.../assets}/test/scripts/list-test-item.ts | 0
.../test/scripts/list-test-item.ts.meta | 0
.../assets}/test/scripts/test-scene.ts | 0
.../assets}/test/scripts/test-scene.ts.meta | 0
{assets => 3.6.3/assets}/test/textures.meta | 0
.../assets}/test/textures/auto-atlas.pac | 0
.../assets}/test/textures/auto-atlas.pac.meta | 0
3.6.3/assets/test/textures/box-1.png | Bin 0 -> 1130 bytes
.../assets}/test/textures/box-1.png.meta | 0
3.6.3/assets/test/textures/box-2.png | Bin 0 -> 873 bytes
.../assets}/test/textures/box-2.png.meta | 0
3.6.3/assets/test/textures/box-3.png | Bin 0 -> 451 bytes
.../assets}/test/textures/box-3.png.meta | 0
3.6.3/assets/test/textures/box-4.png | Bin 0 -> 1109 bytes
.../assets}/test/textures/box-4.png.meta | 0
3.6.3/assets/test/textures/box-5.png | Bin 0 -> 952 bytes
.../assets}/test/textures/box-5.png.meta | 0
3.6.3/assets/test/textures/box-6.png | Bin 0 -> 200 bytes
.../assets}/test/textures/box-6.png.meta | 0
3.6.3/assets/test/textures/box-7.png | Bin 0 -> 105 bytes
.../assets}/test/textures/box-7.png.meta | 0
3.6.3/assets/test/textures/box-8.png | Bin 0 -> 119 bytes
.../assets}/test/textures/box-8.png.meta | 0
3.6.3/assets/test/textures/box-9.png | Bin 0 -> 153 bytes
.../assets}/test/textures/box-9.png.meta | 0
3.6.3/assets/test/textures/btn-black.png | Bin 0 -> 569 bytes
.../assets}/test/textures/btn-black.png.meta | 0
3.6.3/assets/test/textures/btn-white-2.png | Bin 0 -> 838 bytes
.../test/textures/btn-white-2.png.meta | 0
3.6.3/assets/test/textures/btn-white.png | Bin 0 -> 809 bytes
.../assets}/test/textures/btn-white.png.meta | 0
.../assets/test/textures/circle-countdown.png | Bin 0 -> 13678 bytes
.../test/textures/circle-countdown.png.meta | 0
.../test/textures/flag-disconnection.png | Bin 0 -> 2207 bytes
.../test/textures/flag-disconnection.png.meta | 0
.../assets/test/textures/flag-eliminated.png | Bin 0 -> 2453 bytes
.../test/textures/flag-eliminated.png.meta | 0
3.6.3/assets/test/textures/flag-escape.png | Bin 0 -> 2375 bytes
.../test/textures/flag-escape.png.meta | 0
3.6.3/assets/test/textures/gold.png | Bin 0 -> 3403 bytes
.../assets}/test/textures/gold.png.meta | 0
package.json => 3.6.3/package.json | 0
.../settings}/v2/packages/cocos-service.json | 0
.../settings}/v2/packages/project.json | 0
tsconfig.json => 3.6.3/tsconfig.json | 0
docs/images/QQ截图20230205173234.png | Bin 4754 -> 0 bytes
docs/images/QQ截图20230205173334.png | Bin 9364 -> 0 bytes
docs/images/QQ截图20230205190757.png | Bin 6637 -> 0 bytes
docs/images/Screenshot_20230205_172320.jpg | Bin 300821 -> 0 bytes
docs/images/Screenshot_20230205_172414.jpg | Bin 303306 -> 0 bytes
docs/images/Screenshot_20230207_103431.jpg | Bin 404714 -> 0 bytes
docs/images/Screenshot_20230207_103552.jpg | Bin 401898 -> 0 bytes
native/engine/android/CMakeLists.txt | 15 -
native/engine/android/Post-service.cmake | 1 -
native/engine/android/Pre-service.cmake | 1 -
native/engine/android/app/AndroidManifest.xml | 43 -
native/engine/android/app/build.gradle | 104 -
native/engine/android/app/proguard-rules.pro | 42 -
.../app/src/com/cocos/game/AppActivity.java | 125 -
native/engine/android/build-cfg.json | 8 -
native/engine/android/build.gradle | 31 -
.../android/instantapp/AndroidManifest.xml | 53 -
native/engine/android/instantapp/build.gradle | 101 -
.../android/instantapp/proguard-rules.pro | 42 -
.../src/com/cocos/game/InstantActivity.java | 125 -
.../android/res/mipmap-hdpi/ic_launcher.png | Bin 6780 -> 0 bytes
.../android/res/mipmap-mdpi/ic_launcher.png | Bin 3964 -> 0 bytes
.../android/res/mipmap-xhdpi/ic_launcher.png | Bin 9915 -> 0 bytes
.../android/res/mipmap-xxhdpi/ic_launcher.png | Bin 16236 -> 0 bytes
.../res/mipmap-xxxhdpi/ic_launcher.png | Bin 23478 -> 0 bytes
native/engine/android/res/values/strings.xml | 3 -
native/engine/common/CMakeLists.txt | 54 -
native/engine/common/cocos-version.json | 1 -
native/engine/common/localCfg.cmake | 3 -
.../CMakeLists.txt | 36 -
.../backup/CMakeLists.txt | 3189 --
.../native/cocos/2d/renderer/Batcher2d.cpp | 660 -
.../native/cocos/2d/renderer/Batcher2d.h | 208 -
.../native/cocos/2d/renderer/RenderEntity.cpp | 116 -
.../native/cocos/2d/renderer/RenderEntity.h | 164 -
.../native/cocos/core/scene-graph/Node.cpp | 984 -
.../native/cocos/core/scene-graph/Node.h | 861 -
.../lcc-ui-sorting-group-native/readme.txt | 7 -
readme.md | 59 +-
210 files changed, 46766 insertions(+), 7089 deletions(-)
create mode 100644 2.4.11/.gitignore
create mode 100644 2.4.11/assets/lcc-ui-sorting-group.meta
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend.meta
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/node.ts
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/node.ts.meta
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-component.ts
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-component.ts.meta
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-flow.ts
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-flow.ts.meta
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool.meta
rename native/engine/common/Classes/Game.h => 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/index.js (64%)
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/index.js.meta
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/mem-pool.js
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/mem-pool.js.meta
rename native/engine/common/Classes/Game.cpp => 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-mem-pool.js (52%)
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-mem-pool.js.meta
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-unit.js
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-unit.js.meta
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/unit-base.js
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/unit-base.js.meta
rename {assets => 2.4.11/assets}/lcc-ui-sorting-group/sorting-define.ts (100%)
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/sorting-define.ts.meta
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/sorting-group.ts
create mode 100644 2.4.11/assets/lcc-ui-sorting-group/sorting-group.ts.meta
create mode 100644 2.4.11/assets/test.meta
create mode 100644 2.4.11/assets/test/prefabs.meta
create mode 100644 2.4.11/assets/test/prefabs/ListTestItem-sorting.prefab
create mode 100644 2.4.11/assets/test/prefabs/ListTestItem-sorting.prefab.meta
create mode 100644 2.4.11/assets/test/prefabs/ListTestItem.prefab
create mode 100644 2.4.11/assets/test/prefabs/ListTestItem.prefab.meta
create mode 100644 2.4.11/assets/test/scenes.meta
create mode 100644 2.4.11/assets/test/scenes/test-scene-sorting.fire
create mode 100644 2.4.11/assets/test/scenes/test-scene-sorting.fire.meta
create mode 100644 2.4.11/assets/test/scenes/test-scene.fire
create mode 100644 2.4.11/assets/test/scenes/test-scene.fire.meta
create mode 100644 2.4.11/assets/test/scripts.meta
create mode 100644 2.4.11/assets/test/scripts/list-test-item.ts
create mode 100644 2.4.11/assets/test/scripts/list-test-item.ts.meta
create mode 100644 2.4.11/assets/test/scripts/test-scene.ts
create mode 100644 2.4.11/assets/test/scripts/test-scene.ts.meta
create mode 100644 2.4.11/assets/test/textures.meta
create mode 100644 2.4.11/assets/test/textures/AutoAtlas.pac
create mode 100644 2.4.11/assets/test/textures/AutoAtlas.pac.meta
rename {assets => 2.4.11/assets}/test/textures/box-1.png (100%)
create mode 100644 2.4.11/assets/test/textures/box-1.png.meta
rename {assets => 2.4.11/assets}/test/textures/box-2.png (100%)
create mode 100644 2.4.11/assets/test/textures/box-2.png.meta
rename {assets => 2.4.11/assets}/test/textures/box-3.png (100%)
create mode 100644 2.4.11/assets/test/textures/box-3.png.meta
rename {assets => 2.4.11/assets}/test/textures/box-4.png (100%)
create mode 100644 2.4.11/assets/test/textures/box-4.png.meta
rename {assets => 2.4.11/assets}/test/textures/box-5.png (100%)
create mode 100644 2.4.11/assets/test/textures/box-5.png.meta
rename {assets => 2.4.11/assets}/test/textures/box-6.png (100%)
create mode 100644 2.4.11/assets/test/textures/box-6.png.meta
rename {assets => 2.4.11/assets}/test/textures/box-7.png (100%)
create mode 100644 2.4.11/assets/test/textures/box-7.png.meta
rename {assets => 2.4.11/assets}/test/textures/box-8.png (100%)
create mode 100644 2.4.11/assets/test/textures/box-8.png.meta
rename {assets => 2.4.11/assets}/test/textures/box-9.png (100%)
create mode 100644 2.4.11/assets/test/textures/box-9.png.meta
rename {assets => 2.4.11/assets}/test/textures/btn-black.png (100%)
create mode 100644 2.4.11/assets/test/textures/btn-black.png.meta
rename {assets => 2.4.11/assets}/test/textures/btn-white-2.png (100%)
create mode 100644 2.4.11/assets/test/textures/btn-white-2.png.meta
rename {assets => 2.4.11/assets}/test/textures/btn-white.png (100%)
create mode 100644 2.4.11/assets/test/textures/btn-white.png.meta
rename {assets => 2.4.11/assets}/test/textures/circle-countdown.png (100%)
create mode 100644 2.4.11/assets/test/textures/circle-countdown.png.meta
rename {assets => 2.4.11/assets}/test/textures/flag-disconnection.png (100%)
create mode 100644 2.4.11/assets/test/textures/flag-disconnection.png.meta
rename {assets => 2.4.11/assets}/test/textures/flag-eliminated.png (100%)
create mode 100644 2.4.11/assets/test/textures/flag-eliminated.png.meta
rename {assets => 2.4.11/assets}/test/textures/flag-escape.png (100%)
create mode 100644 2.4.11/assets/test/textures/flag-escape.png.meta
rename {assets => 2.4.11/assets}/test/textures/gold.png (100%)
create mode 100644 2.4.11/assets/test/textures/gold.png.meta
create mode 100644 2.4.11/creator.d.ts
create mode 100644 2.4.11/jsconfig.json
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/ModelBatcher.cpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/ModelBatcher.hpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/NodeMemPool.cpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/NodeMemPool.hpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/NodeProxy.cpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/NodeProxy.hpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/RenderFlow.cpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/RenderFlow.hpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/assembler/AssemblerBase.cpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/assembler/AssemblerBase.hpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/assembler/MaskAssembler.cpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/assembler/MaskAssembler.hpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/scripting/js-bindings/auto/jsb_renderer_auto.cpp
create mode 100644 2.4.11/lcc-ui-sorting-group-native/readme.txt
create mode 100644 2.4.11/project.json
create mode 100644 2.4.11/settings/builder.json
create mode 100644 2.4.11/settings/project.json
create mode 100644 2.4.11/settings/services.json
create mode 100644 2.4.11/tsconfig.json
rename .gitignore => 3.6.3/.gitignore (100%)
rename LICENSE => 3.6.3/LICENSE (98%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group.meta (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/engine-extend.meta (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/engine-extend/node.jsb.ts (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/engine-extend/node.jsb.ts.meta (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/engine-extend/ui-renderer.ts (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/engine-extend/ui-renderer.ts.meta (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/engine-extend/ui-transform.ts (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/engine-extend/ui-transform.ts.meta (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/engine-extend/ui.ts (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/engine-extend/ui.ts.meta (100%)
create mode 100644 3.6.3/assets/lcc-ui-sorting-group/sorting-define.ts
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/sorting-define.ts.meta (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/sorting-group.ts (100%)
rename {assets => 3.6.3/assets}/lcc-ui-sorting-group/sorting-group.ts.meta (100%)
rename {assets => 3.6.3/assets}/test.meta (100%)
rename {assets => 3.6.3/assets}/test/prefabs.meta (100%)
rename {assets => 3.6.3/assets}/test/prefabs/ListTestItem-sorting.prefab (100%)
rename {assets => 3.6.3/assets}/test/prefabs/ListTestItem-sorting.prefab.meta (100%)
rename {assets => 3.6.3/assets}/test/prefabs/ListTestItem.prefab (100%)
rename {assets => 3.6.3/assets}/test/prefabs/ListTestItem.prefab.meta (100%)
rename {assets => 3.6.3/assets}/test/scenes.meta (100%)
rename {assets => 3.6.3/assets}/test/scenes/test-scene-sorting.scene (100%)
rename {assets => 3.6.3/assets}/test/scenes/test-scene-sorting.scene.meta (100%)
rename {assets => 3.6.3/assets}/test/scenes/test-scene.scene (100%)
rename {assets => 3.6.3/assets}/test/scenes/test-scene.scene.meta (100%)
rename {assets => 3.6.3/assets}/test/scripts.meta (100%)
rename {assets => 3.6.3/assets}/test/scripts/list-test-item.ts (100%)
rename {assets => 3.6.3/assets}/test/scripts/list-test-item.ts.meta (100%)
rename {assets => 3.6.3/assets}/test/scripts/test-scene.ts (100%)
rename {assets => 3.6.3/assets}/test/scripts/test-scene.ts.meta (100%)
rename {assets => 3.6.3/assets}/test/textures.meta (100%)
rename {assets => 3.6.3/assets}/test/textures/auto-atlas.pac (100%)
rename {assets => 3.6.3/assets}/test/textures/auto-atlas.pac.meta (100%)
create mode 100644 3.6.3/assets/test/textures/box-1.png
rename {assets => 3.6.3/assets}/test/textures/box-1.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/box-2.png
rename {assets => 3.6.3/assets}/test/textures/box-2.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/box-3.png
rename {assets => 3.6.3/assets}/test/textures/box-3.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/box-4.png
rename {assets => 3.6.3/assets}/test/textures/box-4.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/box-5.png
rename {assets => 3.6.3/assets}/test/textures/box-5.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/box-6.png
rename {assets => 3.6.3/assets}/test/textures/box-6.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/box-7.png
rename {assets => 3.6.3/assets}/test/textures/box-7.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/box-8.png
rename {assets => 3.6.3/assets}/test/textures/box-8.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/box-9.png
rename {assets => 3.6.3/assets}/test/textures/box-9.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/btn-black.png
rename {assets => 3.6.3/assets}/test/textures/btn-black.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/btn-white-2.png
rename {assets => 3.6.3/assets}/test/textures/btn-white-2.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/btn-white.png
rename {assets => 3.6.3/assets}/test/textures/btn-white.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/circle-countdown.png
rename {assets => 3.6.3/assets}/test/textures/circle-countdown.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/flag-disconnection.png
rename {assets => 3.6.3/assets}/test/textures/flag-disconnection.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/flag-eliminated.png
rename {assets => 3.6.3/assets}/test/textures/flag-eliminated.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/flag-escape.png
rename {assets => 3.6.3/assets}/test/textures/flag-escape.png.meta (100%)
create mode 100644 3.6.3/assets/test/textures/gold.png
rename {assets => 3.6.3/assets}/test/textures/gold.png.meta (100%)
rename package.json => 3.6.3/package.json (100%)
rename {settings => 3.6.3/settings}/v2/packages/cocos-service.json (100%)
rename {settings => 3.6.3/settings}/v2/packages/project.json (100%)
rename tsconfig.json => 3.6.3/tsconfig.json (100%)
delete mode 100644 docs/images/QQ截图20230205173234.png
delete mode 100644 docs/images/QQ截图20230205173334.png
delete mode 100644 docs/images/QQ截图20230205190757.png
delete mode 100644 docs/images/Screenshot_20230205_172320.jpg
delete mode 100644 docs/images/Screenshot_20230205_172414.jpg
delete mode 100644 docs/images/Screenshot_20230207_103431.jpg
delete mode 100644 docs/images/Screenshot_20230207_103552.jpg
delete mode 100644 native/engine/android/CMakeLists.txt
delete mode 100644 native/engine/android/Post-service.cmake
delete mode 100644 native/engine/android/Pre-service.cmake
delete mode 100644 native/engine/android/app/AndroidManifest.xml
delete mode 100644 native/engine/android/app/build.gradle
delete mode 100644 native/engine/android/app/proguard-rules.pro
delete mode 100644 native/engine/android/app/src/com/cocos/game/AppActivity.java
delete mode 100644 native/engine/android/build-cfg.json
delete mode 100644 native/engine/android/build.gradle
delete mode 100644 native/engine/android/instantapp/AndroidManifest.xml
delete mode 100644 native/engine/android/instantapp/build.gradle
delete mode 100644 native/engine/android/instantapp/proguard-rules.pro
delete mode 100644 native/engine/android/instantapp/src/com/cocos/game/InstantActivity.java
delete mode 100644 native/engine/android/res/mipmap-hdpi/ic_launcher.png
delete mode 100644 native/engine/android/res/mipmap-mdpi/ic_launcher.png
delete mode 100644 native/engine/android/res/mipmap-xhdpi/ic_launcher.png
delete mode 100644 native/engine/android/res/mipmap-xxhdpi/ic_launcher.png
delete mode 100644 native/engine/android/res/mipmap-xxxhdpi/ic_launcher.png
delete mode 100644 native/engine/android/res/values/strings.xml
delete mode 100644 native/engine/common/CMakeLists.txt
delete mode 100644 native/engine/common/cocos-version.json
delete mode 100644 native/engine/common/localCfg.cmake
delete mode 100644 native/engine/lcc-ui-sorting-group-native/CMakeLists.txt
delete mode 100644 native/engine/lcc-ui-sorting-group-native/backup/CMakeLists.txt
delete mode 100644 native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.cpp
delete mode 100644 native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/Batcher2d.h
delete mode 100644 native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.cpp
delete mode 100644 native/engine/lcc-ui-sorting-group-native/native/cocos/2d/renderer/RenderEntity.h
delete mode 100644 native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.cpp
delete mode 100644 native/engine/lcc-ui-sorting-group-native/native/cocos/core/scene-graph/Node.h
delete mode 100644 native/engine/lcc-ui-sorting-group-native/readme.txt
diff --git a/2.4.11/.gitignore b/2.4.11/.gitignore
new file mode 100644
index 0000000..93f1a91
--- /dev/null
+++ b/2.4.11/.gitignore
@@ -0,0 +1,53 @@
+#/////////////////////////////////////////////////////////////////////////////
+# Fireball Projects
+#/////////////////////////////////////////////////////////////////////////////
+
+/library/
+/temp/
+/local/
+/build/
+native
+#/////////////////////////////////////////////////////////////////////////////
+# npm files
+#/////////////////////////////////////////////////////////////////////////////
+
+npm-debug.log
+node_modules/
+
+#/////////////////////////////////////////////////////////////////////////////
+# Logs and databases
+#/////////////////////////////////////////////////////////////////////////////
+
+*.log
+*.sql
+*.sqlite
+
+#/////////////////////////////////////////////////////////////////////////////
+# files for debugger
+#/////////////////////////////////////////////////////////////////////////////
+
+*.sln
+*.csproj
+*.pidb
+*.unityproj
+*.suo
+
+#/////////////////////////////////////////////////////////////////////////////
+# OS generated files
+#/////////////////////////////////////////////////////////////////////////////
+
+.DS_Store
+ehthumbs.db
+Thumbs.db
+
+#/////////////////////////////////////////////////////////////////////////////
+# WebStorm files
+#/////////////////////////////////////////////////////////////////////////////
+
+.idea/
+
+#//////////////////////////
+# VS Code files
+#//////////////////////////
+
+.vscode/
diff --git a/2.4.11/assets/lcc-ui-sorting-group.meta b/2.4.11/assets/lcc-ui-sorting-group.meta
new file mode 100644
index 0000000..6d5b6fa
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group.meta
@@ -0,0 +1,13 @@
+{
+ "ver": "1.1.3",
+ "uuid": "67d51efb-7233-4c27-b96c-386cc3d5e810",
+ "importer": "folder",
+ "isBundle": false,
+ "bundleName": "",
+ "priority": 1,
+ "compressionType": {},
+ "optimizeHotUpdate": {},
+ "inlineSpriteFrames": {},
+ "isRemoteBundle": {},
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend.meta
new file mode 100644
index 0000000..4fccf44
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend.meta
@@ -0,0 +1,13 @@
+{
+ "ver": "1.1.3",
+ "uuid": "0998106b-40d7-467a-aa96-9eb7bc459a51",
+ "importer": "folder",
+ "isBundle": false,
+ "bundleName": "",
+ "priority": 1,
+ "compressionType": {},
+ "optimizeHotUpdate": {},
+ "inlineSpriteFrames": {},
+ "isRemoteBundle": {},
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/node.ts b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/node.ts
new file mode 100644
index 0000000..863d4e4
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/node.ts
@@ -0,0 +1,111 @@
+
+//@ts-ignore
+const nodeMemPool = require('./trans-pool/index').NodeMemPool
+
+declare module cc {
+ export interface Node {
+
+ /**
+ * 排序优先级 - private
+ */
+ _sortingPriority:number;
+
+ /**
+ * 排序优先级
+ */
+ sortingPriority:number;
+
+ /**
+ * 排序优使能 - private
+ */
+ _sortingEnabled:boolean;
+
+ /**
+ * 排序优使能
+ */
+ sortingEnabled:boolean;
+ }
+}
+
+if(!('sortingPriority' in cc.Node.prototype)){
+ Object.defineProperty(cc.Node.prototype, 'sortingPriority', {
+ get: function() {
+ return this._sortingPriority;
+ },
+ set: function(value) {
+ this._sortingPriority = value;
+ // console.log(`sortingPriority ${this.name} ${value}`);
+ if(CC_JSB){
+ this._sortingPriorityProxy[0] = value;
+ }
+ },
+ enumerable: true
+ });
+
+ Object.defineProperty(cc.Node.prototype, 'sortingEnabled', {
+ get: function() {
+ return this._sortingEnabled;
+ },
+ set: function(value) {
+ this._sortingEnabled = value;
+ // console.log(`sortingEnabled ${this.name} ${value}`);
+ if(CC_JSB){
+ this._sortingEnabledProxy[0] = value ? 1 : 0;
+ }
+ },
+ enumerable: true
+ });
+}
+
+if(CC_JSB){
+ //@ts-ignore
+ cc.Node.prototype._initDataFromPool = function(){
+ if (!this._spaceInfo) {
+ if (CC_EDITOR || CC_TEST) {
+ this._spaceInfo = {
+ trs: new Float64Array(10),
+ localMat: new Float64Array(16),
+ worldMat: new Float64Array(16),
+ };
+ } else {
+ this._spaceInfo = nodeMemPool.pop();
+ }
+ }
+
+ let spaceInfo = this._spaceInfo;
+ this._matrix = cc.mat4(spaceInfo.localMat);
+ cc.Mat4.identity(this._matrix);
+ this._worldMatrix = cc.mat4(spaceInfo.worldMat);
+ cc.Mat4.identity(this._worldMatrix);
+ this._localMatDirty = 0xffff;
+ this._worldMatDirty = true;
+ this._sortingPriorityProxy = spaceInfo.sortingPriority;
+ this._sortingEnabledProxy = spaceInfo.sortingEnabled;
+
+ let trs = this._trs = spaceInfo.trs;
+ trs[0] = 0; // position.x
+ trs[1] = 0; // position.y
+ trs[2] = 0; // position.z
+ trs[3] = 0; // rotation.x
+ trs[4] = 0; // rotation.y
+ trs[5] = 0; // rotation.z
+ trs[6] = 1; // rotation.w
+ trs[7] = 1; // scale.x
+ trs[8] = 1; // scale.y
+ trs[9] = 1; // scale.z
+ }
+
+ //@ts-ignore
+ cc.Node.prototype._backDataIntoPool = function() {
+ if (!(CC_EDITOR || CC_TEST)) {
+ // push back to pool
+ nodeMemPool.push(this._spaceInfo);
+ this._sortingPriorityProxy = null;
+ this._sortingEnabledProxy = null;
+ this._matrix = null;
+ this._worldMatrix = null;
+ this._trs = null;
+ this._spaceInfo = null;
+ }
+ }
+}
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/node.ts.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/node.ts.meta
new file mode 100644
index 0000000..50c881b
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/node.ts.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "f0c38288-db93-4468-ab2a-0e3bc2059d15",
+ "importer": "typescript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-component.ts b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-component.ts
new file mode 100644
index 0000000..e6546ad
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-component.ts
@@ -0,0 +1,10 @@
+
+declare module cc {
+ export interface RenderComponent {
+
+ /**
+ * 渲染优先级
+ */
+ renderPriority:number;
+ }
+}
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-component.ts.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-component.ts.meta
new file mode 100644
index 0000000..64fb768
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-component.ts.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "910f4c68-0289-4422-a65c-6dc64f77511e",
+ "importer": "typescript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-flow.ts b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-flow.ts
new file mode 100644
index 0000000..9a8610a
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-flow.ts
@@ -0,0 +1,153 @@
+
+let _batcher;
+let _cullingMask = 0;
+
+/**
+ * 当前渲染优先级
+ */
+let renderPriority = 0;
+
+/**
+ * 渲染器缓存
+ */
+let rendererCache:cc.RenderComponent[] = [];
+
+/**
+ * 渲染器排序
+ */
+let rendererOrder:boolean = false;
+
+/**
+ * 刷新渲染缓存
+ */
+function flushRendererCache(){
+ if(rendererCache.length > 0){
+ if(rendererOrder){
+ rendererCache.sort((a, b)=>{ return a.renderPriority - b.renderPriority; });
+ }
+ for(let render of rendererCache){
+ // console.log(`${render.node.name} - ${render.renderPriority}`);
+ //@ts-ignore
+ render._checkBacth(_batcher, render.node._cullingMask);
+ //@ts-ignore
+ render._assembler.fillBuffers(render, _batcher);
+ }
+ rendererCache.length = 0;
+ }
+ rendererOrder = false;
+}
+
+//@ts-ignore
+cc.RenderFlow.visitRootNode = function (rootNode){
+ renderPriority = 0;
+ rendererCache.length = 0;
+ rendererOrder = false;
+
+ //@ts-ignore
+ _batcher = cc.RenderFlow.getBachther();
+
+ //@ts-ignore
+ cc.RenderFlow.validateRenderers();
+
+ let preCullingMask = _cullingMask;
+ _cullingMask = rootNode._cullingMask;
+
+ //@ts-ignore
+ if (rootNode._renderFlag & cc.RenderFlow.FLAG_WORLD_TRANSFORM) {
+ _batcher.worldMatDirty ++;
+ rootNode._calculWorldMatrix();
+ //@ts-ignore
+ rootNode._renderFlag &= ~cc.RenderFlow.FLAG_WORLD_TRANSFORM;
+
+ //@ts-ignore
+ cc.RenderFlow.flows[rootNode._renderFlag]._func(rootNode);
+ flushRendererCache();
+
+ _batcher.worldMatDirty --;
+ }
+ else {
+ //@ts-ignore
+ cc.RenderFlow.flows[rootNode._renderFlag]._func(rootNode);
+ flushRendererCache();
+ }
+
+ _cullingMask = preCullingMask;
+}
+
+//@ts-ignore
+cc.RenderFlow.prototype._render = function (node) {
+ let comp = node._renderComponent;
+ if(comp instanceof cc.Mask){
+ flushRendererCache();
+
+ //@ts-ignore
+ comp._checkBacth(_batcher, node._cullingMask);
+ //@ts-ignore
+ comp._assembler.fillBuffers(comp, _batcher);
+ }else{
+ if (_batcher.worldMatDirty && comp._assembler.updateWorldVerts) {
+ comp._assembler.updateWorldVerts(comp);
+ }
+ rendererCache.push(comp);
+ comp.renderPriority = node._sortingEnabled ? node._sortingPriority : renderPriority;
+ if(renderPriority != 0){
+ rendererOrder = true;
+ }
+ }
+ this._next._func(node);
+};
+
+//@ts-ignore
+cc.RenderFlow.prototype._postRender = function (node) {
+ let comp = node._renderComponent;
+ if(comp instanceof cc.Mask){
+ flushRendererCache();
+ }
+ comp._checkBacth(_batcher, node._cullingMask);
+ comp._assembler.postFillBuffers(comp, _batcher);
+ this._next._func(node);
+};
+
+//@ts-ignore
+cc.RenderFlow.prototype._children = function (node) {
+ let cullingMask = _cullingMask;
+ let batcher = _batcher;
+
+ let preRenderPriority = renderPriority;
+
+ let parentOpacity = batcher.parentOpacity;
+ let opacity = (batcher.parentOpacity *= (node._opacity / 255));
+
+ renderPriority = node._sortingEnabled ? node._sortingPriority : renderPriority;
+ // console.log(`${node.name} ${renderPriority}`);
+
+ //@ts-ignore
+ let worldTransformFlag = batcher.worldMatDirty ? cc.RenderFlow.FLAG_WORLD_TRANSFORM : 0;
+ //@ts-ignore
+ let worldOpacityFlag = batcher.parentOpacityDirty ? cc.RenderFlow.FLAG_OPACITY_COLOR : 0;
+ let worldDirtyFlag = worldTransformFlag | worldOpacityFlag;
+
+ let children = node._children;
+ for (let i = 0, l = children.length; i < l; i++) {
+ let c = children[i];
+
+ // Advance the modification of the flag to avoid node attribute modification is invalid when opacity === 0.
+ c._renderFlag |= worldDirtyFlag;
+ if (!c._activeInHierarchy || c._opacity === 0) continue;
+
+ _cullingMask = c._cullingMask = c.groupIndex === 0 ? cullingMask : 1 << c.groupIndex;
+
+ // TODO: Maybe has better way to implement cascade opacity
+ let colorVal = c._color._val;
+ c._color._fastSetA(c._opacity * opacity);
+ // @ts-ignore
+ cc.RenderFlow.flows[c._renderFlag]._func(c);
+ c._color._val = colorVal;
+ }
+
+ batcher.parentOpacity = parentOpacity;
+
+ renderPriority = preRenderPriority;
+
+ this._next._func(node);
+};
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-flow.ts.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-flow.ts.meta
new file mode 100644
index 0000000..b58125c
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/render-flow.ts.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "d9ee1293-73e0-4588-a058-685d75be1912",
+ "importer": "typescript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool.meta
new file mode 100644
index 0000000..f4b44b8
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool.meta
@@ -0,0 +1,13 @@
+{
+ "ver": "1.1.3",
+ "uuid": "10d7cfa4-65ae-4b25-8725-2630ae630cd3",
+ "importer": "folder",
+ "isBundle": false,
+ "bundleName": "",
+ "priority": 1,
+ "compressionType": {},
+ "optimizeHotUpdate": {},
+ "inlineSpriteFrames": {},
+ "isRemoteBundle": {},
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/native/engine/common/Classes/Game.h b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/index.js
similarity index 64%
rename from native/engine/common/Classes/Game.h
rename to 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/index.js
index 521615e..dec47e2 100644
--- a/native/engine/common/Classes/Game.h
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/index.js
@@ -1,19 +1,18 @@
/****************************************************************************
- Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.
+ Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.
- http://www.cocos.com
+ https://www.cocos.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
- to use Cocos Creator solely to develop games on your target platforms. You
- shall not use Cocos Creator software for developing other software or tools
- that's used for developing games. You are not granted to publish, distribute,
+ to use Cocos Creator solely to develop games on your target platforms. You shall
+ not use Cocos Creator software for developing other software or tools that's
+ used for developing games. You are not granted to publish, distribute,
sublicense, and/or sell copies of Cocos Creator.
The software or tools in this License Agreement are licensed, not sold.
- Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to
- you.
+ Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@@ -23,22 +22,10 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
-#pragma once
-#include "cocos/cocos.h"
+let NodeUnit = require('./node-unit');
+let NodeMemPool = require('./node-mem-pool');
-/**
- @brief The cocos2d Application.
-
- The reason for implement as private inheritance is to hide some interface call
- by Director.
- */
-class Game : public cc::BaseGame {
-public:
- Game();
- int init() override;
- // bool init() override;
- void onPause() override;
- void onResume() override;
- void onClose() override;
-};
+module.exports = {
+ NodeMemPool: new NodeMemPool(NodeUnit)
+};
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/index.js.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/index.js.meta
new file mode 100644
index 0000000..7793a58
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/index.js.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "eb098cc5-0be2-48ee-8103-989d20216bda",
+ "importer": "javascript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/mem-pool.js b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/mem-pool.js
new file mode 100644
index 0000000..a73a66c
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/mem-pool.js
@@ -0,0 +1,109 @@
+/****************************************************************************
+ Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.
+
+ https://www.cocos.com/
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated engine source code (the "Software"), a limited,
+ worldwide, royalty-free, non-assignable, revocable and non-exclusive license
+ to use Cocos Creator solely to develop games on your target platforms. You shall
+ not use Cocos Creator software for developing other software or tools that's
+ used for developing games. You are not granted to publish, distribute,
+ sublicense, and/or sell copies of Cocos Creator.
+
+ The software or tools in this License Agreement are licensed, not sold.
+ Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+let MemPool = function (unitClass) {
+ this._unitClass = unitClass;
+ this._pool = [];
+ this._findOrder = [];
+
+ if (CC_JSB && CC_NATIVERENDERER) {
+ this._initNative();
+ }
+};
+
+let proto = MemPool.prototype;
+proto._initNative = function () {
+ this._nativeMemPool = new renderer.MemPool();
+};
+
+proto._buildUnit = function (unitID) {
+ let unit = new this._unitClass(unitID, this);
+ if (CC_JSB && CC_NATIVERENDERER) {
+ this._nativeMemPool.updateCommonData(unitID, unit._data, unit._signData);
+ }
+ return unit;
+};
+
+proto._destroyUnit = function (unitID) {
+ this._pool[unitID] = null;
+ for (let idx = 0, n = this._findOrder.length; idx < n; idx++) {
+ let unit = this._findOrder[idx];
+ if (unit && unit.unitID == unitID) {
+ this._findOrder.splice(idx, 1);
+ break;
+ }
+ }
+ if (CC_JSB && CC_NATIVERENDERER) {
+ this._nativeMemPool.removeCommonData(unitID);
+ }
+};
+
+proto._findUnitID = function () {
+ let unitID = 0;
+ let pool = this._pool;
+ while (pool[unitID]) unitID++;
+ return unitID;
+};
+
+proto.pop = function () {
+ let findUnit = null;
+ let idx = 0;
+ let findOrder = this._findOrder;
+ let pool = this._pool;
+ for (let n = findOrder.length; idx < n; idx++) {
+ let unit = findOrder[idx];
+ if (unit && unit.hasSpace()) {
+ findUnit = unit;
+ break;
+ }
+ }
+
+ if (!findUnit) {
+ let unitID = this._findUnitID();
+ findUnit = this._buildUnit(unitID);
+ pool[unitID] = findUnit;
+ findOrder.push(findUnit);
+ idx = findOrder.length - 1;
+ }
+
+ // swap has space unit to first position, so next find will fast
+ let firstUnit = findOrder[0];
+ if (firstUnit !== findUnit) {
+ findOrder[0] = findUnit;
+ findOrder[idx] = firstUnit;
+ }
+
+ return findUnit.pop();
+};
+
+proto.push = function (info) {
+ let unit = this._pool[info.unitID];
+ unit.push(info.index);
+ if (this._findOrder.length > 1 && unit.isAllFree()) {
+ this._destroyUnit(info.unitID);
+ }
+ return unit;
+};
+module.exports = MemPool;
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/mem-pool.js.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/mem-pool.js.meta
new file mode 100644
index 0000000..0dadab0
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/mem-pool.js.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "13cfc2d4-b859-42dc-917a-561662386b76",
+ "importer": "javascript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/native/engine/common/Classes/Game.cpp b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-mem-pool.js
similarity index 52%
rename from native/engine/common/Classes/Game.cpp
rename to 2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-mem-pool.js
index c15664c..bedf26d 100644
--- a/native/engine/common/Classes/Game.cpp
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-mem-pool.js
@@ -1,19 +1,18 @@
/****************************************************************************
- Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.
- http://www.cocos.com
+ https://www.cocos.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
- to use Cocos Creator solely to develop games on your target platforms. You
- shall not use Cocos Creator software for developing other software or tools
- that's used for developing games. You are not granted to publish, distribute,
+ to use Cocos Creator solely to develop games on your target platforms. You shall
+ not use Cocos Creator software for developing other software or tools that's
+ used for developing games. You are not granted to publish, distribute,
sublicense, and/or sell copies of Cocos Creator.
The software or tools in this License Agreement are licensed, not sold.
- Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to
- you.
+ Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@@ -23,43 +22,28 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
-#include "Game.h"
-#ifndef GAME_NAME
-#define GAME_NAME "CocosGame";
-#endif
+let MemPool = require('./mem-pool');
+let NodeMemPool = function (unitClass) {
+ MemPool.call(this, unitClass);
+};
-#ifndef SCRIPT_XXTEAKEY
-#define SCRIPT_XXTEAKEY "";
-#endif
+(function(){
+ let Super = function(){};
+ Super.prototype = MemPool.prototype;
+ NodeMemPool.prototype = new Super();
+})();
-Game::Game() = default;
+let proto = NodeMemPool.prototype;
+proto._initNative = function () {
+ this._nativeMemPool = new renderer.NodeMemPool();
+};
-int Game::init() {
- _windowInfo.title = GAME_NAME;
- // configurate window size
- // _windowInfo.height = 600;
- // _windowInfo.width = 800;
+proto._destroyUnit = function (unitID) {
+ MemPool.prototype._destroyUnit.call(this, unitID);
+ if (CC_JSB && CC_NATIVERENDERER) {
+ this._nativeMemPool.removeNodeData(unitID);
+ }
+};
-#if CC_DEBUG
- _debuggerInfo.enabled = true;
-#else
- _debuggerInfo.enabled = false;
-#endif
- _debuggerInfo.port = 6086;
- _debuggerInfo.address = "0.0.0.0";
- _debuggerInfo.pauseOnStart = false;
-
- _xxteaKey = SCRIPT_XXTEAKEY;
-
- BaseGame::init();
- return 0;
-}
-
-void Game::onPause() { BaseGame::onPause(); }
-
-void Game::onResume() { BaseGame::onResume(); }
-
-void Game::onClose() { BaseGame::onClose(); }
-
-CC_REGISTER_APPLICATION(Game);
+module.exports = NodeMemPool;
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-mem-pool.js.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-mem-pool.js.meta
new file mode 100644
index 0000000..68752dd
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-mem-pool.js.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "caa4d37a-9df4-4a7b-9407-eafa3c27df76",
+ "importer": "javascript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-unit.js b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-unit.js
new file mode 100644
index 0000000..dc27689
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-unit.js
@@ -0,0 +1,158 @@
+/****************************************************************************
+ Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.
+
+ https://www.cocos.com/
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated engine source code (the "Software"), a limited,
+ worldwide, royalty-free, non-assignable, revocable and non-exclusive license
+ to use Cocos Creator solely to develop games on your target platforms. You shall
+ not use Cocos Creator software for developing other software or tools that's
+ used for developing games. You are not granted to publish, distribute,
+ sublicense, and/or sell copies of Cocos Creator.
+
+ The software or tools in this License Agreement are licensed, not sold.
+ Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+const FLOAT_ARRAY_TYPE = (CC_JSB && CC_NATIVERENDERER) ? Float32Array : Float64Array;
+const FLOAT_BYTES = (CC_JSB && CC_NATIVERENDERER) ? 4 : 8;
+
+const Uint32_Bytes = 4;
+const Uint8_Bytes = 1;
+
+// Space : [Dirty] [Size:4 Uint32]
+const Dirty_Type = Uint32Array;
+const Dirty_Members = 1;
+const Dirty_Stride = Dirty_Members * Uint32_Bytes;
+
+// Space : [TRS] [Size:4 * 10 Float32|Float64]
+const TRS_Members = 10;
+const TRS_Stride = TRS_Members * FLOAT_BYTES;
+
+// Space : [LocalMatrix] [Size:4 * 16 Float32|Float64]
+const LocalMatrix_Members = 16;
+const LocalMatrix_Stride = LocalMatrix_Members * FLOAT_BYTES;
+
+// Space : [WorldMatrix] [Size:4 * 16 Float32|Float64]
+const WorldMatrix_Members = 16;
+const WorldMatrix_Stride = WorldMatrix_Members * FLOAT_BYTES;
+
+// Space : [sortingPriority] [Size:4 * 1 Float32|Float64]
+const SortingPriority_Members = 1;
+const SortingPriority_Stride = SortingPriority_Members * FLOAT_BYTES;
+
+// Space : [Parent Unit] [Size:4 Uint32]
+// Space : [Parent Index] [Size:4 Uint32]
+const Parent_Type = Uint32Array;
+const Parent_Members = 2;
+const Parent_Stride = Parent_Members * Uint32_Bytes;
+
+// Space : [ZOrder] [Size:4 Uint32]
+const ZOrder_Type = Uint32Array;
+const ZOrder_Members = 1;
+const ZOrder_Stride = ZOrder_Members * Uint32_Bytes;
+
+// Space : [CullingMask] [Size:4 Int32]
+const CullingMask_Type = Int32Array;
+const CullingMask_Members = 1;
+const CullingMask_Stride = CullingMask_Members * Uint32_Bytes;
+
+// Space : [Opacity] [Size:1 Uint8]
+const Opacity_Type = Uint8Array;
+const Opacity_Members = 1;
+const Opacity_Stride = Opacity_Members * Uint8_Bytes;
+
+// Space : [Is3D] [Size:1 Uint8]
+const Is3D_Type = Uint8Array;
+const Is3D_Members = 1;
+const Is3D_Stride = Is3D_Members * Uint8_Bytes;
+
+// Space : [sortingEnabled] [Size:1 Uint8]
+const SortingEnabled_Type = Uint8Array;
+const SortingEnabled_Members = 1;
+const SortingEnabled_Stride = SortingEnabled_Members * Uint8_Bytes;
+
+// Space : [NodePtr] [Size:4 * 2 Uint32]
+const Node_Type = Uint32Array;
+const Node_Members = 2;
+
+// Space : [Skew] [Size:4 * 2 Float32]
+const Skew_Members = 2;
+const Skew_Stride = Skew_Members * FLOAT_BYTES;
+
+let UnitBase = require('./unit-base');
+let NodeUnit = function (unitID, memPool) {
+ UnitBase.call(this, unitID, memPool);
+
+ let contentNum = this._contentNum;
+ this.trsList = new FLOAT_ARRAY_TYPE(contentNum * TRS_Members);
+ this.localMatList = new FLOAT_ARRAY_TYPE(contentNum * LocalMatrix_Members);
+ this.worldMatList = new FLOAT_ARRAY_TYPE(contentNum * WorldMatrix_Members);
+
+ if (CC_JSB && CC_NATIVERENDERER) {
+ this.dirtyList = new Dirty_Type(contentNum * Dirty_Members);
+ this.parentList = new Parent_Type(contentNum * Parent_Members);
+ this.zOrderList = new ZOrder_Type(contentNum * ZOrder_Members);
+ this.cullingMaskList = new CullingMask_Type(contentNum * CullingMask_Members);
+ this.opacityList = new Opacity_Type(contentNum * Opacity_Members);
+ this.is3DList = new Is3D_Type(contentNum * Is3D_Members);
+ this.nodeList = new Node_Type(contentNum * Node_Members);
+ this.skewList = new FLOAT_ARRAY_TYPE(contentNum * Skew_Members);
+ this.sortingPriorityList = new FLOAT_ARRAY_TYPE(contentNum * SortingPriority_Stride);
+ this.sortingEnabledList = new SortingEnabled_Type(contentNum * SortingEnabled_Stride);
+
+ this._memPool._nativeMemPool.updateNodeData(
+ unitID,
+ this.dirtyList,
+ this.trsList,
+ this.localMatList,
+ this.worldMatList,
+ this.parentList,
+ this.zOrderList,
+ this.cullingMaskList,
+ this.opacityList,
+ this.is3DList,
+ this.nodeList,
+ this.skewList,
+ this.sortingPriorityList,
+ this.sortingEnabledList
+ );
+ }
+
+ for (let i = 0; i < contentNum; i ++) {
+ let space = this._spacesData[i];
+
+ space.trs = new FLOAT_ARRAY_TYPE(this.trsList.buffer, i * TRS_Stride, TRS_Members);
+ space.localMat = new FLOAT_ARRAY_TYPE(this.localMatList.buffer, i * LocalMatrix_Stride, LocalMatrix_Members);
+ space.worldMat = new FLOAT_ARRAY_TYPE(this.worldMatList.buffer, i * WorldMatrix_Stride, WorldMatrix_Members);
+
+ if (CC_JSB && CC_NATIVERENDERER) {
+ space.dirty = new Dirty_Type(this.dirtyList.buffer, i * Dirty_Stride, Dirty_Members);
+ space.parent = new Parent_Type(this.parentList.buffer, i * Parent_Stride, Parent_Members);
+ space.zOrder = new ZOrder_Type(this.zOrderList.buffer, i * ZOrder_Stride, ZOrder_Members);
+ space.cullingMask = new CullingMask_Type(this.cullingMaskList.buffer, i * CullingMask_Stride, CullingMask_Members);
+ space.opacity = new Opacity_Type(this.opacityList.buffer, i * Opacity_Stride, Opacity_Members);
+ space.is3D = new Is3D_Type(this.is3DList.buffer, i * Is3D_Stride, Is3D_Members);
+ space.skew = new FLOAT_ARRAY_TYPE(this.skewList.buffer, i * Skew_Stride, Skew_Members);
+ space.sortingPriority = new FLOAT_ARRAY_TYPE(this.sortingPriorityList.buffer, i * SortingPriority_Stride, SortingPriority_Members);
+ space.sortingEnabled = new SortingEnabled_Type(this.sortingEnabledList.buffer, i * SortingEnabled_Stride, SortingEnabled_Members);
+ }
+ }
+};
+
+(function(){
+ let Super = function(){};
+ Super.prototype = UnitBase.prototype;
+ NodeUnit.prototype = new Super();
+})();
+
+module.exports = NodeUnit;
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-unit.js.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-unit.js.meta
new file mode 100644
index 0000000..f54cc51
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/node-unit.js.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "3e3243b6-45a4-4eec-9abb-805de55e8b1f",
+ "importer": "javascript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/unit-base.js b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/unit-base.js
new file mode 100644
index 0000000..8628a8d
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/unit-base.js
@@ -0,0 +1,167 @@
+/****************************************************************************
+ Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.
+
+ https://www.cocos.com/
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated engine source code (the "Software"), a limited,
+ worldwide, royalty-free, non-assignable, revocable and non-exclusive license
+ to use Cocos Creator solely to develop games on your target platforms. You shall
+ not use Cocos Creator software for developing other software or tools that's
+ used for developing games. You are not granted to publish, distribute,
+ sublicense, and/or sell copies of Cocos Creator.
+
+ The software or tools in this License Agreement are licensed, not sold.
+ Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+// Unit has many segment, layout such as :
+// Head Free Pointer + Using Segment Num + Segment 1 + Segment 2 + Segment 3 ...
+
+// sign data format
+// Space : [If Free Flag] [Size:1 Uint16]
+// Space : [Next Free Index] [Size:1 Uint16]
+
+// invalid pointer value
+let POINTER_INVALID_FLAG = 0xffff;
+let SPACE_FREE_FLAG = 0x0;
+let SPACE_USE_FLAG = 0x1;
+let POS_NEXT_FREE = 0;
+let POS_FREE_FLAG = 1;
+
+let UnitBase = function (unitID, memPool, contentNum) {
+ contentNum = contentNum || 128;
+
+ // set unit id
+ this.unitID = unitID;
+ this._memPool = memPool;
+
+ this._data = new Uint16Array(2);
+ // head of the free content index
+ this._data[0] = 0;
+ // using segment num
+ this._data[1] = 0;
+
+ this._contentNum = contentNum;
+ this._signData = new Uint16Array(this._contentNum * 2);
+ this._spacesData = [];
+
+ for (let i = 0; i < contentNum; i++) {
+ let signIndex = i * 2;
+ // store content block index but not sign array index
+ this._signData[signIndex + POS_NEXT_FREE] = i + 1;
+ this._signData[signIndex + POS_FREE_FLAG] = SPACE_FREE_FLAG;
+
+ this._spacesData[i] = {
+ index: i,
+ unitID: unitID,
+ };
+ }
+ // last one has no next space;
+ this._signData[(contentNum - 1) * 2] = POINTER_INVALID_FLAG;
+};
+
+let UnitBaseProto = UnitBase.prototype;
+UnitBaseProto.hasSpace = function () {
+ return this._data[0] !== POINTER_INVALID_FLAG;
+};
+
+UnitBaseProto.isAllFree = function () {
+ return this._data[1] == 0;
+};
+
+// pop space from unit
+UnitBaseProto.pop = function () {
+ let headFreeIndex = this._data[0];
+ if (headFreeIndex === POINTER_INVALID_FLAG) return null;
+
+ let index = headFreeIndex;
+ let signIndex = index * 2;
+ let space = this._spacesData[index];
+
+ // set use flag
+ this._signData[signIndex + POS_FREE_FLAG] = SPACE_USE_FLAG;
+
+ // store new next free space index
+ this._data[0] = this._signData[signIndex + POS_NEXT_FREE];
+ // add using segment num
+ this._data[1]++;
+ return space;
+};
+
+// push back to unit
+UnitBaseProto.push = function (index) {
+ let signIndex = index * 2;
+
+ // set free flag
+ this._signData[signIndex + POS_FREE_FLAG] = SPACE_FREE_FLAG;
+
+ // store head free index to the space
+ this._signData[signIndex + POS_NEXT_FREE] = this._data[0];
+ // update head free index
+ this._data[0] = index;
+ // sub using segment num
+ this._data[1]--;
+};
+
+// dump all space info
+UnitBaseProto.dump = function () {
+ let spaceNum = 0;
+ let index = this._data[0];
+ let freeStr = "";
+
+ while (index != POINTER_INVALID_FLAG) {
+ spaceNum ++;
+ freeStr += index + "->";
+ index = this._signData[index * 2 + POS_NEXT_FREE];
+ }
+
+ let usingNum = 0;
+ let usingStr = "";
+ let contentNum = this._contentNum;
+ for (let i = 0; i < contentNum; i++) {
+ let freeFlag = this._signData[i * 2 + POS_FREE_FLAG];
+ if (freeFlag == SPACE_USE_FLAG) {
+ usingNum ++;
+ usingStr += i + "->";
+ }
+ }
+
+ let totalNum = spaceNum + usingNum;
+ console.log(
+ "unitID:", this.unitID,
+ "spaceNum:", spaceNum,
+ "calc using num:", usingNum,
+ 'store using num:', this._data[1],
+ 'calc total num:', totalNum,
+ 'actually total num:', this._contentNum
+ );
+ console.log("free info:", freeStr);
+ console.log("using info:", usingStr);
+
+ if (usingNum != this._data[1]) {
+ cc.error(
+ 'using num error',
+ "calc using num:", usingNum,
+ 'store using num:', this._data[1]
+ );
+ }
+
+ if (spaceNum + usingNum != this._contentNum) {
+ cc.error(
+ 'total num error',
+ 'calc total num:', totalNum,
+ 'actually total num:', this._contentNum
+ );
+ }
+};
+
+module.exports = UnitBase;
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/unit-base.js.meta b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/unit-base.js.meta
new file mode 100644
index 0000000..df8a408
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/engine-extend/trans-pool/unit-base.js.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "b1e0a00c-ca02-49ba-9561-19c4ca3078df",
+ "importer": "javascript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/assets/lcc-ui-sorting-group/sorting-define.ts b/2.4.11/assets/lcc-ui-sorting-group/sorting-define.ts
similarity index 100%
rename from assets/lcc-ui-sorting-group/sorting-define.ts
rename to 2.4.11/assets/lcc-ui-sorting-group/sorting-define.ts
diff --git a/2.4.11/assets/lcc-ui-sorting-group/sorting-define.ts.meta b/2.4.11/assets/lcc-ui-sorting-group/sorting-define.ts.meta
new file mode 100644
index 0000000..51ef89e
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/sorting-define.ts.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "8f6e89ff-d851-45d4-bab8-d32cd5371760",
+ "importer": "typescript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/lcc-ui-sorting-group/sorting-group.ts b/2.4.11/assets/lcc-ui-sorting-group/sorting-group.ts
new file mode 100644
index 0000000..569d86f
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/sorting-group.ts
@@ -0,0 +1,55 @@
+
+import { ORDER_IN_LAYER_MAX, SortingLayer } from './sorting-define';
+
+const { ccclass, property, disallowMultiple, executeInEditMode } = cc._decorator;
+
+@ccclass('lcc-ui/SortingGroup')
+@disallowMultiple()
+@executeInEditMode()
+export class SortingGroup extends cc.Component {
+ /**
+ * 排序层
+ */
+ @property({type: cc.Enum(SortingLayer)})
+ private _sortingLayer:SortingLayer = SortingLayer.DEFAULT;
+
+ /**
+ * 排序层
+ */
+ @property({type: cc.Enum(SortingLayer)})
+ get sortingLayer(){
+ return this._sortingLayer;
+ }
+ set sortingLayer(value:SortingLayer){
+ this._sortingLayer = value;
+ // this.node.sortingPriority = Math.sign(this._sortingLayer) * (Math.abs(this._sortingLayer) * ORDER_IN_LAYER_MAX + this._orderInLayer);
+ }
+
+ /**
+ * 排序值
+ */
+ @property({ type:cc.Float, min: 0, max : ORDER_IN_LAYER_MAX })
+ private _orderInLayer:number = 0;
+
+ /**
+ * 排序值
+ */
+ @property({ type:cc.Float, min: 0, max : ORDER_IN_LAYER_MAX })
+ get orderInLayer(){
+ return this._orderInLayer;
+ }
+ set orderInLayer(value:number){
+ this._orderInLayer = value;
+ // this.node.sortingPriority = Math.sign(this._sortingLayer) * (Math.abs(this._sortingLayer) * ORDER_IN_LAYER_MAX + this._orderInLayer);
+ }
+
+ onEnable(){
+ this.node.sortingPriority = Math.sign(this._sortingLayer) * (Math.abs(this._sortingLayer) * ORDER_IN_LAYER_MAX + this._orderInLayer);
+ this.node.sortingEnabled = true;
+ }
+
+ onDisable(){
+ this.node.sortingPriority = 0;
+ this.node.sortingEnabled = false;
+ }
+}
diff --git a/2.4.11/assets/lcc-ui-sorting-group/sorting-group.ts.meta b/2.4.11/assets/lcc-ui-sorting-group/sorting-group.ts.meta
new file mode 100644
index 0000000..43e5f8b
--- /dev/null
+++ b/2.4.11/assets/lcc-ui-sorting-group/sorting-group.ts.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "ac8d9166-422c-4cd3-a0be-0bdcddb52da2",
+ "importer": "typescript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test.meta b/2.4.11/assets/test.meta
new file mode 100644
index 0000000..f4449ea
--- /dev/null
+++ b/2.4.11/assets/test.meta
@@ -0,0 +1,13 @@
+{
+ "ver": "1.1.3",
+ "uuid": "d29d0f8f-d7b1-4b60-a834-224ebe63fb72",
+ "importer": "folder",
+ "isBundle": false,
+ "bundleName": "",
+ "priority": 1,
+ "compressionType": {},
+ "optimizeHotUpdate": {},
+ "inlineSpriteFrames": {},
+ "isRemoteBundle": {},
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/prefabs.meta b/2.4.11/assets/test/prefabs.meta
new file mode 100644
index 0000000..2deb067
--- /dev/null
+++ b/2.4.11/assets/test/prefabs.meta
@@ -0,0 +1,13 @@
+{
+ "ver": "1.1.3",
+ "uuid": "b5d585a3-e6d1-4710-aa13-dc6f42f7bbd1",
+ "importer": "folder",
+ "isBundle": false,
+ "bundleName": "",
+ "priority": 1,
+ "compressionType": {},
+ "optimizeHotUpdate": {},
+ "inlineSpriteFrames": {},
+ "isRemoteBundle": {},
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/prefabs/ListTestItem-sorting.prefab b/2.4.11/assets/test/prefabs/ListTestItem-sorting.prefab
new file mode 100644
index 0000000..7d05894
--- /dev/null
+++ b/2.4.11/assets/test/prefabs/ListTestItem-sorting.prefab
@@ -0,0 +1,1322 @@
+[
+ {
+ "__type__": "cc.Prefab",
+ "_name": "",
+ "_objFlags": 0,
+ "_native": "",
+ "data": {
+ "__id__": 1
+ },
+ "optimizationPolicy": 0,
+ "asyncLoadAssets": false,
+ "readonly": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "ListTestItem-sorting",
+ "_objFlags": 0,
+ "_parent": null,
+ "_children": [
+ {
+ "__id__": 2
+ },
+ {
+ "__id__": 10
+ },
+ {
+ "__id__": 18
+ },
+ {
+ "__id__": 22
+ },
+ {
+ "__id__": 35
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 39
+ },
+ {
+ "__id__": 40
+ },
+ {
+ "__id__": 41
+ }
+ ],
+ "_prefab": {
+ "__id__": 42
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 0,
+ "g": 0,
+ "b": 0,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 520,
+ "height": 320
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -539.4,
+ -160,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Head",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [
+ {
+ "__id__": 3
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 7
+ },
+ {
+ "__id__": 8
+ }
+ ],
+ "_prefab": {
+ "__id__": 9
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 160,
+ "height": 160
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -159.339,
+ 61.451,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Rank",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 2
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 4
+ },
+ {
+ "__id__": 5
+ }
+ ],
+ "_prefab": {
+ "__id__": 6
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 0,
+ "b": 0,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 22.25,
+ "height": 40
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 3
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "1",
+ "_N$string": "1",
+ "_fontSize": 40,
+ "_lineHeight": 40,
+ "_enableWrapText": true,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 0,
+ "_N$cacheMode": 2,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 3
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 6,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "19QVpwc3hGbbpTMQzoHZcQ",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 2
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "9b9dc23d-1001-44d7-9c36-a7d960f7a49d"
+ },
+ "_type": 0,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 2
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 1,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "3eQuCp9rdItr17yYFZ9NQM",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Gold",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [
+ {
+ "__id__": 11
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 15
+ },
+ {
+ "__id__": 16
+ }
+ ],
+ "_prefab": {
+ "__id__": 17
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 60,
+ "height": 61
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -5.677,
+ 101.101,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Label",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 10
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 12
+ },
+ {
+ "__id__": 13
+ }
+ ],
+ "_prefab": {
+ "__id__": 14
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 192,
+ "g": 255,
+ "b": 59,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 112,
+ "height": 42
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 2.187920071884753,
+ "y": 0.3029184524067361
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 289,
+ -11,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 11
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "9999",
+ "_N$string": "9999",
+ "_fontSize": 30,
+ "_lineHeight": 40,
+ "_enableWrapText": false,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 2,
+ "_N$cacheMode": 2,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 11
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 7,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "bd73ajM3tPGrRXAcuc0YrE",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 10
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "f74c16b3-291b-41b4-8542-9b85fbca505b"
+ },
+ "_type": 0,
+ "_sizeMode": 1,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 10
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 2,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "b71C6YuBpDBo0fQCDIC1IH",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Flag",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 19
+ },
+ {
+ "__id__": 20
+ }
+ ],
+ "_prefab": {
+ "__id__": 21
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 81,
+ "height": 80
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 206.814,
+ 97.978,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 18
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "5dde49b3-365a-4e01-b7a5-a079116b7d7c"
+ },
+ "_type": 0,
+ "_sizeMode": 1,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 18
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 3,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "a1ijaMmEBBK5J8BItRvXml",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Level",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [
+ {
+ "__id__": 23
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 32
+ },
+ {
+ "__id__": 33
+ }
+ ],
+ "_prefab": {
+ "__id__": 34
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 192,
+ "g": 255,
+ "b": 59,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 112,
+ "height": 42
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 2.187920071884753,
+ "y": 0.3029184524067361
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 183.168,
+ 19.725,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "ProgressBar",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 22
+ },
+ "_children": [
+ {
+ "__id__": 24
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 28
+ },
+ {
+ "__id__": 29
+ },
+ {
+ "__id__": 30
+ }
+ ],
+ "_prefab": {
+ "__id__": 31
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 300,
+ "height": 15
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -88.762,
+ -32.432,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "bar",
+ "_objFlags": 512,
+ "_parent": {
+ "__id__": 23
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 25
+ },
+ {
+ "__id__": 26
+ }
+ ],
+ "_prefab": {
+ "__id__": 27
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 150,
+ "height": 15
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -150,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 24
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "6b84a7e0-d31a-42ab-90de-bb04c9ea0d2f"
+ },
+ "_type": 1,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 24
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 5,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "d7R/LokQxJ66PSNPysfJ3t",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 23
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "48a96f63-2eeb-4165-a0ca-654da41ec4ae"
+ },
+ "_type": 1,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.ProgressBar",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 23
+ },
+ "_enabled": true,
+ "_N$totalLength": 300,
+ "_N$barSprite": {
+ "__id__": 25
+ },
+ "_N$mode": 0,
+ "_N$progress": 0.5,
+ "_N$reverse": false,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 23
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 4,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "b4rDwnanVCm7VtM5L1KDqS",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 22
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "Lv.1",
+ "_N$string": "Lv.1",
+ "_fontSize": 30,
+ "_lineHeight": 40,
+ "_enableWrapText": false,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 2,
+ "_N$cacheMode": 2,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 22
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 8,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "caud8o+oBAGq4FEg536/i0",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Desc",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 36
+ },
+ {
+ "__id__": 37
+ }
+ ],
+ "_prefab": {
+ "__id__": 38
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 452,
+ "height": 100
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 2.187920071884753,
+ "y": 0.3029184524067361
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 764,
+ -108,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 35
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "什么也没留下",
+ "_N$string": "什么也没留下",
+ "_fontSize": 30,
+ "_lineHeight": 40,
+ "_enableWrapText": false,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 2,
+ "_N$cacheMode": 2,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 35
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 9,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "dbY2Pvam9LfZaWV0VXCY5W",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 1
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "f625fa33-7315-4748-89a5-cf48448980c9"
+ },
+ "_type": 0,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 1
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "9f538fWaWpEkYLqGkQ0A+08",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 1
+ },
+ "_enabled": true,
+ "rankText": {
+ "__id__": 4
+ },
+ "goldText": {
+ "__id__": 12
+ },
+ "flagImage": {
+ "__id__": 19
+ },
+ "levelText": {
+ "__id__": 32
+ },
+ "levelBar": {
+ "__id__": 29
+ },
+ "descText": {
+ "__id__": 36
+ },
+ "uiOpacity": {
+ "__id__": 10
+ },
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "",
+ "sync": false
+ }
+]
\ No newline at end of file
diff --git a/2.4.11/assets/test/prefabs/ListTestItem-sorting.prefab.meta b/2.4.11/assets/test/prefabs/ListTestItem-sorting.prefab.meta
new file mode 100644
index 0000000..36d855a
--- /dev/null
+++ b/2.4.11/assets/test/prefabs/ListTestItem-sorting.prefab.meta
@@ -0,0 +1,9 @@
+{
+ "ver": "1.3.2",
+ "uuid": "5319446a-3497-48fc-99a7-9806589fd3c6",
+ "importer": "prefab",
+ "optimizationPolicy": "AUTO",
+ "asyncLoadAssets": false,
+ "readonly": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/prefabs/ListTestItem.prefab b/2.4.11/assets/test/prefabs/ListTestItem.prefab
new file mode 100644
index 0000000..ce51775
--- /dev/null
+++ b/2.4.11/assets/test/prefabs/ListTestItem.prefab
@@ -0,0 +1,1172 @@
+[
+ {
+ "__type__": "cc.Prefab",
+ "_name": "",
+ "_objFlags": 0,
+ "_native": "",
+ "data": {
+ "__id__": 1
+ },
+ "optimizationPolicy": 0,
+ "asyncLoadAssets": false,
+ "readonly": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "ListTestItem-sorting",
+ "_objFlags": 0,
+ "_parent": null,
+ "_children": [
+ {
+ "__id__": 2
+ },
+ {
+ "__id__": 8
+ },
+ {
+ "__id__": 14
+ },
+ {
+ "__id__": 17
+ },
+ {
+ "__id__": 27
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 30
+ },
+ {
+ "__id__": 31
+ }
+ ],
+ "_prefab": {
+ "__id__": 32
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 0,
+ "g": 0,
+ "b": 0,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 520,
+ "height": 320
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -539.4,
+ -160,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Head",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [
+ {
+ "__id__": 3
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 6
+ }
+ ],
+ "_prefab": {
+ "__id__": 7
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 160,
+ "height": 160
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -159.339,
+ 61.451,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Rank",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 2
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 4
+ }
+ ],
+ "_prefab": {
+ "__id__": 5
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 0,
+ "b": 0,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 22.25,
+ "height": 40
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 3
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "1",
+ "_N$string": "1",
+ "_fontSize": 40,
+ "_lineHeight": 40,
+ "_enableWrapText": true,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 0,
+ "_N$cacheMode": 2,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "19QVpwc3hGbbpTMQzoHZcQ",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 2
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "9b9dc23d-1001-44d7-9c36-a7d960f7a49d"
+ },
+ "_type": 0,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "3eQuCp9rdItr17yYFZ9NQM",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Gold",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [
+ {
+ "__id__": 9
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 12
+ }
+ ],
+ "_prefab": {
+ "__id__": 13
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 60,
+ "height": 61
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -5.677,
+ 101.101,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Label",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 8
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 10
+ }
+ ],
+ "_prefab": {
+ "__id__": 11
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 192,
+ "g": 255,
+ "b": 59,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 112,
+ "height": 42
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 2.187920071884753,
+ "y": 0.3029184524067361
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 289,
+ -11,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 9
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "9999",
+ "_N$string": "9999",
+ "_fontSize": 30,
+ "_lineHeight": 40,
+ "_enableWrapText": false,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 2,
+ "_N$cacheMode": 2,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "bd73ajM3tPGrRXAcuc0YrE",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 8
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "f74c16b3-291b-41b4-8542-9b85fbca505b"
+ },
+ "_type": 0,
+ "_sizeMode": 1,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "b71C6YuBpDBo0fQCDIC1IH",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Flag",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 15
+ }
+ ],
+ "_prefab": {
+ "__id__": 16
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 81,
+ "height": 80
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 206.814,
+ 97.978,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 14
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "5dde49b3-365a-4e01-b7a5-a079116b7d7c"
+ },
+ "_type": 0,
+ "_sizeMode": 1,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "a1ijaMmEBBK5J8BItRvXml",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Level",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [
+ {
+ "__id__": 18
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 25
+ }
+ ],
+ "_prefab": {
+ "__id__": 26
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 192,
+ "g": 255,
+ "b": 59,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 112,
+ "height": 42
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 2.187920071884753,
+ "y": 0.3029184524067361
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 183.168,
+ 19.725,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "ProgressBar",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 17
+ },
+ "_children": [
+ {
+ "__id__": 19
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 22
+ },
+ {
+ "__id__": 23
+ }
+ ],
+ "_prefab": {
+ "__id__": 24
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 300,
+ "height": 15
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -88.762,
+ -32.432,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "bar",
+ "_objFlags": 512,
+ "_parent": {
+ "__id__": 18
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 20
+ }
+ ],
+ "_prefab": {
+ "__id__": 21
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 150,
+ "height": 15
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -150,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 19
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "6b84a7e0-d31a-42ab-90de-bb04c9ea0d2f"
+ },
+ "_type": 1,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "d7R/LokQxJ66PSNPysfJ3t",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 18
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "48a96f63-2eeb-4165-a0ca-654da41ec4ae"
+ },
+ "_type": 1,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.ProgressBar",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 18
+ },
+ "_enabled": true,
+ "_N$totalLength": 300,
+ "_N$barSprite": {
+ "__id__": 20
+ },
+ "_N$mode": 0,
+ "_N$progress": 0.5,
+ "_N$reverse": false,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "b4rDwnanVCm7VtM5L1KDqS",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 17
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "Lv.1",
+ "_N$string": "Lv.1",
+ "_fontSize": 30,
+ "_lineHeight": 40,
+ "_enableWrapText": false,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 2,
+ "_N$cacheMode": 2,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "caud8o+oBAGq4FEg536/i0",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Desc",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 28
+ }
+ ],
+ "_prefab": {
+ "__id__": 29
+ },
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 452,
+ "height": 100
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 2.187920071884753,
+ "y": 0.3029184524067361
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 764,
+ -108,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 27
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "什么也没留下",
+ "_N$string": "什么也没留下",
+ "_fontSize": 30,
+ "_lineHeight": 40,
+ "_enableWrapText": false,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 2,
+ "_N$cacheMode": 2,
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "dbY2Pvam9LfZaWV0VXCY5W",
+ "sync": false
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 1
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "f625fa33-7315-4748-89a5-cf48448980c9"
+ },
+ "_type": 0,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": ""
+ },
+ {
+ "__type__": "9f538fWaWpEkYLqGkQ0A+08",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 1
+ },
+ "_enabled": true,
+ "rankText": {
+ "__id__": 4
+ },
+ "goldText": {
+ "__id__": 10
+ },
+ "flagImage": {
+ "__id__": 15
+ },
+ "levelText": {
+ "__id__": 25
+ },
+ "levelBar": {
+ "__id__": 23
+ },
+ "descText": {
+ "__id__": 28
+ },
+ "uiOpacity": {
+ "__id__": 8
+ },
+ "_id": ""
+ },
+ {
+ "__type__": "cc.PrefabInfo",
+ "root": {
+ "__id__": 1
+ },
+ "asset": {
+ "__id__": 0
+ },
+ "fileId": "",
+ "sync": false
+ }
+]
\ No newline at end of file
diff --git a/2.4.11/assets/test/prefabs/ListTestItem.prefab.meta b/2.4.11/assets/test/prefabs/ListTestItem.prefab.meta
new file mode 100644
index 0000000..6569778
--- /dev/null
+++ b/2.4.11/assets/test/prefabs/ListTestItem.prefab.meta
@@ -0,0 +1,9 @@
+{
+ "ver": "1.3.2",
+ "uuid": "77b9c6bb-79b1-4086-86fa-ac30b56d67cc",
+ "importer": "prefab",
+ "optimizationPolicy": "AUTO",
+ "asyncLoadAssets": false,
+ "readonly": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/scenes.meta b/2.4.11/assets/test/scenes.meta
new file mode 100644
index 0000000..8197627
--- /dev/null
+++ b/2.4.11/assets/test/scenes.meta
@@ -0,0 +1,13 @@
+{
+ "ver": "1.1.3",
+ "uuid": "e2dc59cc-2d8b-4b93-adab-48a29cdcf581",
+ "importer": "folder",
+ "isBundle": false,
+ "bundleName": "",
+ "priority": 1,
+ "compressionType": {},
+ "optimizeHotUpdate": {},
+ "inlineSpriteFrames": {},
+ "isRemoteBundle": {},
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/scenes/test-scene-sorting.fire b/2.4.11/assets/test/scenes/test-scene-sorting.fire
new file mode 100644
index 0000000..8343d5d
--- /dev/null
+++ b/2.4.11/assets/test/scenes/test-scene-sorting.fire
@@ -0,0 +1,1124 @@
+[
+ {
+ "__type__": "cc.SceneAsset",
+ "_name": "",
+ "_objFlags": 0,
+ "_native": "",
+ "scene": {
+ "__id__": 1
+ }
+ },
+ {
+ "__type__": "cc.Scene",
+ "_objFlags": 0,
+ "_parent": null,
+ "_children": [
+ {
+ "__id__": 2
+ }
+ ],
+ "_active": false,
+ "_components": [],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 0,
+ "height": 0
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_is3DNode": true,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "autoReleaseAssets": false,
+ "_id": "c6ba3258-b873-4d4f-b31a-60f4c79e523a"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Canvas",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [
+ {
+ "__id__": 3
+ },
+ {
+ "__id__": 5
+ },
+ {
+ "__id__": 15
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 24
+ },
+ {
+ "__id__": 25
+ },
+ {
+ "__id__": 26
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1920,
+ "height": 1080
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 960,
+ 540,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "a5esZu+45LA5mBpvttspPD"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Main Camera",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 2
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 4
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1920,
+ "height": 1080
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "e1WoFrQ79G7r4ZuQE3HlNb"
+ },
+ {
+ "__type__": "cc.Camera",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 3
+ },
+ "_enabled": true,
+ "_cullingMask": 4294967295,
+ "_clearFlags": 7,
+ "_backgroundColor": {
+ "__type__": "cc.Color",
+ "r": 0,
+ "g": 0,
+ "b": 0,
+ "a": 255
+ },
+ "_depth": -1,
+ "_zoomRatio": 1,
+ "_targetTexture": null,
+ "_fov": 60,
+ "_orthoSize": 10,
+ "_nearClip": 1,
+ "_farClip": 4096,
+ "_ortho": true,
+ "_rect": {
+ "__type__": "cc.Rect",
+ "x": 0,
+ "y": 0,
+ "width": 1,
+ "height": 1
+ },
+ "_renderStages": 1,
+ "_alignWithScreen": true,
+ "_id": "81GN3uXINKVLeW4+iKSlim"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "List",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 2
+ },
+ "_children": [
+ {
+ "__id__": 6
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 14
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 192,
+ "b": 192,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1751,
+ "height": 941
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 4,
+ 3,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "dfGGBlUYVMGZyqbBExS14H"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "ScrollView",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 5
+ },
+ "_children": [
+ {
+ "__id__": 7
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 13
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1640,
+ "height": 842
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -2,
+ -1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "60PMaEcWNOuoy/lKCzNBeB"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "view",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 6
+ },
+ "_children": [
+ {
+ "__id__": 8
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 11
+ },
+ {
+ "__id__": 12
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1640,
+ "height": 842
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "9eRIVGEhpJO42gJ5SvCNdC"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "content",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 7
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 9
+ },
+ {
+ "__id__": 10
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1640,
+ "height": 320
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 1
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 421,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "d9nQ9q3mNGPZFRg1NqrE4V"
+ },
+ {
+ "__type__": "cc.Widget",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 8
+ },
+ "_enabled": false,
+ "alignMode": 1,
+ "_target": null,
+ "_alignFlags": 40,
+ "_left": 0,
+ "_right": 0,
+ "_top": 0,
+ "_bottom": 0,
+ "_verticalCenter": 0,
+ "_horizontalCenter": 0,
+ "_isAbsLeft": true,
+ "_isAbsRight": true,
+ "_isAbsTop": true,
+ "_isAbsBottom": true,
+ "_isAbsHorizontalCenter": true,
+ "_isAbsVerticalCenter": true,
+ "_originalWidth": 220,
+ "_originalHeight": 0,
+ "_id": "2cx31M6kNBoIWpBXkTv6pN"
+ },
+ {
+ "__type__": "cc.Layout",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 8
+ },
+ "_enabled": true,
+ "_layoutSize": {
+ "__type__": "cc.Size",
+ "width": 1640,
+ "height": 320
+ },
+ "_resize": 1,
+ "_N$layoutType": 3,
+ "_N$cellSize": {
+ "__type__": "cc.Size",
+ "width": 40,
+ "height": 40
+ },
+ "_N$startAxis": 0,
+ "_N$paddingLeft": 20.600000000000005,
+ "_N$paddingRight": 0,
+ "_N$paddingTop": 0,
+ "_N$paddingBottom": 0,
+ "_N$spacingX": 20.29999999999991,
+ "_N$spacingY": 12.1,
+ "_N$verticalDirection": 1,
+ "_N$horizontalDirection": 0,
+ "_N$affectedByScale": false,
+ "_id": "99ZnNIIfdGYr/767ja4ooN"
+ },
+ {
+ "__type__": "cc.Mask",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 7
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_spriteFrame": null,
+ "_type": 0,
+ "_segments": 64,
+ "_N$alphaThreshold": 0,
+ "_N$inverted": false,
+ "_id": "d4wX+fGepBfZD1O/ZwdLS/"
+ },
+ {
+ "__type__": "cc.Widget",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 7
+ },
+ "_enabled": true,
+ "alignMode": 1,
+ "_target": null,
+ "_alignFlags": 45,
+ "_left": 0,
+ "_right": 0,
+ "_top": 0,
+ "_bottom": 0,
+ "_verticalCenter": 0,
+ "_horizontalCenter": 0,
+ "_isAbsLeft": true,
+ "_isAbsRight": true,
+ "_isAbsTop": true,
+ "_isAbsBottom": true,
+ "_isAbsHorizontalCenter": true,
+ "_isAbsVerticalCenter": true,
+ "_originalWidth": 240,
+ "_originalHeight": 250,
+ "_id": "04MV38KkNMOJTgZa4rZGCq"
+ },
+ {
+ "__type__": "cc.ScrollView",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 6
+ },
+ "_enabled": true,
+ "horizontal": false,
+ "vertical": true,
+ "inertia": true,
+ "brake": 0.75,
+ "elastic": true,
+ "bounceDuration": 0.23,
+ "scrollEvents": [],
+ "cancelInnerEvents": true,
+ "_N$content": {
+ "__id__": 8
+ },
+ "content": {
+ "__id__": 8
+ },
+ "_N$horizontalScrollBar": null,
+ "_N$verticalScrollBar": null,
+ "_id": "21XrGITmFIT43jqDFm1qrS"
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 5
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "f195da9c-9b72-4765-9535-724d8383e63e"
+ },
+ "_type": 0,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": "c3cT/PBaxC0ZZTS52ZUc/N"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "New Node",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 2
+ },
+ "_children": [
+ {
+ "__id__": 16
+ },
+ {
+ "__id__": 19
+ },
+ {
+ "__id__": 21
+ }
+ ],
+ "_active": false,
+ "_components": [
+ {
+ "__id__": 23
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 0,
+ "height": 0
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -604,
+ -360,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "26IxrAxvRBVrHyCRuemUBH"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "New Label 1",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 15
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 17
+ },
+ {
+ "__id__": 18
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 370.72,
+ "height": 50.4
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 604,
+ 382.759,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "494GTFYuVOFbrphUpqC6i+"
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 16
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "Label11111111111111",
+ "_N$string": "Label11111111111111",
+ "_fontSize": 40,
+ "_lineHeight": 40,
+ "_enableWrapText": true,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 0,
+ "_N$cacheMode": 0,
+ "_id": "5fywE9ZIFIwoL3aVfbToXV"
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 16
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 1,
+ "_id": "78xYlbewlNLLHxNMl1XxY6"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "New Sprite(Splash)",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 15
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 20
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 111,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 0,
+ "b": 0,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 566,
+ "height": 390
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 599,
+ 315,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "858ZYoSARHuphYL/s4Mv57"
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 19
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+ },
+ "_type": 0,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": "8fTfPGcDBM0ZfrCw+RV5v7"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "New Label 2",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 15
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 22
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 364.82,
+ "height": 50.4
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 604,
+ 252.899,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "b4pcB5Ex9BXJu3XGzuzdEY"
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 21
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "Label222222222222",
+ "_N$string": "Label222222222222",
+ "_fontSize": 40,
+ "_lineHeight": 40,
+ "_enableWrapText": true,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 0,
+ "_N$cacheMode": 0,
+ "_id": "43/vGi4qtNsLH6IbKyAf3W"
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 15
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 0,
+ "_id": "1e8fFGET1F04qip5JDIKRJ"
+ },
+ {
+ "__type__": "cc.Canvas",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 2
+ },
+ "_enabled": true,
+ "_designResolution": {
+ "__type__": "cc.Size",
+ "width": 1920,
+ "height": 1080
+ },
+ "_fitWidth": false,
+ "_fitHeight": true,
+ "_id": "59Cd0ovbdF4byw5sbjJDx7"
+ },
+ {
+ "__type__": "cc.Widget",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 2
+ },
+ "_enabled": true,
+ "alignMode": 1,
+ "_target": null,
+ "_alignFlags": 45,
+ "_left": 0,
+ "_right": 0,
+ "_top": 0,
+ "_bottom": 0,
+ "_verticalCenter": 0,
+ "_horizontalCenter": 0,
+ "_isAbsLeft": true,
+ "_isAbsRight": true,
+ "_isAbsTop": true,
+ "_isAbsBottom": true,
+ "_isAbsHorizontalCenter": true,
+ "_isAbsVerticalCenter": true,
+ "_originalWidth": 0,
+ "_originalHeight": 0,
+ "_id": "29zXboiXFBKoIV4PQ2liTe"
+ },
+ {
+ "__type__": "66495YFVDxEp7II38SL3Oi4",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 2
+ },
+ "_enabled": true,
+ "listTestItemPrefab": {
+ "__uuid__": "5319446a-3497-48fc-99a7-9806589fd3c6"
+ },
+ "listContent": {
+ "__id__": 8
+ },
+ "flagSpriteFrames": [
+ {
+ "__uuid__": "9f408d81-d67e-4968-b885-0edece9785f3"
+ },
+ {
+ "__uuid__": "4528c934-0086-44da-8923-a956a624cb75"
+ },
+ {
+ "__uuid__": "5dde49b3-365a-4e01-b7a5-a079116b7d7c"
+ }
+ ],
+ "listItemMax": 200,
+ "_id": "d5tRWXNa5N4o4nSBt8t3SY"
+ }
+]
\ No newline at end of file
diff --git a/2.4.11/assets/test/scenes/test-scene-sorting.fire.meta b/2.4.11/assets/test/scenes/test-scene-sorting.fire.meta
new file mode 100644
index 0000000..30f8779
--- /dev/null
+++ b/2.4.11/assets/test/scenes/test-scene-sorting.fire.meta
@@ -0,0 +1,8 @@
+{
+ "ver": "1.3.2",
+ "uuid": "c6ba3258-b873-4d4f-b31a-60f4c79e523a",
+ "importer": "scene",
+ "asyncLoadAssets": false,
+ "autoReleaseAssets": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/scenes/test-scene.fire b/2.4.11/assets/test/scenes/test-scene.fire
new file mode 100644
index 0000000..e17ea51
--- /dev/null
+++ b/2.4.11/assets/test/scenes/test-scene.fire
@@ -0,0 +1,1124 @@
+[
+ {
+ "__type__": "cc.SceneAsset",
+ "_name": "",
+ "_objFlags": 0,
+ "_native": "",
+ "scene": {
+ "__id__": 1
+ }
+ },
+ {
+ "__type__": "cc.Scene",
+ "_objFlags": 0,
+ "_parent": null,
+ "_children": [
+ {
+ "__id__": 2
+ }
+ ],
+ "_active": false,
+ "_components": [],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 0,
+ "height": 0
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_is3DNode": true,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "autoReleaseAssets": false,
+ "_id": "6b1f9620-447d-4dcc-aeac-09aca68c29e7"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Canvas",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 1
+ },
+ "_children": [
+ {
+ "__id__": 3
+ },
+ {
+ "__id__": 5
+ },
+ {
+ "__id__": 15
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 24
+ },
+ {
+ "__id__": 25
+ },
+ {
+ "__id__": 26
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1920,
+ "height": 1080
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 960,
+ 540,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "a5esZu+45LA5mBpvttspPD"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "Main Camera",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 2
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 4
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1920,
+ "height": 1080
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "e1WoFrQ79G7r4ZuQE3HlNb"
+ },
+ {
+ "__type__": "cc.Camera",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 3
+ },
+ "_enabled": true,
+ "_cullingMask": 4294967295,
+ "_clearFlags": 7,
+ "_backgroundColor": {
+ "__type__": "cc.Color",
+ "r": 0,
+ "g": 0,
+ "b": 0,
+ "a": 255
+ },
+ "_depth": -1,
+ "_zoomRatio": 1,
+ "_targetTexture": null,
+ "_fov": 60,
+ "_orthoSize": 10,
+ "_nearClip": 1,
+ "_farClip": 4096,
+ "_ortho": true,
+ "_rect": {
+ "__type__": "cc.Rect",
+ "x": 0,
+ "y": 0,
+ "width": 1,
+ "height": 1
+ },
+ "_renderStages": 1,
+ "_alignWithScreen": true,
+ "_id": "81GN3uXINKVLeW4+iKSlim"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "List",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 2
+ },
+ "_children": [
+ {
+ "__id__": 6
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 14
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 192,
+ "b": 192,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1751,
+ "height": 941
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 4,
+ 3,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "dfGGBlUYVMGZyqbBExS14H"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "ScrollView",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 5
+ },
+ "_children": [
+ {
+ "__id__": 7
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 13
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1640,
+ "height": 842
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -2,
+ -1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "60PMaEcWNOuoy/lKCzNBeB"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "view",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 6
+ },
+ "_children": [
+ {
+ "__id__": 8
+ }
+ ],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 11
+ },
+ {
+ "__id__": 12
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1640,
+ "height": 842
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "9eRIVGEhpJO42gJ5SvCNdC"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "content",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 7
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 9
+ },
+ {
+ "__id__": 10
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1640,
+ "height": 320
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 1
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 0,
+ 421,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "d9nQ9q3mNGPZFRg1NqrE4V"
+ },
+ {
+ "__type__": "cc.Widget",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 8
+ },
+ "_enabled": false,
+ "alignMode": 1,
+ "_target": null,
+ "_alignFlags": 40,
+ "_left": 0,
+ "_right": 0,
+ "_top": 0,
+ "_bottom": 0,
+ "_verticalCenter": 0,
+ "_horizontalCenter": 0,
+ "_isAbsLeft": true,
+ "_isAbsRight": true,
+ "_isAbsTop": true,
+ "_isAbsBottom": true,
+ "_isAbsHorizontalCenter": true,
+ "_isAbsVerticalCenter": true,
+ "_originalWidth": 220,
+ "_originalHeight": 0,
+ "_id": "2cx31M6kNBoIWpBXkTv6pN"
+ },
+ {
+ "__type__": "cc.Layout",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 8
+ },
+ "_enabled": true,
+ "_layoutSize": {
+ "__type__": "cc.Size",
+ "width": 1640,
+ "height": 320
+ },
+ "_resize": 1,
+ "_N$layoutType": 3,
+ "_N$cellSize": {
+ "__type__": "cc.Size",
+ "width": 40,
+ "height": 40
+ },
+ "_N$startAxis": 0,
+ "_N$paddingLeft": 20.600000000000005,
+ "_N$paddingRight": 0,
+ "_N$paddingTop": 0,
+ "_N$paddingBottom": 0,
+ "_N$spacingX": 20.29999999999991,
+ "_N$spacingY": 12.1,
+ "_N$verticalDirection": 1,
+ "_N$horizontalDirection": 0,
+ "_N$affectedByScale": false,
+ "_id": "99ZnNIIfdGYr/767ja4ooN"
+ },
+ {
+ "__type__": "cc.Mask",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 7
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_spriteFrame": null,
+ "_type": 0,
+ "_segments": 64,
+ "_N$alphaThreshold": 0,
+ "_N$inverted": false,
+ "_id": "d4wX+fGepBfZD1O/ZwdLS/"
+ },
+ {
+ "__type__": "cc.Widget",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 7
+ },
+ "_enabled": true,
+ "alignMode": 1,
+ "_target": null,
+ "_alignFlags": 45,
+ "_left": 0,
+ "_right": 0,
+ "_top": 0,
+ "_bottom": 0,
+ "_verticalCenter": 0,
+ "_horizontalCenter": 0,
+ "_isAbsLeft": true,
+ "_isAbsRight": true,
+ "_isAbsTop": true,
+ "_isAbsBottom": true,
+ "_isAbsHorizontalCenter": true,
+ "_isAbsVerticalCenter": true,
+ "_originalWidth": 240,
+ "_originalHeight": 250,
+ "_id": "04MV38KkNMOJTgZa4rZGCq"
+ },
+ {
+ "__type__": "cc.ScrollView",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 6
+ },
+ "_enabled": true,
+ "horizontal": false,
+ "vertical": true,
+ "inertia": true,
+ "brake": 0.75,
+ "elastic": true,
+ "bounceDuration": 0.23,
+ "scrollEvents": [],
+ "cancelInnerEvents": true,
+ "_N$content": {
+ "__id__": 8
+ },
+ "content": {
+ "__id__": 8
+ },
+ "_N$horizontalScrollBar": null,
+ "_N$verticalScrollBar": null,
+ "_id": "21XrGITmFIT43jqDFm1qrS"
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 5
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "f195da9c-9b72-4765-9535-724d8383e63e"
+ },
+ "_type": 0,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": "c3cT/PBaxC0ZZTS52ZUc/N"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "New Node",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 2
+ },
+ "_children": [
+ {
+ "__id__": 16
+ },
+ {
+ "__id__": 19
+ },
+ {
+ "__id__": 21
+ }
+ ],
+ "_active": false,
+ "_components": [
+ {
+ "__id__": 23
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 0,
+ "height": 0
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ -604,
+ -360,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "26IxrAxvRBVrHyCRuemUBH"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "New Label 1",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 15
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 17
+ },
+ {
+ "__id__": 18
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 370.72,
+ "height": 50.4
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 604,
+ 382.759,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "494GTFYuVOFbrphUpqC6i+"
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 16
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "Label11111111111111",
+ "_N$string": "Label11111111111111",
+ "_fontSize": 40,
+ "_lineHeight": 40,
+ "_enableWrapText": true,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 0,
+ "_N$cacheMode": 0,
+ "_id": "5fywE9ZIFIwoL3aVfbToXV"
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 16
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 1,
+ "_id": "78xYlbewlNLLHxNMl1XxY6"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "New Sprite(Splash)",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 15
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 20
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 111,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 0,
+ "b": 0,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 566,
+ "height": 390
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 599,
+ 315,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "858ZYoSARHuphYL/s4Mv57"
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 19
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_spriteFrame": {
+ "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+ },
+ "_type": 0,
+ "_sizeMode": 0,
+ "_fillType": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_atlas": null,
+ "_id": "8fTfPGcDBM0ZfrCw+RV5v7"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "New Label 2",
+ "_objFlags": 0,
+ "_parent": {
+ "__id__": 15
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 22
+ }
+ ],
+ "_prefab": null,
+ "_opacity": 255,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 364.82,
+ "height": 50.4
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_trs": {
+ "__type__": "TypedArray",
+ "ctor": "Float64Array",
+ "array": [
+ 604,
+ 252.899,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "_eulerAngles": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_skewX": 0,
+ "_skewY": 0,
+ "_is3DNode": false,
+ "_groupIndex": 0,
+ "groupIndex": 0,
+ "_id": "b4pcB5Ex9BXJu3XGzuzdEY"
+ },
+ {
+ "__type__": "cc.Label",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 21
+ },
+ "_enabled": true,
+ "_materials": [
+ {
+ "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+ }
+ ],
+ "_srcBlendFactor": 770,
+ "_dstBlendFactor": 771,
+ "_string": "Label222222222222",
+ "_N$string": "Label222222222222",
+ "_fontSize": 40,
+ "_lineHeight": 40,
+ "_enableWrapText": true,
+ "_N$file": null,
+ "_isSystemFontUsed": true,
+ "_spacingX": 0,
+ "_batchAsBitmap": false,
+ "_styleFlags": 0,
+ "_underlineHeight": 0,
+ "_N$horizontalAlign": 1,
+ "_N$verticalAlign": 1,
+ "_N$fontFamily": "Arial",
+ "_N$overflow": 0,
+ "_N$cacheMode": 0,
+ "_id": "43/vGi4qtNsLH6IbKyAf3W"
+ },
+ {
+ "__type__": "ac8d9FmQixM06C+C9zdtS2i",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 15
+ },
+ "_enabled": true,
+ "_sortingLayer": 1,
+ "_orderInLayer": 0,
+ "_id": "1e8fFGET1F04qip5JDIKRJ"
+ },
+ {
+ "__type__": "cc.Canvas",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 2
+ },
+ "_enabled": true,
+ "_designResolution": {
+ "__type__": "cc.Size",
+ "width": 1920,
+ "height": 1080
+ },
+ "_fitWidth": false,
+ "_fitHeight": true,
+ "_id": "59Cd0ovbdF4byw5sbjJDx7"
+ },
+ {
+ "__type__": "cc.Widget",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 2
+ },
+ "_enabled": true,
+ "alignMode": 1,
+ "_target": null,
+ "_alignFlags": 45,
+ "_left": 0,
+ "_right": 0,
+ "_top": 0,
+ "_bottom": 0,
+ "_verticalCenter": 0,
+ "_horizontalCenter": 0,
+ "_isAbsLeft": true,
+ "_isAbsRight": true,
+ "_isAbsTop": true,
+ "_isAbsBottom": true,
+ "_isAbsHorizontalCenter": true,
+ "_isAbsVerticalCenter": true,
+ "_originalWidth": 0,
+ "_originalHeight": 0,
+ "_id": "29zXboiXFBKoIV4PQ2liTe"
+ },
+ {
+ "__type__": "66495YFVDxEp7II38SL3Oi4",
+ "_name": "",
+ "_objFlags": 0,
+ "node": {
+ "__id__": 2
+ },
+ "_enabled": true,
+ "listTestItemPrefab": {
+ "__uuid__": "77b9c6bb-79b1-4086-86fa-ac30b56d67cc"
+ },
+ "listContent": {
+ "__id__": 8
+ },
+ "flagSpriteFrames": [
+ {
+ "__uuid__": "9f408d81-d67e-4968-b885-0edece9785f3"
+ },
+ {
+ "__uuid__": "4528c934-0086-44da-8923-a956a624cb75"
+ },
+ {
+ "__uuid__": "5dde49b3-365a-4e01-b7a5-a079116b7d7c"
+ }
+ ],
+ "listItemMax": 200,
+ "_id": "d5tRWXNa5N4o4nSBt8t3SY"
+ }
+]
\ No newline at end of file
diff --git a/2.4.11/assets/test/scenes/test-scene.fire.meta b/2.4.11/assets/test/scenes/test-scene.fire.meta
new file mode 100644
index 0000000..231c7eb
--- /dev/null
+++ b/2.4.11/assets/test/scenes/test-scene.fire.meta
@@ -0,0 +1,8 @@
+{
+ "ver": "1.3.2",
+ "uuid": "6b1f9620-447d-4dcc-aeac-09aca68c29e7",
+ "importer": "scene",
+ "asyncLoadAssets": false,
+ "autoReleaseAssets": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/scripts.meta b/2.4.11/assets/test/scripts.meta
new file mode 100644
index 0000000..0767bcf
--- /dev/null
+++ b/2.4.11/assets/test/scripts.meta
@@ -0,0 +1,13 @@
+{
+ "ver": "1.1.3",
+ "uuid": "845ea615-d321-4ea5-ab0e-4c6292a58d18",
+ "importer": "folder",
+ "isBundle": false,
+ "bundleName": "",
+ "priority": 1,
+ "compressionType": {},
+ "optimizeHotUpdate": {},
+ "inlineSpriteFrames": {},
+ "isRemoteBundle": {},
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/scripts/list-test-item.ts b/2.4.11/assets/test/scripts/list-test-item.ts
new file mode 100644
index 0000000..7de33fc
--- /dev/null
+++ b/2.4.11/assets/test/scripts/list-test-item.ts
@@ -0,0 +1,43 @@
+// Learn TypeScript:
+// - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+// - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+// - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+export default class ListTestItem extends cc.Component {
+
+ @property({type: cc.Label})
+ rankText:cc.Label = null;
+
+ @property({type: cc.Label})
+ goldText:cc.Label = null;
+
+ @property({type: cc.Sprite})
+ flagImage:cc.Sprite = null;
+
+ @property({type: cc.Label})
+ levelText:cc.Label = null;
+
+ @property({type: cc.ProgressBar})
+ levelBar:cc.ProgressBar = null;
+
+ @property({type: cc.Label})
+ descText:cc.Label = null;
+
+ @property({type: cc.Node})
+ uiOpacity:cc.Node = null;
+
+ randomData(index:number, flagSpriteFrame:cc.SpriteFrame){
+ this.rankText.string = String(index);
+ this.goldText.string = String(Math.floor(1000 + Math.random()* 1000));
+ this.flagImage.spriteFrame = flagSpriteFrame;
+ this.levelText.string = `lv.${Math.floor(Math.random()* 100)}`;
+ this.levelBar.progress = Math.random();
+ this.descText.string = `什么也没留下 - ${index}`;
+ this.uiOpacity.opacity = 100 + Math.floor(Math.random() * 155);
+ }
+}
diff --git a/2.4.11/assets/test/scripts/list-test-item.ts.meta b/2.4.11/assets/test/scripts/list-test-item.ts.meta
new file mode 100644
index 0000000..26d7ec2
--- /dev/null
+++ b/2.4.11/assets/test/scripts/list-test-item.ts.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "9f5387d6-696a-4491-82ea-1a443403ed3c",
+ "importer": "typescript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/scripts/test-scene.ts b/2.4.11/assets/test/scripts/test-scene.ts
new file mode 100644
index 0000000..f0d8363
--- /dev/null
+++ b/2.4.11/assets/test/scripts/test-scene.ts
@@ -0,0 +1,28 @@
+import ListTestItem from "./list-test-item";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export class TestScene extends cc.Component {
+
+ @property({type:cc.Prefab})
+ listTestItemPrefab:cc.Prefab = null;
+
+ @property({type:cc.Node})
+ listContent:cc.Node = null;
+
+ @property({type:[cc.SpriteFrame]})
+ flagSpriteFrames:cc.SpriteFrame[] = [];
+
+ @property
+ listItemMax:number = 200;
+
+ start() {
+ for(let i = 0; i < this.listItemMax; i++){
+ let node = cc.instantiate(this.listTestItemPrefab);
+ node.parent = this.listContent;
+ let item = node.getComponent(ListTestItem);
+ item?.randomData(i + 1, this.flagSpriteFrames[Math.floor(Math.random() * this.flagSpriteFrames.length)])
+ }
+ }
+}
diff --git a/2.4.11/assets/test/scripts/test-scene.ts.meta b/2.4.11/assets/test/scripts/test-scene.ts.meta
new file mode 100644
index 0000000..7ad03e0
--- /dev/null
+++ b/2.4.11/assets/test/scripts/test-scene.ts.meta
@@ -0,0 +1,10 @@
+{
+ "ver": "1.1.0",
+ "uuid": "66495605-543c-44a7-b208-dfc48bdce8b8",
+ "importer": "typescript",
+ "isPlugin": false,
+ "loadPluginInWeb": true,
+ "loadPluginInNative": true,
+ "loadPluginInEditor": false,
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/textures.meta b/2.4.11/assets/test/textures.meta
new file mode 100644
index 0000000..450d25f
--- /dev/null
+++ b/2.4.11/assets/test/textures.meta
@@ -0,0 +1,13 @@
+{
+ "ver": "1.1.3",
+ "uuid": "0927e59d-b693-4ac2-9e53-0eeffbd0e543",
+ "importer": "folder",
+ "isBundle": false,
+ "bundleName": "",
+ "priority": 1,
+ "compressionType": {},
+ "optimizeHotUpdate": {},
+ "inlineSpriteFrames": {},
+ "isRemoteBundle": {},
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/textures/AutoAtlas.pac b/2.4.11/assets/test/textures/AutoAtlas.pac
new file mode 100644
index 0000000..56719c9
--- /dev/null
+++ b/2.4.11/assets/test/textures/AutoAtlas.pac
@@ -0,0 +1,3 @@
+{
+ "__type__": "cc.SpriteAtlas"
+}
\ No newline at end of file
diff --git a/2.4.11/assets/test/textures/AutoAtlas.pac.meta b/2.4.11/assets/test/textures/AutoAtlas.pac.meta
new file mode 100644
index 0000000..1d54ba5
--- /dev/null
+++ b/2.4.11/assets/test/textures/AutoAtlas.pac.meta
@@ -0,0 +1,23 @@
+{
+ "ver": "1.2.5",
+ "uuid": "42c27816-9000-4fb5-a99e-5aea6002d77b",
+ "importer": "auto-atlas",
+ "maxWidth": 1024,
+ "maxHeight": 1024,
+ "padding": 2,
+ "compressionLevel": 6,
+ "allowRotation": true,
+ "forceSquared": false,
+ "powerOfTwo": false,
+ "algorithm": "MaxRects",
+ "format": "png",
+ "quality": 80,
+ "contourBleed": true,
+ "paddingBleed": true,
+ "filterUnused": true,
+ "packable": false,
+ "premultiplyAlpha": false,
+ "filterMode": "bilinear",
+ "platformSettings": {},
+ "subMetas": {}
+}
\ No newline at end of file
diff --git a/assets/test/textures/box-1.png b/2.4.11/assets/test/textures/box-1.png
similarity index 100%
rename from assets/test/textures/box-1.png
rename to 2.4.11/assets/test/textures/box-1.png
diff --git a/2.4.11/assets/test/textures/box-1.png.meta b/2.4.11/assets/test/textures/box-1.png.meta
new file mode 100644
index 0000000..563e17b
--- /dev/null
+++ b/2.4.11/assets/test/textures/box-1.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "a095424e-cf6f-4be2-a7b1-34a3ccc2f2ec",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 105,
+ "height": 100,
+ "platformSettings": {},
+ "subMetas": {
+ "box-1": {
+ "ver": "1.0.6",
+ "uuid": "1e6042b1-be42-4958-aed1-1b837ad8b6ab",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "a095424e-cf6f-4be2-a7b1-34a3ccc2f2ec",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 105,
+ "height": 100,
+ "rawWidth": 105,
+ "rawHeight": 100,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/box-2.png b/2.4.11/assets/test/textures/box-2.png
similarity index 100%
rename from assets/test/textures/box-2.png
rename to 2.4.11/assets/test/textures/box-2.png
diff --git a/2.4.11/assets/test/textures/box-2.png.meta b/2.4.11/assets/test/textures/box-2.png.meta
new file mode 100644
index 0000000..779aa60
--- /dev/null
+++ b/2.4.11/assets/test/textures/box-2.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "3a1e47f2-e0c6-48af-8c8c-e48f9f95a7d5",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 171,
+ "height": 27,
+ "platformSettings": {},
+ "subMetas": {
+ "box-2": {
+ "ver": "1.0.6",
+ "uuid": "48a96f63-2eeb-4165-a0ca-654da41ec4ae",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "3a1e47f2-e0c6-48af-8c8c-e48f9f95a7d5",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 171,
+ "height": 27,
+ "rawWidth": 171,
+ "rawHeight": 27,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/box-3.png b/2.4.11/assets/test/textures/box-3.png
similarity index 100%
rename from assets/test/textures/box-3.png
rename to 2.4.11/assets/test/textures/box-3.png
diff --git a/2.4.11/assets/test/textures/box-3.png.meta b/2.4.11/assets/test/textures/box-3.png.meta
new file mode 100644
index 0000000..bbdedc0
--- /dev/null
+++ b/2.4.11/assets/test/textures/box-3.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "02a30094-7497-4650-81e0-0c49c1c28a2a",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 171,
+ "height": 27,
+ "platformSettings": {},
+ "subMetas": {
+ "box-3": {
+ "ver": "1.0.6",
+ "uuid": "6b84a7e0-d31a-42ab-90de-bb04c9ea0d2f",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "02a30094-7497-4650-81e0-0c49c1c28a2a",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 171,
+ "height": 27,
+ "rawWidth": 171,
+ "rawHeight": 27,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/box-4.png b/2.4.11/assets/test/textures/box-4.png
similarity index 100%
rename from assets/test/textures/box-4.png
rename to 2.4.11/assets/test/textures/box-4.png
diff --git a/2.4.11/assets/test/textures/box-4.png.meta b/2.4.11/assets/test/textures/box-4.png.meta
new file mode 100644
index 0000000..07fdeaa
--- /dev/null
+++ b/2.4.11/assets/test/textures/box-4.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "a218f909-f8aa-4325-9d22-af05af387299",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 240,
+ "height": 241,
+ "platformSettings": {},
+ "subMetas": {
+ "box-4": {
+ "ver": "1.0.6",
+ "uuid": "f122dcc2-a3bf-4eb3-a7a1-e93654669f51",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "a218f909-f8aa-4325-9d22-af05af387299",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0.5,
+ "offsetY": 0.5,
+ "trimX": 5,
+ "trimY": 5,
+ "width": 231,
+ "height": 230,
+ "rawWidth": 240,
+ "rawHeight": 241,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/box-5.png b/2.4.11/assets/test/textures/box-5.png
similarity index 100%
rename from assets/test/textures/box-5.png
rename to 2.4.11/assets/test/textures/box-5.png
diff --git a/2.4.11/assets/test/textures/box-5.png.meta b/2.4.11/assets/test/textures/box-5.png.meta
new file mode 100644
index 0000000..d369beb
--- /dev/null
+++ b/2.4.11/assets/test/textures/box-5.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "b77831b2-df3a-4606-9a8e-0423d0a664a5",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 240,
+ "height": 241,
+ "platformSettings": {},
+ "subMetas": {
+ "box-5": {
+ "ver": "1.0.6",
+ "uuid": "9b9dc23d-1001-44d7-9c36-a7d960f7a49d",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "b77831b2-df3a-4606-9a8e-0423d0a664a5",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0.5,
+ "offsetY": 0.5,
+ "trimX": 5,
+ "trimY": 5,
+ "width": 231,
+ "height": 230,
+ "rawWidth": 240,
+ "rawHeight": 241,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/box-6.png b/2.4.11/assets/test/textures/box-6.png
similarity index 100%
rename from assets/test/textures/box-6.png
rename to 2.4.11/assets/test/textures/box-6.png
diff --git a/2.4.11/assets/test/textures/box-6.png.meta b/2.4.11/assets/test/textures/box-6.png.meta
new file mode 100644
index 0000000..82604a8
--- /dev/null
+++ b/2.4.11/assets/test/textures/box-6.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "2f2e41cc-a8a8-4438-9ff2-014f9282ed06",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 70,
+ "height": 32,
+ "platformSettings": {},
+ "subMetas": {
+ "box-6": {
+ "ver": "1.0.6",
+ "uuid": "f195da9c-9b72-4765-9535-724d8383e63e",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "2f2e41cc-a8a8-4438-9ff2-014f9282ed06",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 70,
+ "height": 32,
+ "rawWidth": 70,
+ "rawHeight": 32,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/box-7.png b/2.4.11/assets/test/textures/box-7.png
similarity index 100%
rename from assets/test/textures/box-7.png
rename to 2.4.11/assets/test/textures/box-7.png
diff --git a/2.4.11/assets/test/textures/box-7.png.meta b/2.4.11/assets/test/textures/box-7.png.meta
new file mode 100644
index 0000000..5b637a7
--- /dev/null
+++ b/2.4.11/assets/test/textures/box-7.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "1fe24969-ad78-4ca9-b410-4ba370b3a890",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 63,
+ "height": 43,
+ "platformSettings": {},
+ "subMetas": {
+ "box-7": {
+ "ver": "1.0.6",
+ "uuid": "f625fa33-7315-4748-89a5-cf48448980c9",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "1fe24969-ad78-4ca9-b410-4ba370b3a890",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 63,
+ "height": 43,
+ "rawWidth": 63,
+ "rawHeight": 43,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/box-8.png b/2.4.11/assets/test/textures/box-8.png
similarity index 100%
rename from assets/test/textures/box-8.png
rename to 2.4.11/assets/test/textures/box-8.png
diff --git a/2.4.11/assets/test/textures/box-8.png.meta b/2.4.11/assets/test/textures/box-8.png.meta
new file mode 100644
index 0000000..700e577
--- /dev/null
+++ b/2.4.11/assets/test/textures/box-8.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "5849d769-7609-4f98-9510-fb88660f795a",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 64,
+ "height": 41,
+ "platformSettings": {},
+ "subMetas": {
+ "box-8": {
+ "ver": "1.0.6",
+ "uuid": "2e46e265-3945-4ae5-99d4-8f4eb56f391a",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "5849d769-7609-4f98-9510-fb88660f795a",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 64,
+ "height": 41,
+ "rawWidth": 64,
+ "rawHeight": 41,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/box-9.png b/2.4.11/assets/test/textures/box-9.png
similarity index 100%
rename from assets/test/textures/box-9.png
rename to 2.4.11/assets/test/textures/box-9.png
diff --git a/2.4.11/assets/test/textures/box-9.png.meta b/2.4.11/assets/test/textures/box-9.png.meta
new file mode 100644
index 0000000..2eaa69e
--- /dev/null
+++ b/2.4.11/assets/test/textures/box-9.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "240b0fb6-a282-4b50-881f-559e9d9363e4",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 63,
+ "height": 29,
+ "platformSettings": {},
+ "subMetas": {
+ "box-9": {
+ "ver": "1.0.6",
+ "uuid": "157e8a85-da38-415f-93f2-ccda0b947415",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "240b0fb6-a282-4b50-881f-559e9d9363e4",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 63,
+ "height": 29,
+ "rawWidth": 63,
+ "rawHeight": 29,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/btn-black.png b/2.4.11/assets/test/textures/btn-black.png
similarity index 100%
rename from assets/test/textures/btn-black.png
rename to 2.4.11/assets/test/textures/btn-black.png
diff --git a/2.4.11/assets/test/textures/btn-black.png.meta b/2.4.11/assets/test/textures/btn-black.png.meta
new file mode 100644
index 0000000..6feccdf
--- /dev/null
+++ b/2.4.11/assets/test/textures/btn-black.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "78813583-64ea-4df9-90dc-410129a1d07d",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 210,
+ "height": 80,
+ "platformSettings": {},
+ "subMetas": {
+ "btn-black": {
+ "ver": "1.0.6",
+ "uuid": "ea1039ee-663b-4557-be34-c1c9adf6a822",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "78813583-64ea-4df9-90dc-410129a1d07d",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 210,
+ "height": 80,
+ "rawWidth": 210,
+ "rawHeight": 80,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/btn-white-2.png b/2.4.11/assets/test/textures/btn-white-2.png
similarity index 100%
rename from assets/test/textures/btn-white-2.png
rename to 2.4.11/assets/test/textures/btn-white-2.png
diff --git a/2.4.11/assets/test/textures/btn-white-2.png.meta b/2.4.11/assets/test/textures/btn-white-2.png.meta
new file mode 100644
index 0000000..568107b
--- /dev/null
+++ b/2.4.11/assets/test/textures/btn-white-2.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "acd864b8-87e0-46c3-aaaa-d8585dd24570",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 68,
+ "height": 36,
+ "platformSettings": {},
+ "subMetas": {
+ "btn-white-2": {
+ "ver": "1.0.6",
+ "uuid": "f7af8780-666e-4912-b0f4-963319c0afb4",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "acd864b8-87e0-46c3-aaaa-d8585dd24570",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 68,
+ "height": 36,
+ "rawWidth": 68,
+ "rawHeight": 36,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/btn-white.png b/2.4.11/assets/test/textures/btn-white.png
similarity index 100%
rename from assets/test/textures/btn-white.png
rename to 2.4.11/assets/test/textures/btn-white.png
diff --git a/2.4.11/assets/test/textures/btn-white.png.meta b/2.4.11/assets/test/textures/btn-white.png.meta
new file mode 100644
index 0000000..8af4e15
--- /dev/null
+++ b/2.4.11/assets/test/textures/btn-white.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "954ea7ef-12bb-43aa-8077-ed7a567b460c",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 214,
+ "height": 84,
+ "platformSettings": {},
+ "subMetas": {
+ "btn-white": {
+ "ver": "1.0.6",
+ "uuid": "b8da036a-31c8-4ea9-8332-e33929b16e38",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "954ea7ef-12bb-43aa-8077-ed7a567b460c",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 1,
+ "trimY": 1,
+ "width": 212,
+ "height": 82,
+ "rawWidth": 214,
+ "rawHeight": 84,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/circle-countdown.png b/2.4.11/assets/test/textures/circle-countdown.png
similarity index 100%
rename from assets/test/textures/circle-countdown.png
rename to 2.4.11/assets/test/textures/circle-countdown.png
diff --git a/2.4.11/assets/test/textures/circle-countdown.png.meta b/2.4.11/assets/test/textures/circle-countdown.png.meta
new file mode 100644
index 0000000..e9b8421
--- /dev/null
+++ b/2.4.11/assets/test/textures/circle-countdown.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "ca4624dc-b082-4c76-871d-c96cb21fc8fd",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 249,
+ "height": 249,
+ "platformSettings": {},
+ "subMetas": {
+ "circle-countdown": {
+ "ver": "1.0.6",
+ "uuid": "097e1875-d5b0-43cc-8aad-64ae21d92aac",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "ca4624dc-b082-4c76-871d-c96cb21fc8fd",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 2,
+ "trimY": 2,
+ "width": 245,
+ "height": 245,
+ "rawWidth": 249,
+ "rawHeight": 249,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/flag-disconnection.png b/2.4.11/assets/test/textures/flag-disconnection.png
similarity index 100%
rename from assets/test/textures/flag-disconnection.png
rename to 2.4.11/assets/test/textures/flag-disconnection.png
diff --git a/2.4.11/assets/test/textures/flag-disconnection.png.meta b/2.4.11/assets/test/textures/flag-disconnection.png.meta
new file mode 100644
index 0000000..8df6a2f
--- /dev/null
+++ b/2.4.11/assets/test/textures/flag-disconnection.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "0e81c7eb-0241-43a9-b503-0f91db7e0f37",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 84,
+ "height": 84,
+ "platformSettings": {},
+ "subMetas": {
+ "flag-disconnection": {
+ "ver": "1.0.6",
+ "uuid": "9f408d81-d67e-4968-b885-0edece9785f3",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "0e81c7eb-0241-43a9-b503-0f91db7e0f37",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0.5,
+ "offsetY": 0,
+ "trimX": 2,
+ "trimY": 2,
+ "width": 81,
+ "height": 80,
+ "rawWidth": 84,
+ "rawHeight": 84,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/flag-eliminated.png b/2.4.11/assets/test/textures/flag-eliminated.png
similarity index 100%
rename from assets/test/textures/flag-eliminated.png
rename to 2.4.11/assets/test/textures/flag-eliminated.png
diff --git a/2.4.11/assets/test/textures/flag-eliminated.png.meta b/2.4.11/assets/test/textures/flag-eliminated.png.meta
new file mode 100644
index 0000000..60028c4
--- /dev/null
+++ b/2.4.11/assets/test/textures/flag-eliminated.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "d3490a01-c27e-4704-950f-dcd87a95d179",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 84,
+ "height": 84,
+ "platformSettings": {},
+ "subMetas": {
+ "flag-eliminated": {
+ "ver": "1.0.6",
+ "uuid": "4528c934-0086-44da-8923-a956a624cb75",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "d3490a01-c27e-4704-950f-dcd87a95d179",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0.5,
+ "offsetY": 0,
+ "trimX": 2,
+ "trimY": 2,
+ "width": 81,
+ "height": 80,
+ "rawWidth": 84,
+ "rawHeight": 84,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/flag-escape.png b/2.4.11/assets/test/textures/flag-escape.png
similarity index 100%
rename from assets/test/textures/flag-escape.png
rename to 2.4.11/assets/test/textures/flag-escape.png
diff --git a/2.4.11/assets/test/textures/flag-escape.png.meta b/2.4.11/assets/test/textures/flag-escape.png.meta
new file mode 100644
index 0000000..b3feb1c
--- /dev/null
+++ b/2.4.11/assets/test/textures/flag-escape.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "eaa9875d-572c-46ea-b275-f0bd36cc6697",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 84,
+ "height": 84,
+ "platformSettings": {},
+ "subMetas": {
+ "flag-escape": {
+ "ver": "1.0.6",
+ "uuid": "5dde49b3-365a-4e01-b7a5-a079116b7d7c",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "eaa9875d-572c-46ea-b275-f0bd36cc6697",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0.5,
+ "offsetY": 0,
+ "trimX": 2,
+ "trimY": 2,
+ "width": 81,
+ "height": 80,
+ "rawWidth": 84,
+ "rawHeight": 84,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/test/textures/gold.png b/2.4.11/assets/test/textures/gold.png
similarity index 100%
rename from assets/test/textures/gold.png
rename to 2.4.11/assets/test/textures/gold.png
diff --git a/2.4.11/assets/test/textures/gold.png.meta b/2.4.11/assets/test/textures/gold.png.meta
new file mode 100644
index 0000000..b5d1128
--- /dev/null
+++ b/2.4.11/assets/test/textures/gold.png.meta
@@ -0,0 +1,38 @@
+{
+ "ver": "2.3.7",
+ "uuid": "bc529642-594d-4486-aafb-bfd2d3edf02c",
+ "importer": "texture",
+ "type": "sprite",
+ "wrapMode": "clamp",
+ "filterMode": "bilinear",
+ "premultiplyAlpha": false,
+ "genMipmaps": false,
+ "packable": true,
+ "width": 60,
+ "height": 61,
+ "platformSettings": {},
+ "subMetas": {
+ "gold": {
+ "ver": "1.0.6",
+ "uuid": "f74c16b3-291b-41b4-8542-9b85fbca505b",
+ "importer": "sprite-frame",
+ "rawTextureUuid": "bc529642-594d-4486-aafb-bfd2d3edf02c",
+ "trimType": "auto",
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 60,
+ "height": 61,
+ "rawWidth": 60,
+ "rawHeight": 61,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "subMetas": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/2.4.11/creator.d.ts b/2.4.11/creator.d.ts
new file mode 100644
index 0000000..a8c47c9
--- /dev/null
+++ b/2.4.11/creator.d.ts
@@ -0,0 +1,32207 @@
+
+/** !#en
+The main namespace of Cocos2d-JS, all engine core classes, functions, properties and constants are defined in this namespace.
+!#zh
+Cocos 引擎的主要命名空间,引擎代码中所有的类,函数,属性和常量都在这个命名空间中定义。 */
+declare namespace cc {
+ /** The current version of Cocos2d being used. An interval action is an action that takes place within a certain period of time. These CCActionInterval actions have some interesting properties, like: For example, you can simulate a Ping Pong effect running the action normally and cc.TMXObjectGroupInfo contains the information about the object group like:
+ - group name
+ - group size
+ - group opacity at creation time (it can be modified at runtime)
+ - Whether the group is visible
+
+ This information is obtained from the TMX file. cc.TMXTilesetInfo contains the information about the tilesets like: cc.TMXMapInfo contains the information about the map like: And it also contains: This information is obtained from the TMX file.
+ ATTENTION: USE cc.director INSTEAD OF cc.Director.
+ cc.director also synchronizes timers with the refresh rate of the display.
+ 注意:用 cc.director 代替 cc.Director。
+ cc.director 也同步定时器与显示器的刷新速率。
+
+ Please DO NOT remove this String, it is an important flag for bug tracking.
+ If you post a bug to forum, please attach this flag. */
+ export var ENGINE_VERSION: string;
+ /**
+ !#en
+ Creates the speed action which changes the speed of an action, making it take longer (speed > 1)
+ or less (speed < 1) time.
+ Useful to simulate 'slow motion' or 'fast forward' effect.
+ !#zh 修改目标动作的速率。
+ @param action action
+ @param speed speed
+
+ @example
+ ```js
+ // change the target action speed;
+ var action = cc.scaleTo(0.2, 1, 0.6);
+ var newAction = cc.speed(action, 0.5);
+ ```
+ */
+ export function speed(action: ActionInterval, speed: number): Action;
+ /**
+ !#en Create a follow action which makes its target follows another node.
+ !#zh 追踪目标节点的位置。
+ @param followedNode followedNode
+ @param rect rect
+
+ @example
+ ```js
+ // example
+ // creates the action with a set boundary
+ var followAction = cc.follow(targetNode, cc.rect(0, 0, screenWidth * 2 - 100, screenHeight));
+ node.runAction(followAction);
+
+ // creates the action with no boundary set
+ var followAction = cc.follow(targetNode);
+ node.runAction(followAction);
+ ```
+ */
+ export function follow(followedNode: Node, rect: Rect): Action;
+ /**
+ !#en
+ Creates the action easing object with the rate parameter.
+ From slow to fast.
+ !#zh 创建 easeIn 缓动对象,由慢到快。
+ @param rate rate
+
+ @example
+ ```js
+ action.easing(cc.easeIn(3.0));
+ ```
+ */
+ export function easeIn(rate: number): any;
+ /**
+ !#en
+ Creates the action easing object with the rate parameter.
+ From fast to slow.
+ !#zh 创建 easeOut 缓动对象,由快到慢。
+ @param rate rate
+
+ @example
+ ```js
+ action.easing(cc.easeOut(3.0));
+ ```
+ */
+ export function easeOut(rate: number): any;
+ /**
+ !#en
+ Creates the action easing object with the rate parameter.
+ Slow to fast then to slow.
+ !#zh 创建 easeInOut 缓动对象,慢到快,然后慢。
+ @param rate rate
+
+ @example
+ ```js
+ action.easing(cc.easeInOut(3.0));
+ ```
+ */
+ export function easeInOut(rate: number): any;
+ /**
+ !#en
+ Creates the action easing object with the rate parameter.
+ Reference easeInExpo:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeExponentialIn 缓动对象。
+ EaseExponentialIn 是按指数函数缓动进入的动作。
+ 参考 easeInExpo:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ action.easing(cc.easeExponentialIn());
+ ```
+ */
+ export function easeExponentialIn(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeOutExpo:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeExponentialOut 缓动对象。
+ EaseExponentialOut 是按指数函数缓动退出的动作。
+ 参考 easeOutExpo:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ action.easing(cc.easeExponentialOut());
+ ```
+ */
+ export function easeExponentialOut(): any;
+ /**
+ !#en
+ Creates an EaseExponentialInOut action easing object.
+ Reference easeInOutExpo:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeExponentialInOut 缓动对象。
+ EaseExponentialInOut 是按指数函数缓动进入并退出的动作。
+ 参考 easeInOutExpo:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ action.easing(cc.easeExponentialInOut());
+ ```
+ */
+ export function easeExponentialInOut(): any;
+ /**
+ !#en
+ Creates an EaseSineIn action.
+ Reference easeInSine:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 EaseSineIn 缓动对象。
+ EaseSineIn 是按正弦函数缓动进入的动作。
+ 参考 easeInSine:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ action.easing(cc.easeSineIn());
+ ```
+ */
+ export function easeSineIn(): any;
+ /**
+ !#en
+ Creates an EaseSineOut action easing object.
+ Reference easeOutSine:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 EaseSineOut 缓动对象。
+ EaseSineIn 是按正弦函数缓动退出的动作。
+ 参考 easeOutSine:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ action.easing(cc.easeSineOut());
+ ```
+ */
+ export function easeSineOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInOutSine:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeSineInOut 缓动对象。
+ EaseSineIn 是按正弦函数缓动进入并退出的动作。
+ 参考 easeInOutSine:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ action.easing(cc.easeSineInOut());
+ ```
+ */
+ export function easeSineInOut(): any;
+ /**
+ !#en
+ Creates the action easing object with the period in radians (default is 0.3).
+ Reference easeInElastic:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeElasticIn 缓动对象。
+ EaseElasticIn 是按弹性曲线缓动进入的动作。
+ 参数 easeInElastic:http://www.zhihu.com/question/21981571/answer/19925418
+ @param period period
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeElasticIn(3.0));
+ ```
+ */
+ export function easeElasticIn(period: number): any;
+ /**
+ !#en
+ Creates the action easing object with the period in radians (default is 0.3).
+ Reference easeOutElastic:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeElasticOut 缓动对象。
+ EaseElasticOut 是按弹性曲线缓动退出的动作。
+ 参考 easeOutElastic:http://www.zhihu.com/question/21981571/answer/19925418
+ @param period period
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeElasticOut(3.0));
+ ```
+ */
+ export function easeElasticOut(period: number): any;
+ /**
+ !#en
+ Creates the action easing object with the period in radians (default is 0.3).
+ Reference easeInOutElastic:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeElasticInOut 缓动对象。
+ EaseElasticInOut 是按弹性曲线缓动进入并退出的动作。
+ 参考 easeInOutElastic:http://www.zhihu.com/question/21981571/answer/19925418
+ @param period period
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeElasticInOut(3.0));
+ ```
+ */
+ export function easeElasticInOut(period: number): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Eased bounce effect at the beginning.
+ !#zh
+ 创建 easeBounceIn 缓动对象。
+ EaseBounceIn 是按弹跳动作缓动进入的动作。
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeBounceIn());
+ ```
+ */
+ export function easeBounceIn(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Eased bounce effect at the ending.
+ !#zh
+ 创建 easeBounceOut 缓动对象。
+ EaseBounceOut 是按弹跳动作缓动退出的动作。
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeBounceOut());
+ ```
+ */
+ export function easeBounceOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Eased bounce effect at the begining and ending.
+ !#zh
+ 创建 easeBounceInOut 缓动对象。
+ EaseBounceInOut 是按弹跳动作缓动进入并退出的动作。
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeBounceInOut());
+ ```
+ */
+ export function easeBounceInOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ In the opposite direction to move slowly, and then accelerated to the right direction.
+ !#zh
+ 创建 easeBackIn 缓动对象。
+ easeBackIn 是在相反的方向缓慢移动,然后加速到正确的方向。
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeBackIn());
+ ```
+ */
+ export function easeBackIn(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Fast moving more than the finish, and then slowly back to the finish.
+ !#zh
+ 创建 easeBackOut 缓动对象。
+ easeBackOut 快速移动超出目标,然后慢慢回到目标点。
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeBackOut());
+ ```
+ */
+ export function easeBackOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Begining of cc.EaseBackIn. Ending of cc.EaseBackOut.
+ !#zh
+ 创建 easeBackInOut 缓动对象。
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeBackInOut());
+ ```
+ */
+ export function easeBackInOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Into the 4 reference point.
+ To calculate the motion curve.
+ !#zh
+ 创建 easeBezierAction 缓动对象。
+ EaseBezierAction 是按贝塞尔曲线缓动的动作。
+ @param p0 The first bezier parameter
+ @param p1 The second bezier parameter
+ @param p2 The third bezier parameter
+ @param p3 The fourth bezier parameter
+
+ @example
+ ```js
+ // example
+ action.easing(cc.easeBezierAction(0.5, 0.5, 1.0, 1.0));
+ ```
+ */
+ export function easeBezierAction(p0: number, p1: number, p2: number, p3: number): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInQuad:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeQuadraticActionIn 缓动对象。
+ EaseQuadraticIn是按二次函数缓动进入的动作。
+ 参考 easeInQuad:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeQuadraticActionIn());
+ ```
+ */
+ export function easeQuadraticActionIn(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeOutQuad:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeQuadraticActionOut 缓动对象。
+ EaseQuadraticOut 是按二次函数缓动退出的动作。
+ 参考 easeOutQuad:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeQuadraticActionOut());
+ ```
+ */
+ export function easeQuadraticActionOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInOutQuad:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeQuadraticActionInOut 缓动对象。
+ EaseQuadraticInOut 是按二次函数缓动进入并退出的动作。
+ 参考 easeInOutQuad:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeQuadraticActionInOut());
+ ```
+ */
+ export function easeQuadraticActionInOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeIntQuart:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeQuarticActionIn 缓动对象。
+ EaseQuarticIn 是按四次函数缓动进入的动作。
+ 参考 easeIntQuart:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeQuarticActionIn());
+ ```
+ */
+ export function easeQuarticActionIn(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeOutQuart:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeQuarticActionOut 缓动对象。
+ EaseQuarticOut 是按四次函数缓动退出的动作。
+ 参考 easeOutQuart:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.QuarticActionOut());
+ ```
+ */
+ export function easeQuarticActionOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInOutQuart:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeQuarticActionInOut 缓动对象。
+ EaseQuarticInOut 是按四次函数缓动进入并退出的动作。
+ 参考 easeInOutQuart:http://www.zhihu.com/question/21981571/answer/19925418
+ */
+ export function easeQuarticActionInOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInQuint:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeQuinticActionIn 缓动对象。
+ EaseQuinticIn 是按五次函数缓动进的动作。
+ 参考 easeInQuint:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeQuinticActionIn());
+ ```
+ */
+ export function easeQuinticActionIn(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeOutQuint:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeQuinticActionOut 缓动对象。
+ EaseQuinticOut 是按五次函数缓动退出的动作
+ 参考 easeOutQuint:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeQuadraticActionOut());
+ ```
+ */
+ export function easeQuinticActionOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInOutQuint:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeQuinticActionInOut 缓动对象。
+ EaseQuinticInOut是按五次函数缓动进入并退出的动作。
+ 参考 easeInOutQuint:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeQuinticActionInOut());
+ ```
+ */
+ export function easeQuinticActionInOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInCirc:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeCircleActionIn 缓动对象。
+ EaseCircleIn是按圆形曲线缓动进入的动作。
+ 参考 easeInCirc:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeCircleActionIn());
+ ```
+ */
+ export function easeCircleActionIn(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeOutCirc:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeCircleActionOut 缓动对象。
+ EaseCircleOut是按圆形曲线缓动退出的动作。
+ 参考 easeOutCirc:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ actioneasing(cc.easeCircleActionOut());
+ ```
+ */
+ export function easeCircleActionOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInOutCirc:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeCircleActionInOut 缓动对象。
+ EaseCircleInOut 是按圆形曲线缓动进入并退出的动作。
+ 参考 easeInOutCirc:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeCircleActionInOut());
+ ```
+ */
+ export function easeCircleActionInOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInCubic:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeCubicActionIn 缓动对象。
+ EaseCubicIn 是按三次函数缓动进入的动作。
+ 参考 easeInCubic:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeCubicActionIn());
+ ```
+ */
+ export function easeCubicActionIn(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeOutCubic:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeCubicActionOut 缓动对象。
+ EaseCubicOut 是按三次函数缓动退出的动作。
+ 参考 easeOutCubic:http://www.zhihu.com/question/21981571/answer/19925418
+
+ @example
+ ```js
+ //example
+ action.easing(cc.easeCubicActionOut());
+ ```
+ */
+ export function easeCubicActionOut(): any;
+ /**
+ !#en
+ Creates the action easing object.
+ Reference easeInOutCubic:
+ http://www.zhihu.com/question/21981571/answer/19925418
+ !#zh
+ 创建 easeCubicActionInOut 缓动对象。
+ EaseCubicInOut是按三次函数缓动进入并退出的动作。
+ 参考 easeInOutCubic:http://www.zhihu.com/question/21981571/answer/19925418
+ */
+ export function easeCubicActionInOut(): any;
+ /**
+ !#en
+ Helper constructor to create an array of sequenceable actions
+ The created action will run actions sequentially, one after another.
+ !#zh 顺序执行动作,创建的动作将按顺序依次运行。
+ @param actionOrActionArray actionOrActionArray
+ @param tempArray tempArray
+
+ @example
+ ```js
+ // example
+ // create sequence with actions
+ var seq = cc.sequence(act1, act2);
+
+ // create sequence with array
+ var seq = cc.sequence(actArray);
+ ```
+ */
+ export function sequence(actionOrActionArray: FiniteTimeAction|FiniteTimeAction[], ...tempArray: FiniteTimeAction[]): ActionInterval;
+ /**
+ !#en Creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30)
+ !#zh 重复动作,可以按一定次数重复一个动,如果想永远重复一个动作请使用 repeatForever 动作来完成。
+ @param action action
+ @param times times
+
+ @example
+ ```js
+ // example
+ var rep = cc.repeat(cc.sequence(jump2, jump1), 5);
+ ```
+ */
+ export function repeat(action: FiniteTimeAction, times: number): ActionInterval;
+ /**
+ !#en Create a acton which repeat forever, as it runs forever, it can't be added into cc.sequence and cc.spawn.
+ !#zh 永远地重复一个动作,有限次数内重复一个动作请使用 repeat 动作,由于这个动作不会停止,所以不能被添加到 cc.sequence 或 cc.spawn 中。
+ @param action action
+
+ @example
+ ```js
+ // example
+ var repeat = cc.repeatForever(cc.rotateBy(1.0, 360));
+ ```
+ */
+ export function repeatForever(action: FiniteTimeAction): ActionInterval;
+ /**
+ !#en Create a spawn action which runs several actions in parallel.
+ !#zh 同步执行动作,同步执行一组动作。
+ @param actionOrActionArray actionOrActionArray
+ @param tempArray tempArray
+
+ @example
+ ```js
+ // example
+ var action = cc.spawn(cc.jumpBy(2, cc.v2(300, 0), 50, 4), cc.rotateBy(2, 720));
+ todo: It should be the direct use new
+ ```
+ */
+ export function spawn(actionOrActionArray: FiniteTimeAction|FiniteTimeAction[], ...tempArray: FiniteTimeAction[]): FiniteTimeAction;
+ /**
+ !#en
+ Rotates a Node object to a certain angle by modifying its angle property.
+ The direction will be decided by the shortest angle.
+ !#zh 旋转到目标角度,通过逐帧修改它的 angle 属性,旋转方向将由最短的角度决定。
+ @param duration duration in seconds
+ @param dstAngle dstAngle in degrees.
+
+ @example
+ ```js
+ // example
+ var rotateTo = cc.rotateTo(2, 61.0);
+ ```
+ */
+ export function rotateTo(duration: number, dstAngle: number): ActionInterval;
+ /**
+ !#en
+ Rotates a Node object clockwise a number of degrees by modifying its angle property.
+ Relative to its properties to modify.
+ !#zh 旋转指定的角度。
+ @param duration duration in seconds
+ @param deltaAngle deltaAngle in degrees
+
+ @example
+ ```js
+ // example
+ var actionBy = cc.rotateBy(2, 360);
+ ```
+ */
+ export function rotateBy(duration: number, deltaAngle: number): ActionInterval;
+ /**
+ !#en
+ Moves a Node object x,y pixels by modifying its position property.
+ x and y are relative to the position of the object.
+ Several MoveBy actions can be concurrently called, and the resulting
+ movement will be the sum of individual movements.
+ !#zh 移动指定的距离。
+ @param duration duration in seconds
+ @param deltaPos deltaPos
+ @param deltaY deltaY
+
+ @example
+ ```js
+ // example
+ var actionTo = cc.moveBy(2, cc.v2(windowSize.width - 40, windowSize.height - 40));
+ ```
+ */
+ export function moveBy(duration: number, deltaPos: Vec2|number, deltaY?: number): ActionInterval;
+ /**
+ !#en
+ Moves a Node object to the position x,y. x and y are absolute coordinates by modifying its position property.
+ Several MoveTo actions can be concurrently called, and the resulting
+ movement will be the sum of individual movements.
+ !#zh 移动到目标位置。
+ @param duration duration in seconds
+ @param position position
+ @param y y
+
+ @example
+ ```js
+ // example
+ var actionBy = cc.moveTo(2, cc.v2(80, 80));
+ ```
+ */
+ export function moveTo(duration: number, position: Vec2|number, y?: number): ActionInterval;
+ /**
+ !#en
+ Create a action which skews a Node object to given angles by modifying its skewX and skewY properties.
+ Changes to the specified value.
+ !#zh 偏斜到目标角度。
+ @param t time in seconds
+ @param sx sx
+ @param sy sy
+
+ @example
+ ```js
+ // example
+ var actionTo = cc.skewTo(2, 37.2, -37.2);
+ ```
+ */
+ export function skewTo(t: number, sx: number, sy: number): ActionInterval;
+ /**
+ !#en
+ Skews a Node object by skewX and skewY degrees.
+ Relative to its property modification.
+ !#zh 偏斜指定的角度。
+ @param t time in seconds
+ @param sx sx skew in degrees for X axis
+ @param sy sy skew in degrees for Y axis
+
+ @example
+ ```js
+ // example
+ var actionBy = cc.skewBy(2, 0, -90);
+ ```
+ */
+ export function skewBy(t: number, sx: number, sy: number): ActionInterval;
+ /**
+ !#en
+ Moves a Node object simulating a parabolic jump movement by modifying it's position property.
+ Relative to its movement.
+ !#zh 用跳跃的方式移动指定的距离。
+ @param duration duration
+ @param position position
+ @param y y
+ @param height height
+ @param jumps jumps
+
+ @example
+ ```js
+ // example
+ var actionBy = cc.jumpBy(2, cc.v2(300, 0), 50, 4);
+ var actionBy = cc.jumpBy(2, 300, 0, 50, 4);
+ ```
+ */
+ export function jumpBy(duration: number, position: Vec2|number, y?: number, height?: number, jumps?: number): ActionInterval;
+ /**
+ !#en
+ Moves a Node object to a parabolic position simulating a jump movement by modifying its position property.
+ Jump to the specified location.
+ !#zh 用跳跃的方式移动到目标位置。
+ @param duration duration
+ @param position position
+ @param y y
+ @param height height
+ @param jumps jumps
+
+ @example
+ ```js
+ // example
+ var actionTo = cc.jumpTo(2, cc.v2(300, 300), 50, 4);
+ var actionTo = cc.jumpTo(2, 300, 300, 50, 4);
+ ```
+ */
+ export function jumpTo(duration: number, position: Vec2|number, y?: number, height?: number, jumps?: number): ActionInterval;
+ /**
+ !#en
+ An action that moves the target with a cubic Bezier curve by a certain distance.
+ Relative to its movement.
+ !#zh 按贝赛尔曲线轨迹移动指定的距离。
+ @param t time in seconds
+ @param c Array of points
+
+ @example
+ ```js
+ // example
+ var bezier = [cc.v2(0, windowSize.height / 2), cc.v2(300, -windowSize.height / 2), cc.v2(300, 100)];
+ var bezierForward = cc.bezierBy(3, bezier);
+ ```
+ */
+ export function bezierBy(t: number, c: Vec2[]): ActionInterval;
+ /**
+ !#en An action that moves the target with a cubic Bezier curve to a destination point.
+ !#zh 按贝赛尔曲线轨迹移动到目标位置。
+ @param t t
+ @param c Array of points
+
+ @example
+ ```js
+ // example
+ var bezier = [cc.v2(0, windowSize.height / 2), cc.v2(300, -windowSize.height / 2), cc.v2(300, 100)];
+ var bezierTo = cc.bezierTo(2, bezier);
+ ```
+ */
+ export function bezierTo(t: number, c: Vec2[]): ActionInterval;
+ /**
+ !#en Scales a Node object to a zoom factor by modifying it's scale property.
+ !#zh 将节点大小缩放到指定的倍数。
+ @param duration duration
+ @param sx scale parameter in X
+ @param sy scale parameter in Y, if Null equal to sx
+
+ @example
+ ```js
+ // example
+ // It scales to 0.5 in both X and Y.
+ var actionTo = cc.scaleTo(2, 0.5);
+
+ // It scales to 0.5 in x and 2 in Y
+ var actionTo = cc.scaleTo(2, 0.5, 2);
+ ```
+ */
+ export function scaleTo(duration: number, sx: number, sy?: number): ActionInterval;
+ /**
+ !#en
+ Scales a Node object a zoom factor by modifying it's scale property.
+ Relative to its changes.
+ !#zh 按指定的倍数缩放节点大小。
+ @param duration duration in seconds
+ @param sx sx scale parameter in X
+ @param sy sy scale parameter in Y, if Null equal to sx
+
+ @example
+ ```js
+ // example without sy, it scales by 2 both in X and Y
+ var actionBy = cc.scaleBy(2, 2);
+
+ //example with sy, it scales by 0.25 in X and 4.5 in Y
+ var actionBy2 = cc.scaleBy(2, 0.25, 4.5);
+ ```
+ */
+ export function scaleBy(duration: number, sx: number, sy?: number|void): ActionInterval;
+ /**
+ !#en Blinks a Node object by modifying it's visible property.
+ !#zh 闪烁(基于透明度)。
+ @param duration duration in seconds
+ @param blinks blinks in times
+
+ @example
+ ```js
+ // example
+ var action = cc.blink(2, 10);
+ ```
+ */
+ export function blink(duration: number, blinks: number): ActionInterval;
+ /**
+ !#en
+ Fades an object that implements the cc.RGBAProtocol protocol.
+ It modifies the opacity from the current value to a custom one.
+ !#zh 修改透明度到指定值。
+ @param duration duration
+ @param opacity 0-255, 0 is transparent
+
+ @example
+ ```js
+ // example
+ var action = cc.fadeTo(1.0, 0);
+ ```
+ */
+ export function fadeTo(duration: number, opacity: number): ActionInterval;
+ /**
+ !#en Fades In an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from 0 to 255.
+ !#zh 渐显效果。
+ @param duration duration in seconds
+
+ @example
+ ```js
+ //example
+ var action = cc.fadeIn(1.0);
+ ```
+ */
+ export function fadeIn(duration: number): ActionInterval;
+ /**
+ !#en Fades Out an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from 255 to 0.
+ !#zh 渐隐效果。
+ @param d duration in seconds
+
+ @example
+ ```js
+ // example
+ var action = cc.fadeOut(1.0);
+ ```
+ */
+ export function fadeOut(d: number): ActionInterval;
+ /**
+ !#en Tints a Node that implements the cc.NodeRGB protocol from current tint to a custom one.
+ !#zh 修改颜色到指定值。
+ @param duration duration
+ @param red 0-255
+ @param green 0-255
+ @param blue 0-255
+
+ @example
+ ```js
+ // example
+ var action = cc.tintTo(2, 255, 0, 255);
+ ```
+ */
+ export function tintTo(duration: number, red: number, green: number, blue: number): ActionInterval;
+ /**
+ !#en
+ Tints a Node that implements the cc.NodeRGB protocol from current tint to a custom one.
+ Relative to their own color change.
+ !#zh 按照指定的增量修改颜色。
+ @param duration duration in seconds
+ @param deltaRed deltaRed
+ @param deltaGreen deltaGreen
+ @param deltaBlue deltaBlue
+
+ @example
+ ```js
+ // example
+ var action = cc.tintBy(2, -127, -255, -127);
+ ```
+ */
+ export function tintBy(duration: number, deltaRed: number, deltaGreen: number, deltaBlue: number): ActionInterval;
+ /**
+ !#en Delays the action a certain amount of seconds.
+ !#zh 延迟指定的时间量。
+ @param d duration in seconds
+
+ @example
+ ```js
+ // example
+ var delay = cc.delayTime(1);
+ ```
+ */
+ export function delayTime(d: number): ActionInterval;
+ /**
+ !#en Executes an action in reverse order, from time=duration to time=0.
+ !#zh 反转目标动作的时间轴。
+ @param action action
+
+ @example
+ ```js
+ // example
+ var reverse = cc.reverseTime(this);
+ ```
+ */
+ export function reverseTime(action: FiniteTimeAction): ActionInterval;
+ /**
+ !#en Create an action with the specified action and forced target.
+ !#zh 用已有动作和一个新的目标节点创建动作。
+ @param target target
+ @param action action
+ */
+ export function targetedAction(target: Node, action: FiniteTimeAction): ActionInterval;
+ /**
+ Points setter
+ @param points points
+ */
+ export function setPoints(points: any[]): void;
+ /**
+ !#en Creates an action with a Cardinal Spline array of points and tension.
+ !#zh 按基数样条曲线轨迹移动到目标位置。
+ @param duration duration
+ @param points array of control points
+ @param tension tension
+
+ @example
+ ```js
+ //create a cc.CardinalSplineTo
+ var action1 = cc.cardinalSplineTo(3, array, 0);
+ ```
+ */
+ export function cardinalSplineTo(duration: number, points: any[], tension: number): ActionInterval;
+ /**
+ update position of target
+ @param newPos newPos
+ */
+ export function updatePosition(newPos: Vec2): void;
+ /**
+ !#en Creates an action with a Cardinal Spline array of points and tension.
+ !#zh 按基数样条曲线轨迹移动指定的距离。
+ @param duration duration
+ @param points points
+ @param tension tension
+ */
+ export function cardinalSplineBy(duration: number, points: any[], tension: number): ActionInterval;
+ /**
+ !#en Creates an action with a Cardinal Spline array of points and tension.
+ !#zh 按 Catmull Rom 样条曲线轨迹移动到目标位置。
+ @param dt dt
+ @param points points
+
+ @example
+ ```js
+ var action1 = cc.catmullRomTo(3, array);
+ ```
+ */
+ export function catmullRomTo(dt: number, points: any[]): ActionInterval;
+ /**
+ !#en Creates an action with a Cardinal Spline array of points and tension.
+ !#zh 按 Catmull Rom 样条曲线轨迹移动指定的距离。
+ @param dt dt
+ @param points points
+
+ @example
+ ```js
+ var action1 = cc.catmullRomBy(3, array);
+ ```
+ */
+ export function catmullRomBy(dt: number, points: any[]): ActionInterval;
+ /**
+ !#en Show the Node.
+ !#zh 立即显示。
+
+ @example
+ ```js
+ // example
+ var showAction = cc.show();
+ ```
+ */
+ export function show(): ActionInstant;
+ /**
+ !#en Hide the node.
+ !#zh 立即隐藏。
+
+ @example
+ ```js
+ // example
+ var hideAction = cc.hide();
+ ```
+ */
+ export function hide(): ActionInstant;
+ /**
+ !#en Toggles the visibility of a node.
+ !#zh 显隐状态切换。
+
+ @example
+ ```js
+ // example
+ var toggleVisibilityAction = cc.toggleVisibility();
+ ```
+ */
+ export function toggleVisibility(): ActionInstant;
+ /**
+ !#en Create a RemoveSelf object with a flag indicate whether the target should be cleaned up while removing.
+ !#zh 从父节点移除自身。
+ @param isNeedCleanUp isNeedCleanUp
+
+ @example
+ ```js
+ // example
+ var removeSelfAction = cc.removeSelf();
+ ```
+ */
+ export function removeSelf(isNeedCleanUp ?: boolean): ActionInstant;
+ /**
+ !#en Destroy self
+ !#zh 创建一个销毁自身的动作。
+
+ @example
+ ```js
+ var destroySelfAction = cc.destroySelf();
+ ```
+ */
+ export function destroySelf(): ActionInstant;
+ /**
+ !#en Create a FlipX action to flip or unflip the target.
+ !#zh X轴翻转。
+ @param flip Indicate whether the target should be flipped or not
+
+ @example
+ ```js
+ var flipXAction = cc.flipX(true);
+ ```
+ */
+ export function flipX(flip: boolean): ActionInstant;
+ /**
+ !#en Create a FlipY action to flip or unflip the target.
+ !#zh Y轴翻转。
+ @param flip flip
+
+ @example
+ ```js
+ var flipYAction = cc.flipY(true);
+ ```
+ */
+ export function flipY(flip: boolean): ActionInstant;
+ /**
+ !#en Creates a Place action with a position.
+ !#zh 放置在目标位置。
+ @param pos pos
+ @param y y
+
+ @example
+ ```js
+ // example
+ var placeAction = cc.place(cc.v2(200, 200));
+ var placeAction = cc.place(200, 200);
+ ```
+ */
+ export function place(pos: Vec2|number, y?: number): ActionInstant;
+ /**
+ !#en Creates the action with the callback.
+ !#zh 执行回调函数。
+ @param selector selector
+ @param selectorTarget selectorTarget
+ @param data data for function, it accepts all data types.
+
+ @example
+ ```js
+ // example
+ // CallFunc without data
+ var finish = cc.callFunc(this.removeSprite, this);
+
+ // CallFunc with data
+ var finish = cc.callFunc(this.removeFromParentAndCleanup, this._grossini, true);
+ ```
+ */
+ export function callFunc(selector: Function, selectorTarget?: any, data?: any): ActionInstant;
+ /**
+
+ @param target the target to animate
+ */
+ export function tween
+ - In Cocos Creator, error is red.
+ - In Chrome, error have a red icon along with red message text.
+ !#zh
+ 输出错误消息到 Cocos Creator 编辑器的 Console 或运行时页面端的 Console 中。
+ - 在 Cocos Creator 中,错误信息显示是红色的。
+ - 在 Chrome 中,错误信息有红色的图标以及红色的消息文本。
+ @param msg A JavaScript string containing zero or more substitution strings.
+ @param subst JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.
+ */
+ export function error(msg: any, ...subst: any[]): void;
+ /**
+ !#en
+ Outputs a warning message to the Cocos Creator Console (editor) or Web Console (runtime).
+ - In Cocos Creator, warning is yellow.
+ - In Chrome, warning have a yellow warning icon with the message text.
+ !#zh
+ 输出警告消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。
+ - 在 Cocos Creator 中,警告信息显示是黄色的。
+ - 在 Chrome 中,警告信息有着黄色的图标以及黄色的消息文本。
+ @param msg A JavaScript string containing zero or more substitution strings.
+ @param subst JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.
+ */
+ export function warn(msg: any, ...subst: any[]): void;
+ /**
+ !#en Outputs a message to the Cocos Creator Console (editor) or Web Console (runtime).
+ !#zh 输出一条消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。
+ @param msg A JavaScript string containing zero or more substitution strings.
+ @param subst JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.
+ */
+ export function log(msg: string|any, ...subst: any[]): void;
+ /** !#en Director
+ !#zh 导演类。 */
+ export var director: Director;
+ /** !#en This is a Game instance.
+ !#zh 这是一个 Game 类的实例,包含游戏主体信息并负责驱动游戏的游戏对象。。 */
+ export var game: Game;
+ /**
+ !#en
+ Rotates a Node object to a certain angle by modifying its quternion property.
+ The direction will be decided by the shortest angle.
+ !#zh 旋转到目标角度,通过逐帧修改它的 quternion 属性,旋转方向将由最短的角度决定。
+ @param duration duration in seconds
+ @param dstAngleX dstAngleX in degrees.
+ @param dstAngleY dstAngleY in degrees.
+ @param dstAngleZ dstAngleZ in degrees.
+
+ @example
+ ```js
+ // example
+ var rotate3DTo = cc.rotate3DTo(2, cc.v3(0, 180, 0));
+ ```
+ */
+ export function rotate3DTo(duration: number, dstAngleX: number|Vec3|Quat, dstAngleY?: number, dstAngleZ?: number): ActionInterval;
+ /**
+ !#en
+ Rotates a Node object counter clockwise a number of degrees by modifying its quaternion property.
+ Relative to its properties to modify.
+ !#zh 旋转指定的 3D 角度。
+ @param duration duration in seconds
+ @param deltaAngleX deltaAngleX in degrees
+ @param deltaAngleY deltaAngleY in degrees
+ @param deltaAngleZ deltaAngleZ in degrees
+
+ @example
+ ```js
+ // example
+ var actionBy = cc.rotate3DBy(2, cc.v3(0, 360, 0));
+ ```
+ */
+ export function rotate3DBy(duration: number, deltaAngleX: number|Vec3, deltaAngleY?: number, deltaAngleZ?: number): ActionInterval;
+ /** !#en The System event singleton for global usage
+ !#zh 系统事件单例,方便全局使用 */
+ export var systemEvent: SystemEvent;
+ export var assetManager: AssetManager;
+ /** !#en
+ cc.resources is a bundle and controls all asset under assets/resources
+
+ !#zh
+ cc.resources 是一个 bundle,用于管理所有在 assets/resources 下的资源 */
+ export var resources: AssetManager.Bundle;
+ /**
+ !#en Defines a CCClass using the given specification, please see [Class](/docs/editors_and_tools/creator-chapters/scripting/class.html) for details.
+ !#zh 定义一个 CCClass,传入参数必须是一个包含类型参数的字面量对象,具体用法请查阅[类型定义](/docs/creator/scripting/class.html)。
+ @param options options
+
+ @example
+ ```js
+ // define base class
+ var Node = cc.Class();
+
+ // define sub class
+ var Sprite = cc.Class({
+ name: 'Sprite',
+ extends: Node,
+
+ ctor: function () {
+ this.url = "";
+ this.id = 0;
+ },
+
+ statics: {
+ // define static members
+ count: 0,
+ getBounds: function (spriteList) {
+ // compute bounds...
+ }
+ },
+
+ properties {
+ width: {
+ default: 128,
+ type: cc.Integer,
+ tooltip: 'The width of sprite'
+ },
+ height: 128,
+ size: {
+ get: function () {
+ return cc.v2(this.width, this.height);
+ }
+ }
+ },
+
+ load: function () {
+ // load this.url...
+ };
+ });
+
+ // instantiate
+
+ var obj = new Sprite();
+ obj.url = 'sprite.png';
+ obj.load();
+ ```
+ */
+ export function Class(options?: {name?: string; extends?: Function; ctor?: Function; __ctor__?: Function; properties?: any; statics?: any; mixins?: Function[]; editor?: {executeInEditMode?: boolean; requireComponent?: Function; menu?: string; executionOrder?: number; disallowMultiple?: boolean; playOnFocus?: boolean; inspector?: string; icon?: string; help?: string; }; update?: Function; lateUpdate?: Function; onLoad?: Function; start?: Function; onEnable?: Function; onDisable?: Function; onDestroy?: Function; onFocusInEditor?: Function; onLostFocusInEditor?: Function; resetInEditor?: Function; onRestore?: Function; _getLocalBounds?: Function; }): Function;
+ /**
+ !#en
+ Define an enum type.
+ If a enum item has a value of -1, it will be given an Integer number according to it's order in the list.
+ Otherwise it will use the value specified by user who writes the enum definition.
+
+ !#zh
+ 定义一个枚举类型。
+ 用户可以把枚举值设为任意的整数,如果设为 -1,系统将会分配为上一个枚举值 + 1。
+ @param obj a JavaScript literal object containing enum names and values, or a TypeScript enum type
+
+ @example
+ ```js
+ // JavaScript:
+
+ var WrapMode = cc.Enum({
+ Repeat: -1,
+ Clamp: -1
+ });
+
+ // Texture.WrapMode.Repeat == 0
+ // Texture.WrapMode.Clamp == 1
+ // Texture.WrapMode[0] == "Repeat"
+ // Texture.WrapMode[1] == "Clamp"
+
+ var FlagType = cc.Enum({
+ Flag1: 1,
+ Flag2: 2,
+ Flag3: 4,
+ Flag4: 8,
+ });
+
+ var AtlasSizeList = cc.Enum({
+ 128: 128,
+ 256: 256,
+ 512: 512,
+ 1024: 1024,
+ });
+
+ // TypeScript:
+
+ // If used in TypeScript, just define a TypeScript enum:
+ enum Direction {
+ Up,
+ Down,
+ Left,
+ Right
+ }
+
+ // If you need to inspect the enum in Properties panel, you can call cc.Enum:
+ const {ccclass, property} = cc._decorator;
+
+ @ccclass
+ class NewScript extends cc.Component {
+ @property({
+ type: cc.Enum(Direction) // call cc.Enum
+ })
+ direction: Direction = Direction.Up;
+ }
+
+ ```
+ */
+ export function Enum
+ When an object's `destroy` is called, it is actually destroyed after the end of this frame.
+ So `isValid` will return false from the next frame, while `isValid` in the current frame will still be true.
+ If you want to determine whether the current frame has called `destroy`, use `cc.isValid(obj, true)`,
+ but this is often caused by a particular logical requirements, which is not normally required.
+
+ !#zh
+ 检查该对象是否不为 null 并且尚未销毁。
+ 当一个对象的 `destroy` 调用以后,会在这一帧结束后才真正销毁。因此从下一帧开始 `isValid` 就会返回 false,而当前帧内 `isValid` 仍然会是 true。如果希望判断当前帧是否调用过 `destroy`,请使用 `cc.isValid(obj, true)`,不过这往往是特殊的业务需求引起的,通常情况下不需要这样。
+ @param value value
+ @param strictMode If true, Object called destroy() in this frame will also treated as invalid.
+
+ @example
+ ```js
+ var node = new cc.Node();
+ cc.log(cc.isValid(node)); // true
+ node.destroy();
+ cc.log(cc.isValid(node)); // true, still valid in this frame
+ // after a frame...
+ cc.log(cc.isValid(node)); // false, destroyed in the end of last frame
+ ```
+ */
+ export function isValid(value: any, strictMode?: boolean): boolean;
+ /** !#en cc.view is the shared view object.
+ !#zh cc.view 是全局的视图对象。 */
+ export var view: View;
+ /** !#en cc.winSize is the alias object for the size of the current game window.
+ !#zh cc.winSize 为当前的游戏窗口的大小。 */
+ export var winSize: Size;
+ /** Specify that the input value must be integer in Inspector.
+ Also used to indicates that the elements in array should be type integer. */
+ export var Integer: string;
+ /** Indicates that the elements in array should be type double. */
+ export var Float: string;
+ /** Indicates that the elements in array should be type boolean. */
+ export var Boolean: string;
+ /** Indicates that the elements in array should be type string. */
+ export var String: string;
+ /**
+ !#en Deserialize json to cc.Asset
+ !#zh 将 JSON 反序列化为对象实例。
+ @param data the serialized cc.Asset json string or json object.
+ @param details additional loading result
+ @param options options
+ */
+ export function deserialize(data: string|any, details?: Details, options?: any): any;
+ /**
+ !#en Clones the object `original` and returns the clone, or instantiate a node from the Prefab.
+ !#zh 克隆指定的任意类型的对象,或者从 Prefab 实例化出新节点。
+
+ (Instantiate 时,function 和 dom 等非可序列化对象会直接保留原有引用,Asset 会直接进行浅拷贝,可序列化类型会进行深拷贝。)
+ @param original An existing object that you want to make a copy of.
+
+ @example
+ ```js
+ // instantiate node from prefab
+ var scene = cc.director.getScene();
+ var node = cc.instantiate(prefabAsset);
+ node.parent = scene;
+ // clone node
+ var scene = cc.director.getScene();
+ var node = cc.instantiate(targetNode);
+ node.parent = scene;
+ ```
+ */
+ export function instantiate(original: Prefab): Node;
+ export function instantiate
+ Please use cc.p or cc.v2 instead, it will soon replace cc.Size.
+ !#zh
+ 创建一个 cc.Size 对象的帮助函数。
+ 注意:可以使用 cc.p 或者是 cc.v2 代替,它们将很快取代 cc.Size。
+ @param w width or a size object
+ @param h height
+
+ @example
+ ```js
+ var size1 = cc.size();
+ var size2 = cc.size(100,100);
+ var size3 = cc.size(size2);
+ var size4 = cc.size({width: 100, height: 100});
+
+ ```
+ */
+ export function size(w: number|Size, h?: number): Size;
+ export var EPSILON: number;
+ /**
+ Clamps a value between a minimum float and maximum float value.
+ @param val val
+ @param min min
+ @param max max
+ */
+ export function clamp(val: number, min: number, max: number): number;
+ /**
+ Clamps a value between 0 and 1.
+ @param val val
+ */
+ export function clamp01(val: number): number;
+ /**
+
+ @param from from
+ @param to to
+ @param ratio the interpolation coefficient
+ */
+ export function lerp(from: number, to: number, ratio: number): number;
+ export function random(): void;
+ /**
+ Returns a floating-point random number between min (inclusive) and max (exclusive).
+ @param min min
+ @param max max
+ */
+ export function randomRange(min: number, max: number): number;
+ /**
+ Returns a random integer between min (inclusive) and max (exclusive).
+ @param min min
+ @param max max
+ */
+ export function randomRangeInt(min: number, max: number): number;
+ /**
+ Linear congruential generator using Hull-Dobell Theorem.
+ @param seed the random seed
+ */
+ export function pseudoRandom(seed: number): number;
+ /**
+ Returns a floating-point pseudo-random number between min (inclusive) and max (exclusive).
+ @param seed seed
+ @param min min
+ @param max max
+ */
+ export function pseudoRandomRange(seed: number, min: number, max: number): number;
+ /**
+ Returns a pseudo-random integer between min (inclusive) and max (exclusive).
+ @param seed seed
+ @param min min
+ @param max max
+ */
+ export function pseudoRandomRangeInt(seed: number, min: number, max: number): number;
+ /**
+ Returns the next power of two for the value
+ @param val val
+ */
+ export function nextPow2(val: number): number;
+ /**
+ Returns float remainder for t / length
+ @param t time start at 0
+ @param length time of one cycle
+ */
+ export function repeat(t: number, length: number): number;
+ /**
+ Returns time wrapped in ping-pong mode
+ @param t time start at 0
+ @param length time of one cycle
+ */
+ export function repeat(t: number, length: number): number;
+ /**
+ Returns ratio of a value within a given range
+ @param from start value
+ @param to end value
+ @param value given value
+ */
+ export function repeat(from: number, to: number, value: number): number;
+ /**
+ Returns -1, 0, +1 depending on sign of x.
+ @param v v
+ */
+ export function sign(v: number): void;
+ /**
+ !#en The convenience method to create a new {{#crossLink "Vec2"}}cc.Vec2{{/crossLink}}.
+ !#zh 通过该简便的函数进行创建 {{#crossLink "Vec2"}}cc.Vec2{{/crossLink}} 对象。
+ @param x x
+ @param y y
+
+ @example
+ ```js
+ var v1 = cc.v2();
+ var v2 = cc.v2(0, 0);
+ var v3 = cc.v2(v2);
+ var v4 = cc.v2({x: 100, y: 100});
+ ```
+ */
+ export function v2(x?: number|any, y?: number): Vec2;
+ /**
+ !#en The convenience method to create a new {{#crossLink "Vec3"}}cc.Vec3{{/crossLink}}.
+ !#zh 通过该简便的函数进行创建 {{#crossLink "Vec3"}}cc.Vec3{{/crossLink}} 对象。
+ @param x x
+ @param y y
+ @param z z
+
+ @example
+ ```js
+ var v1 = cc.v3();
+ var v2 = cc.v3(0, 0, 0);
+ var v3 = cc.v3(v2);
+ var v4 = cc.v3({x: 100, y: 100, z: 0});
+ ```
+ */
+ export function v3(x?: number|any, y?: number, z?: number): Vec3;
+ /**
+ Finds a node by hierarchy path, the path is case-sensitive.
+ It will traverse the hierarchy by splitting the path using '/' character.
+ This function will still returns the node even if it is inactive.
+ It is recommended to not use this function every frame instead cache the result at startup.
+ @param path path
+ @param referenceNode referenceNode
+ */
+ export function find(path: string, referenceNode?: Node): Node;
+ export var dynamicAtlasManager: DynamicAtlasManager;
+ /** !#en The matrix storage */
+ export var matrix: any[];
+ /**
+ !#en Get an element
+ @param i i
+ @param j j
+ */
+ export function get(i: number, j: number): number;
+ /**
+ !#en Set an element
+ @param i i
+ @param j j
+ @param value value
+ */
+ export function set(i: number, j: number, value: boolean): void;
+ /**
+ !#en Sets all elements to zero
+ */
+ export function reset(): void;
+ /** !#en Base class cc.Action for action classes.
+ !#zh Action 类是所有动作类型的基类。 */
+ export class Action {
+ /**
+ !#en
+ to copy object with deep copy.
+ returns a clone of action.
+ !#zh 返回一个克隆的动作。
+ */
+ clone(): Action;
+ /**
+ !#en
+ return true if the action has finished.
+ !#zh 如果动作已完成就返回 true。
+ */
+ isDone(): boolean;
+ /**
+ !#en get the target.
+ !#zh 获取当前目标节点。
+ */
+ getTarget(): Node;
+ /**
+ !#en The action will modify the target properties.
+ !#zh 设置目标节点。
+ @param target target
+ */
+ setTarget(target: Node): void;
+ /**
+ !#en get the original target.
+ !#zh 获取原始目标节点。
+ */
+ getOriginalTarget(): Node;
+ /**
+ !#en get tag number.
+ !#zh 获取用于识别动作的标签。
+ */
+ getTag(): number;
+ /**
+ !#en set tag number.
+ !#zh 设置标签,用于识别动作。
+ @param tag tag
+ */
+ setTag(tag: number): void;
+ /** !#en Default Action tag.
+ !#zh 默认动作标签。 */
+ static TAG_INVALID: number;
+ }
+ /** !#en
+ Base class actions that do have a finite time duration.
+ Possible actions:
+ - An action with a duration of 0 seconds.
+ - An action with a duration of 35.5 seconds.
+
+ Infinite time actions are valid
+ !#zh 有限时间动作,这种动作拥有时长 duration 属性。 */
+ export class FiniteTimeAction extends Action {
+ /**
+ !#en get duration of the action. (seconds).
+ !#zh 获取动作以秒为单位的持续时间。
+ */
+ getDuration(): number;
+ /**
+ !#en set duration of the action. (seconds).
+ !#zh 设置动作以秒为单位的持续时间。
+ @param duration duration
+ */
+ setDuration(duration: number): void;
+ /**
+ !#en
+ Returns a reversed action.
+ For example:
+ - The action will be x coordinates of 0 move to 100.
+ - The reversed action will be x of 100 move to 0.
+ - Will be rewritten
+ !#zh 返回一个新的动作,执行与原动作完全相反的动作。
+ */
+ reverse(): void;
+ /**
+ !#en
+ to copy object with deep copy.
+ returns a clone of action.
+ !#zh 返回一个克隆的动作。
+ */
+ clone(): FiniteTimeAction;
+ }
+ /** !#en
+
+ It has an start time, and a finish time. The finish time is the parameter
+ duration plus the start time.
+ - They can run normally (default)
+ - They can run reversed with the reverse method
+ - They can run with the time altered with the Accelerate, AccelDeccel and Speed actions.
+ then running it again in Reverse mode.
+ To repeat the an action for a limited number of times use the Repeat action.
+ !#zh 永远地重复一个动作,有限次数内重复一个动作请使用 Repeat 动作。
+ */
+ repeatForever(): ActionInterval;
+ }
+ /** !#en Instant actions are immediate actions. They don't have a duration like the ActionInterval actions.
+ !#zh 即时动作,这种动作立即就会执行,继承自 FiniteTimeAction。 */
+ export class ActionInstant extends FiniteTimeAction {
+ }
+ /** !#en
+ cc.ActionManager is a class that can manage actions.
+ Normally you won't need to use this class directly. 99% of the cases you will use the CCNode interface,
+ which uses this class's singleton object.
+ But there are some cases where you might need to use this class.
+ Examples:
+ - When you want to run an action where the target is different from a CCNode.
+ - When you want to pause / resume the actions
+ !#zh
+ cc.ActionManager 是可以管理动作的单例类。
+ 通常你并不需要直接使用这个类,99%的情况您将使用 CCNode 的接口。
+ 但也有一些情况下,您可能需要使用这个类。
+ 例如:
+ - 当你想要运行一个动作,但目标不是 CCNode 类型时。
+ - 当你想要暂停/恢复动作时。
*/
+ export class ActionManager {
+ /**
+ !#en
+ Adds an action with a target.
+ If the target is already present, then the action will be added to the existing target.
+ If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target.
+ When the target is paused, the queued actions won't be 'ticked'.
+ !#zh
+ 增加一个动作,同时还需要提供动作的目标对象,目标对象是否暂停作为参数。
+ 如果目标已存在,动作将会被直接添加到现有的节点中。
+ 如果目标不存在,将为这一目标创建一个新的实例,并将动作添加进去。
+ 当目标状态的 paused 为 true,动作将不会被执行
+ @param action action
+ @param target target
+ @param paused paused
+ */
+ addAction(action: Action, target: Node, paused: boolean): void;
+ /**
+ !#en Removes all actions from all the targets.
+ !#zh 移除所有对象的所有动作。
+ */
+ removeAllActions(): void;
+ /**
+ !#en
+ Removes all actions from a certain target.
+ All the actions that belongs to the target will be removed.
+ !#zh
+ 移除指定对象上的所有动作。
+ 属于该目标的所有的动作将被删除。
+ @param target target
+ @param forceDelete forceDelete
+ */
+ removeAllActionsFromTarget(target: Node, forceDelete: boolean): void;
+ /**
+ !#en Removes an action given an action reference.
+ !#zh 移除指定的动作。
+ @param action action
+ */
+ removeAction(action: Action): void;
+ /**
+ !#en Removes an action given its tag and the target.
+ !#zh 删除指定对象下特定标签的一个动作,将删除首个匹配到的动作。
+ @param tag tag
+ @param target target
+ */
+ removeActionByTag(tag: number, target?: Node): void;
+ /**
+ !#en Removes all actions given the tag and the target.
+ !#zh 删除指定对象下特定标签的所有动作。
+ @param tag tag
+ @param target target
+ */
+ removeAllActionsByTag(tag: number, target?: Node): void;
+ /**
+ !#en Gets an action given its tag an a target.
+ !#zh 通过目标对象和标签获取一个动作。
+ @param tag tag
+ @param target target
+ */
+ getActionByTag(tag: number, target: Node): Action;
+ /**
+ !#en
+ Returns the numbers of actions that are running in a certain target.
+ Composable actions are counted as 1 action.
+ Example:
+ - If you are running 1 Sequence of 7 actions, it will return 1.
+ - If you are running 7 Sequences of 2 actions, it will return 7.
+ !#zh
+ 返回指定对象下所有正在运行的动作数量。
+ 组合动作被算作一个动作。
+ 例如:
+ - 如果您正在运行 7 个动作组成的序列动作(Sequence),这个函数将返回 1。
+ - 如果你正在运行 2 个序列动作(Sequence)和 5 个普通动作,这个函数将返回 7。
+ @param target target
+ */
+ getNumberOfRunningActionsInTarget(target: Node): number;
+ /**
+ !#en Pauses the target: all running actions and newly added actions will be paused.
+ !#zh 暂停指定对象:所有正在运行的动作和新添加的动作都将会暂停。
+ @param target target
+ */
+ pauseTarget(target: Node): void;
+ /**
+ !#en Resumes the target. All queued actions will be resumed.
+ !#zh 让指定目标恢复运行。在执行序列中所有被暂停的动作将重新恢复运行。
+ @param target target
+ */
+ resumeTarget(target: Node): void;
+ /**
+ !#en Pauses all running actions, returning a list of targets whose actions were paused.
+ !#zh 暂停所有正在运行的动作,返回一个包含了那些动作被暂停了的目标对象的列表。
+ */
+ pauseAllRunningActions(): any[];
+ /**
+ !#en Resume a set of targets (convenience function to reverse a pauseAllRunningActions or pauseTargets call).
+ !#zh 让一组指定对象恢复运行(用来逆转 pauseAllRunningActions 效果的便捷函数)。
+ @param targetsToResume targetsToResume
+ */
+ resumeTargets(targetsToResume: any[]): void;
+ /**
+ !#en Pause a set of targets.
+ !#zh 暂停一组指定对象。
+ @param targetsToPause targetsToPause
+ */
+ pauseTargets(targetsToPause: any[]): void;
+ /**
+ !#en
+ purges the shared action manager. It releases the retained instance.
+ because it uses this, so it can not be static.
+ !#zh
+ 清除共用的动作管理器。它释放了持有的实例。
+ 因为它使用 this,因此它不能是静态的。
+ */
+ purgeSharedManager(): void;
+ /**
+ !#en The ActionManager update。
+ !#zh ActionManager 主循环。
+ @param dt delta time in seconds
+ */
+ update(dt: number): void;
+ }
+ /** !#en
+ Tween provide a simple and flexible way to create action. Tween's api is more flexible than `cc.Action`:
+ - Support creating an action sequence in chained api.
+ - Support animate any objects' any properties, not limited to node's properties. By contrast, `cc.Action` needs to create a new action class to support new node property.
+ - Support working with `cc.Action`.
+ - Support easing and progress function.
+ !#zh
+ Tween 提供了一个简单灵活的方法来创建 action。相对于 Cocos 传统的 `cc.Action`,`cc.Tween` 在创建动画上要灵活非常多:
+ - 支持以链式结构的方式创建一个动画序列。
+ - 支持对任意对象的任意属性进行缓动,不再局限于节点上的属性,而 `cc.Action` 添加一个属性的支持时还需要添加一个新的 action 类型。
+ - 支持与 `cc.Action` 混用。
+ - 支持设置 {{#crossLink "Easing"}}{{/crossLink}} 或者 progress 函数。 */
+ export class Tween
+ 大多数情况下 动画组件 是足够和易于使用的。如果您需要更多的动画控制接口,请使用 AnimationState。 */
+ export class AnimationState extends Playable {
+ /**
+
+ @param clip clip
+ @param name name
+ */
+ constructor(clip: AnimationClip, name?: string);
+ /** !#en The curves list.
+ !#zh 曲线列表。 */
+ curves: any[];
+ /** !#en The start delay which represents the number of seconds from an animation's start time to the start of
+ the active interval.
+ !#zh 延迟多少秒播放。 */
+ delay: number;
+ /** !#en The animation's iteration count property.
+
+ A real number greater than or equal to zero (including positive infinity) representing the number of times
+ to repeat the animation node.
+
+ Values less than zero and NaN values are treated as the value 1.0 for the purpose of timing model
+ calculations.
+
+ !#zh 迭代次数,指动画播放多少次后结束, normalize time。 如 2.5(2次半) */
+ repeatCount: number;
+ /** !#en The iteration duration of this animation in seconds. (length)
+ !#zh 单次动画的持续时间,秒。 */
+ duration: number;
+ /** !#en The animation's playback speed. 1 is normal playback speed.
+ !#zh 播放速率。 */
+ speed: number;
+ /** !#en
+ Wrapping mode of the playing animation.
+ Notice : dynamic change wrapMode will reset time and repeatCount property
+ !#zh
+ 动画循环方式。
+ 需要注意的是,动态修改 wrapMode 时,会重置 time 以及 repeatCount */
+ wrapMode: WrapMode;
+ /** !#en The current time of this animation in seconds.
+ !#zh 动画当前的时间,秒。 */
+ time: number;
+ /** !#en The clip that is being played by this animation state.
+ !#zh 此动画状态正在播放的剪辑。 */
+ clip: AnimationClip;
+ /** !#en The name of the playing animation.
+ !#zh 动画的名字 */
+ name: string;
+ }
+ /** !#en
+ This class provide easing methods for {{#crossLink "tween"}}{{/crossLink}} class.
+ Demonstratio: https://easings.net/
+ !#zh
+ 缓动函数类,为 {{#crossLink "Tween"}}{{/crossLink}} 提供缓动效果函数。
+ 函数效果演示: https://easings.net/ */
+ export class Easing {
+ /**
+ !#en Easing in with quadratic formula. From slow to fast.
+ !#zh 平方曲线缓入函数。运动由慢到快。
+ @param t The current time as a percentage of the total time.
+ */
+ quadIn(t: number): number;
+ /**
+ !#en Easing out with quadratic formula. From fast to slow.
+ !#zh 平方曲线缓出函数。运动由快到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ quadOut(t: number): number;
+ /**
+ !#en Easing in and out with quadratic formula. From slow to fast, then back to slow.
+ !#zh 平方曲线缓入缓出函数。运动由慢到快再到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ quadInOut(t: number): number;
+ /**
+ !#en Easing in with cubic formula. From slow to fast.
+ !#zh 立方曲线缓入函数。运动由慢到快。
+ @param t The current time as a percentage of the total time.
+ */
+ cubicIn(t: number): number;
+ /**
+ !#en Easing out with cubic formula. From slow to fast.
+ !#zh 立方曲线缓出函数。运动由快到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ cubicOut(t: number): number;
+ /**
+ !#en Easing in and out with cubic formula. From slow to fast, then back to slow.
+ !#zh 立方曲线缓入缓出函数。运动由慢到快再到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ cubicInOut(t: number): number;
+ /**
+ !#en Easing in with quartic formula. From slow to fast.
+ !#zh 四次方曲线缓入函数。运动由慢到快。
+ @param t The current time as a percentage of the total time.
+ */
+ quartIn(t: number): number;
+ /**
+ !#en Easing out with quartic formula. From fast to slow.
+ !#zh 四次方曲线缓出函数。运动由快到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ quartOut(t: number): number;
+ /**
+ !#en Easing in and out with quartic formula. From slow to fast, then back to slow.
+ !#zh 四次方曲线缓入缓出函数。运动由慢到快再到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ quartInOut(t: number): number;
+ /**
+ !#en Easing in with quintic formula. From slow to fast.
+ !#zh 五次方曲线缓入函数。运动由慢到快。
+ @param t The current time as a percentage of the total time.
+ */
+ quintIn(t: number): number;
+ /**
+ !#en Easing out with quintic formula. From fast to slow.
+ !#zh 五次方曲线缓出函数。运动由快到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ quintOut(t: number): number;
+ /**
+ !#en Easing in and out with quintic formula. From slow to fast, then back to slow.
+ !#zh 五次方曲线缓入缓出函数。运动由慢到快再到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ quintInOut(t: number): number;
+ /**
+ !#en Easing in and out with sine formula. From slow to fast.
+ !#zh 正弦曲线缓入函数。运动由慢到快。
+ @param t The current time as a percentage of the total time.
+ */
+ sineIn(t: number): number;
+ /**
+ !#en Easing in and out with sine formula. From fast to slow.
+ !#zh 正弦曲线缓出函数。运动由快到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ sineOut(t: number): number;
+ /**
+ !#en Easing in and out with sine formula. From slow to fast, then back to slow.
+ !#zh 正弦曲线缓入缓出函数。运动由慢到快再到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ sineInOut(t: number): number;
+ /**
+ !#en Easing in and out with exponential formula. From slow to fast.
+ !#zh 指数曲线缓入函数。运动由慢到快。
+ @param t The current time as a percentage of the total time.
+ */
+ expoIn(t: number): number;
+ /**
+ !#en Easing in and out with exponential formula. From fast to slow.
+ !#zh 指数曲线缓出函数。运动由快到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ expoOut(t: number): number;
+ /**
+ !#en Easing in and out with exponential formula. From slow to fast.
+ !#zh 指数曲线缓入和缓出函数。运动由慢到很快再到慢。
+ @param t The current time as a percentage of the total time, then back to slow.
+ */
+ expoInOut(t: number): number;
+ /**
+ !#en Easing in and out with circular formula. From slow to fast.
+ !#zh 循环公式缓入函数。运动由慢到快。
+ @param t The current time as a percentage of the total time.
+ */
+ circIn(t: number): number;
+ /**
+ !#en Easing in and out with circular formula. From fast to slow.
+ !#zh 循环公式缓出函数。运动由快到慢。
+ @param t The current time as a percentage of the total time.
+ */
+ circOut(t: number): number;
+ /**
+ !#en Easing in and out with circular formula. From slow to fast.
+ !#zh 指数曲线缓入缓出函数。运动由慢到很快再到慢。
+ @param t The current time as a percentage of the total time, then back to slow.
+ */
+ circInOut(t: number): number;
+ /**
+ !#en Easing in action with a spring oscillating effect.
+ !#zh 弹簧回震效果的缓入函数。
+ @param t The current time as a percentage of the total time.
+ */
+ elasticIn(t: number): number;
+ /**
+ !#en Easing out action with a spring oscillating effect.
+ !#zh 弹簧回震效果的缓出函数。
+ @param t The current time as a percentage of the total time.
+ */
+ elasticOut(t: number): number;
+ /**
+ !#en Easing in and out action with a spring oscillating effect.
+ !#zh 弹簧回震效果的缓入缓出函数。
+ @param t The current time as a percentage of the total time.
+ */
+ elasticInOut(t: number): number;
+ /**
+ !#en Easing in action with "back up" behavior.
+ !#zh 回退效果的缓入函数。
+ @param t The current time as a percentage of the total time.
+ */
+ backIn(t: number): number;
+ /**
+ !#en Easing out action with "back up" behavior.
+ !#zh 回退效果的缓出函数。
+ @param t The current time as a percentage of the total time.
+ */
+ backOut(t: number): number;
+ /**
+ !#en Easing in and out action with "back up" behavior.
+ !#zh 回退效果的缓入缓出函数。
+ @param t The current time as a percentage of the total time.
+ */
+ backInOut(t: number): number;
+ /**
+ !#en Easing in action with bouncing effect.
+ !#zh 弹跳效果的缓入函数。
+ @param t The current time as a percentage of the total time.
+ */
+ bounceIn(t: number): number;
+ /**
+ !#en Easing out action with bouncing effect.
+ !#zh 弹跳效果的缓出函数。
+ @param t The current time as a percentage of the total time.
+ */
+ bounceOut(t: number): number;
+ /**
+ !#en Easing in and out action with bouncing effect.
+ !#zh 弹跳效果的缓入缓出函数。
+ @param t The current time as a percentage of the total time.
+ */
+ bounceInOut(t: number): number;
+ /**
+ !#en Target will run action with smooth effect.
+ !#zh 平滑效果函数。
+ @param t The current time as a percentage of the total time.
+ */
+ smooth(t: number): number;
+ /**
+ !#en Target will run action with fade effect.
+ !#zh 渐褪效果函数。
+ @param t The current time as a percentage of the total time.
+ */
+ fade(t: number): number;
+ }
+ /** undefined */
+ export class Playable {
+ /** !#en Is playing or paused in play mode?
+ !#zh 当前是否正在播放。 */
+ isPlaying: boolean;
+ /** !#en Is currently paused? This can be true even if in edit mode(isPlaying == false).
+ !#zh 当前是否正在暂停 */
+ isPaused: boolean;
+ /**
+ !#en Play this animation.
+ !#zh 播放动画。
+ */
+ play(): void;
+ /**
+ !#en Stop this animation.
+ !#zh 停止动画播放。
+ */
+ stop(): void;
+ /**
+ !#en Pause this animation.
+ !#zh 暂停动画。
+ */
+ pause(): void;
+ /**
+ !#en Resume this animation.
+ !#zh 重新播放动画。
+ */
+ resume(): void;
+ /**
+ !#en Perform a single frame step.
+ !#zh 执行一帧动画。
+ */
+ step(): void;
+ }
+ /** !#en Specifies how time is treated when it is outside of the keyframe range of an Animation.
+ !#zh 动画使用的循环模式。 */
+ export enum WrapMode {
+ Default = 0,
+ Normal = 0,
+ Reverse = 0,
+ Loop = 0,
+ LoopReverse = 0,
+ PingPong = 0,
+ PingPongReverse = 0,
+ }
+ /** Class for particle asset handling. */
+ export class ParticleAsset extends Asset {
+ }
+ /** Particle System base class.
+ Attributes of a Particle System:
+ - emmision rate of the particles
+ - Gravity Mode (Mode A):
+ - gravity
+ - direction
+ - speed +- variance
+ - tangential acceleration +- variance
+ - radial acceleration +- variance
+ - Radius Mode (Mode B):
+ - startRadius +- variance
+ - endRadius +- variance
+ - rotate +- variance
+ - Properties common to all modes:
+ - life +- life variance
+ - start spin +- variance
+ - end spin +- variance
+ - start size +- variance
+ - end size +- variance
+ - start color +- variance
+ - end color +- variance
+ - life +- variance
+ - blending function
+ - texture
+
+ cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/).
+ 'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guarateed in cocos2d,
+ cocos2d uses a another approach, but the results are almost identical.
+ cocos2d supports all the variables used by Particle Designer plus a bit more:
+ - spinning particles (supported when using ParticleSystem)
+ - tangential acceleration (Gravity mode)
+ - radial acceleration (Gravity mode)
+ - radius direction (Radius mode) (Particle Designer supports outwards to inwards direction only)
+ It is possible to customize any of the above mentioned properties in runtime. Example:
*/
+ export class ParticleSystem extends RenderComponent implements BlendFunc {
+ /** !#en Play particle in edit mode.
+ !#zh 在编辑器模式下预览粒子,启用后选中粒子时,粒子将自动播放。 */
+ preview: boolean;
+ /** !#en
+ If set custom to true, then use custom properties insteadof read particle file.
+ !#zh 是否自定义粒子属性。 */
+ custom: boolean;
+ /** !#en The plist file.
+ !#zh plist 格式的粒子配置文件。 */
+ file: ParticleAsset;
+ /** !#en SpriteFrame used for particles display
+ !#zh 用于粒子呈现的 SpriteFrame */
+ spriteFrame: SpriteFrame;
+ /** !#en Texture of Particle System, readonly, please use spriteFrame to setup new texture。
+ !#zh 粒子贴图,只读属性,请使用 spriteFrame 属性来替换贴图。 */
+ texture: string;
+ /** !#en Current quantity of particles that are being simulated.
+ !#zh 当前播放的粒子数量。 */
+ particleCount: number;
+ /** !#en Indicate whether the system simulation have stopped.
+ !#zh 指示粒子播放是否完毕。 */
+ stopped: boolean;
+ /** !#en If set to true, the particle system will automatically start playing on onLoad.
+ !#zh 如果设置为 true 运行时会自动发射粒子。 */
+ playOnLoad: boolean;
+ /** !#en Indicate whether the owner node will be auto-removed when it has no particles left.
+ !#zh 粒子播放完毕后自动销毁所在的节点。 */
+ autoRemoveOnFinish: boolean;
+ /** !#en Indicate whether the particle system is activated.
+ !#zh 是否激活粒子。 */
+ active: boolean;
+ /** !#en Maximum particles of the system.
+ !#zh 粒子最大数量。 */
+ totalParticles: number;
+ /** !#en How many seconds the emitter wil run. -1 means 'forever'.
+ !#zh 发射器生存时间,单位秒,-1表示持续发射。 */
+ duration: number;
+ /** !#en Emission rate of the particles.
+ !#zh 每秒发射的粒子数目。 */
+ emissionRate: number;
+ /** !#en Life of each particle setter.
+ !#zh 粒子的运行时间。 */
+ life: number;
+ /** !#en Variation of life.
+ !#zh 粒子的运行时间变化范围。 */
+ lifeVar: number;
+ /** !#en Start color of each particle.
+ !#zh 粒子初始颜色。 */
+ startColor: Color;
+ /** !#en Variation of the start color.
+ !#zh 粒子初始颜色变化范围。 */
+ startColorVar: Color;
+ /** !#en Ending color of each particle.
+ !#zh 粒子结束颜色。 */
+ endColor: Color;
+ /** !#en Variation of the end color.
+ !#zh 粒子结束颜色变化范围。 */
+ endColorVar: Color;
+ /** !#en Angle of each particle setter.
+ !#zh 粒子角度。 */
+ angle: number;
+ /** !#en Variation of angle of each particle setter.
+ !#zh 粒子角度变化范围。 */
+ angleVar: number;
+ /** !#en Start size in pixels of each particle.
+ !#zh 粒子的初始大小。 */
+ startSize: number;
+ /** !#en Variation of start size in pixels.
+ !#zh 粒子初始大小的变化范围。 */
+ startSizeVar: number;
+ /** !#en End size in pixels of each particle.
+ !#zh 粒子结束时的大小。 */
+ endSize: number;
+ /** !#en Variation of end size in pixels.
+ !#zh 粒子结束大小的变化范围。 */
+ endSizeVar: number;
+ /** !#en Start angle of each particle.
+ !#zh 粒子开始自旋角度。 */
+ startSpin: number;
+ /** !#en Variation of start angle.
+ !#zh 粒子开始自旋角度变化范围。 */
+ startSpinVar: number;
+ /** !#en End angle of each particle.
+ !#zh 粒子结束自旋角度。 */
+ endSpin: number;
+ /** !#en Variation of end angle.
+ !#zh 粒子结束自旋角度变化范围。 */
+ endSpinVar: number;
+ /** !#en Source position of the emitter.
+ !#zh 发射器位置。 */
+ sourcePos: Vec2;
+ /** !#en Variation of source position.
+ !#zh 发射器位置的变化范围。(横向和纵向) */
+ posVar: Vec2;
+ /** !#en Particles movement type.
+ !#zh 粒子位置类型。 */
+ positionType: ParticleSystem.PositionType;
+ /** !#en Particles emitter modes.
+ !#zh 发射器类型。 */
+ emitterMode: ParticleSystem.EmitterMode;
+ /** !#en Gravity of the emitter.
+ !#zh 重力。 */
+ gravity: Vec2;
+ /** !#en Speed of the emitter.
+ !#zh 速度。 */
+ speed: number;
+ /** !#en Variation of the speed.
+ !#zh 速度变化范围。 */
+ speedVar: number;
+ /** !#en Tangential acceleration of each particle. Only available in 'Gravity' mode.
+ !#zh 每个粒子的切向加速度,即垂直于重力方向的加速度,只有在重力模式下可用。 */
+ tangentialAccel: number;
+ /** !#en Variation of the tangential acceleration.
+ !#zh 每个粒子的切向加速度变化范围。 */
+ tangentialAccelVar: number;
+ /** !#en Acceleration of each particle. Only available in 'Gravity' mode.
+ !#zh 粒子径向加速度,即平行于重力方向的加速度,只有在重力模式下可用。 */
+ radialAccel: number;
+ /** !#en Variation of the radial acceleration.
+ !#zh 粒子径向加速度变化范围。 */
+ radialAccelVar: number;
+ /** !#en Indicate whether the rotation of each particle equals to its direction. Only available in 'Gravity' mode.
+ !#zh 每个粒子的旋转是否等于其方向,只有在重力模式下可用。 */
+ rotationIsDir: boolean;
+ /** !#en Starting radius of the particles. Only available in 'Radius' mode.
+ !#zh 初始半径,表示粒子出生时相对发射器的距离,只有在半径模式下可用。 */
+ startRadius: number;
+ /** !#en Variation of the starting radius.
+ !#zh 初始半径变化范围。 */
+ startRadiusVar: number;
+ /** !#en Ending radius of the particles. Only available in 'Radius' mode.
+ !#zh 结束半径,只有在半径模式下可用。 */
+ endRadius: number;
+ /** !#en Variation of the ending radius.
+ !#zh 结束半径变化范围。 */
+ endRadiusVar: number;
+ /** !#en Number of degress to rotate a particle around the source pos per second. Only available in 'Radius' mode.
+ !#zh 粒子每秒围绕起始点的旋转角度,只有在半径模式下可用。 */
+ rotatePerS: number;
+ /** !#en Variation of the degress to rotate a particle around the source pos per second.
+ !#zh 粒子每秒围绕起始点的旋转角度变化范围。 */
+ rotatePerSVar: number;
+ /** !#en The Particle emitter lives forever.
+ !#zh 表示发射器永久存在 */
+ static DURATION_INFINITY: number;
+ /** !#en The starting size of the particle is equal to the ending size.
+ !#zh 表示粒子的起始大小等于结束大小。 */
+ static START_SIZE_EQUAL_TO_END_SIZE: number;
+ /** !#en The starting radius of the particle is equal to the ending radius.
+ !#zh 表示粒子的起始半径等于结束半径。 */
+ static START_RADIUS_EQUAL_TO_END_RADIUS: number;
+ /**
+ !#en Stop emitting particles. Running particles will continue to run until they die.
+ !#zh 停止发射器发射粒子,发射出去的粒子将继续运行,直至粒子生命结束。
+
+ @example
+ ```js
+ // stop particle system.
+ myParticleSystem.stopSystem();
+ ```
+ */
+ stopSystem(): void;
+ /**
+ !#en Kill all living particles.
+ !#zh 杀死所有存在的粒子,然后重新启动粒子发射器。
+
+ @example
+ ```js
+ // play particle system.
+ myParticleSystem.resetSystem();
+ ```
+ */
+ resetSystem(): void;
+ /**
+ !#en Whether or not the system is full.
+ !#zh 发射器中粒子是否大于等于设置的总粒子数量。
+ */
+ isFull(): boolean;
+ /**
+ !#en Sets a new texture with a rect. The rect is in texture position and size.
+ Please use spriteFrame property instead, this function is deprecated since v1.9
+ !#zh 设置一张新贴图和关联的矩形。
+ 请直接设置 spriteFrame 属性,这个函数从 v1.9 版本开始已经被废弃
+ @param texture texture
+ @param rect rect
+ */
+ setTextureWithRect(texture: Texture2D, rect: Rect): void;
+ /** !#en specify the source Blend Factor, this will generate a custom material object, please pay attention to the memory cost.
+ !#zh 指定原图的混合模式,这会克隆一个新的材质对象,注意这带来的开销 */
+ srcBlendFactor: macro.BlendFactor;
+ /** !#en specify the destination Blend Factor.
+ !#zh 指定目标的混合模式 */
+ dstBlendFactor: macro.BlendFactor;
+ }
+ /** !#en `cc.audioEngine` is the singleton object, it provide simple audio APIs.
+ !#zh
+ cc.audioengine是单例对象。
+ 主要用来播放音频,播放的时候会返回一个 audioID,之后都可以通过这个 audioID 来操作这个音频对象。
+ 不使用的时候,请使用 `cc.audioEngine.uncache(filePath);` 进行资源释放
+ 注意:
+ 在 Android 系统浏览器上,不同浏览器,不同版本的效果不尽相同。
+ 比如说:大多数浏览器都需要用户物理交互才可以开始播放音效,有一些不支持 WebAudio,有一些不支持多音轨播放。总之如果对音乐依赖比较强,请做尽可能多的测试。 */
+ export class audioEngine {
+ /**
+ !#en Play audio.
+ !#zh 播放音频
+ @param clip The audio clip to play.
+ @param loop Whether the music loop or not.
+ @param volume Volume size.
+
+ @example
+ ```js
+ cc.resources.load(path, cc.AudioClip, null, function (err, clip) {
+ var audioID = cc.audioEngine.play(clip, false, 0.5);
+ });
+ ```
+ */
+ static play(clip: AudioClip, loop: boolean, volume: number): number;
+ /**
+ !#en Set audio loop.
+ !#zh 设置音频是否循环。
+ @param audioID audio id.
+ @param loop Whether cycle.
+
+ @example
+ ```js
+ cc.audioEngine.setLoop(id, true);
+ ```
+ */
+ static setLoop(audioID: number, loop: boolean): void;
+ /**
+ !#en Get audio cycle state.
+ !#zh 获取音频的循环状态。
+ @param audioID audio id.
+
+ @example
+ ```js
+ cc.audioEngine.isLoop(id);
+ ```
+ */
+ static isLoop(audioID: number): boolean;
+ /**
+ !#en Set the volume of audio.
+ !#zh 设置音量(0.0 ~ 1.0)。
+ @param audioID audio id.
+ @param volume Volume must be in 0.0~1.0 .
+
+ @example
+ ```js
+ cc.audioEngine.setVolume(id, 0.5);
+ ```
+ */
+ static setVolume(audioID: number, volume: number): void;
+ /**
+ !#en The volume of the music max value is 1.0,the min value is 0.0 .
+ !#zh 获取音量(0.0 ~ 1.0)。
+ @param audioID audio id.
+
+ @example
+ ```js
+ var volume = cc.audioEngine.getVolume(id);
+ ```
+ */
+ static getVolume(audioID: number): number;
+ /**
+ !#en Set current time
+ !#zh 设置当前的音频时间。
+ @param audioID audio id.
+ @param sec current time.
+
+ @example
+ ```js
+ cc.audioEngine.setCurrentTime(id, 2);
+ ```
+ */
+ static setCurrentTime(audioID: number, sec: number): boolean;
+ /**
+ !#en Get current time
+ !#zh 获取当前的音频播放时间。
+ @param audioID audio id.
+
+ @example
+ ```js
+ var time = cc.audioEngine.getCurrentTime(id);
+ ```
+ */
+ static getCurrentTime(audioID: number): number;
+ /**
+ !#en Get audio duration
+ !#zh 获取音频总时长。
+ @param audioID audio id.
+
+ @example
+ ```js
+ var time = cc.audioEngine.getDuration(id);
+ ```
+ */
+ static getDuration(audioID: number): number;
+ /**
+ !#en Get audio state
+ !#zh 获取音频状态。
+ @param audioID audio id.
+
+ @example
+ ```js
+ var state = cc.audioEngine.getState(id);
+ ```
+ */
+ static getState(audioID: number): audioEngine.AudioState;
+ /**
+ !#en Whether the audio is playing
+ !#zh 音乐是否正在播放
+
+ @example
+ ```js
+ cc.audioEngine.isPlaying(audioID);
+ ```
+ */
+ static isPlaying(): boolean;
+ /**
+ !#en Set Audio finish callback
+ !#zh 设置一个音频结束后的回调
+ @param audioID audio id.
+ @param callback loaded callback.
+
+ @example
+ ```js
+ cc.audioEngine.setFinishCallback(id, function () {});
+ ```
+ */
+ static setFinishCallback(audioID: number, callback: Function): void;
+ /**
+ !#en Pause playing audio.
+ !#zh 暂停正在播放音频。
+ @param audioID The return value of function play.
+
+ @example
+ ```js
+ cc.audioEngine.pause(audioID);
+ ```
+ */
+ static pause(audioID: number): void;
+ /**
+ !#en Pause all playing audio
+ !#zh 暂停现在正在播放的所有音频。
+
+ @example
+ ```js
+ cc.audioEngine.pauseAll();
+ ```
+ */
+ static pauseAll(): void;
+ /**
+ !#en Resume playing audio.
+ !#zh 恢复播放指定的音频。
+ @param audioID The return value of function play.
+
+ @example
+ ```js
+ cc.audioEngine.resume(audioID);
+ ```
+ */
+ static resume(audioID: number): void;
+ /**
+ !#en Resume all playing audio.
+ !#zh 恢复播放所有之前暂停的所有音频。
+
+ @example
+ ```js
+ cc.audioEngine.resumeAll();
+ ```
+ */
+ static resumeAll(): void;
+ /**
+ !#en Stop playing audio.
+ !#zh 停止播放指定音频。
+ @param audioID The return value of function play.
+
+ @example
+ ```js
+ cc.audioEngine.stop(audioID);
+ ```
+ */
+ static stop(audioID: number): void;
+ /**
+ !#en Stop all playing audio.
+ !#zh 停止正在播放的所有音频。
+
+ @example
+ ```js
+ cc.audioEngine.stopAll();
+ ```
+ */
+ static stopAll(): void;
+ /**
+ !#en Set up an audio can generate a few examples.
+ !#zh 设置一个音频可以设置几个实例
+ @param num a number of instances to be created from within an audio
+
+ @example
+ ```js
+ cc.audioEngine.setMaxAudioInstance(20);
+ ```
+ */
+ static setMaxAudioInstance(num: number): void;
+ /**
+ !#en Getting audio can produce several examples.
+ !#zh 获取一个音频可以设置几个实例
+
+ @example
+ ```js
+ cc.audioEngine.getMaxAudioInstance();
+ ```
+ */
+ static getMaxAudioInstance(): number;
+ /**
+ !#en Unload the preloaded audio from internal buffer.
+ !#zh 卸载预加载的音频。
+ @param clip clip
+
+ @example
+ ```js
+ cc.audioEngine.uncache(filePath);
+ ```
+ */
+ static uncache(clip: AudioClip): void;
+ /**
+ !#en Unload all audio from internal buffer.
+ !#zh 卸载所有音频。
+
+ @example
+ ```js
+ cc.audioEngine.uncacheAll();
+ ```
+ */
+ static uncacheAll(): void;
+ /**
+ !#en Play background music
+ !#zh 播放背景音乐
+ @param clip The audio clip to play.
+ @param loop Whether the music loop or not.
+
+ @example
+ ```js
+ cc.resources.load(path, cc.AudioClip, null, function (err, clip) {
+ var audioID = cc.audioEngine.playMusic(clip, false);
+ });
+ ```
+ */
+ static playMusic(clip: AudioClip, loop: boolean): number;
+ /**
+ !#en Stop background music.
+ !#zh 停止播放背景音乐。
+
+ @example
+ ```js
+ cc.audioEngine.stopMusic();
+ ```
+ */
+ static stopMusic(): void;
+ /**
+ !#en Pause the background music.
+ !#zh 暂停播放背景音乐。
+
+ @example
+ ```js
+ cc.audioEngine.pauseMusic();
+ ```
+ */
+ static pauseMusic(): void;
+ /**
+ !#en Resume playing background music.
+ !#zh 恢复播放背景音乐。
+
+ @example
+ ```js
+ cc.audioEngine.resumeMusic();
+ ```
+ */
+ static resumeMusic(): void;
+ /**
+ !#en Get the volume(0.0 ~ 1.0).
+ !#zh 获取音量(0.0 ~ 1.0)。
+
+ @example
+ ```js
+ var volume = cc.audioEngine.getMusicVolume();
+ ```
+ */
+ static getMusicVolume(): number;
+ /**
+ !#en Set the background music volume.
+ !#zh 设置背景音乐音量(0.0 ~ 1.0)。
+ @param volume Volume must be in 0.0~1.0.
+
+ @example
+ ```js
+ cc.audioEngine.setMusicVolume(0.5);
+ ```
+ */
+ static setMusicVolume(volume: number): void;
+ /**
+ !#en Background music playing state
+ !#zh 背景音乐是否正在播放
+
+ @example
+ ```js
+ cc.audioEngine.isMusicPlaying();
+ ```
+ */
+ static isMusicPlaying(): boolean;
+ /**
+ !#en Play effect audio.
+ !#zh 播放音效
+ @param clip The audio clip to play.
+ @param loop Whether the music loop or not.
+
+ @example
+ ```js
+ cc.resources.load(path, cc.AudioClip, null, function (err, clip) {
+ var audioID = cc.audioEngine.playEffect(clip, false);
+ });
+ ```
+ */
+ static playEffect(clip: AudioClip, loop: boolean): number;
+ /**
+ !#en Set the volume of effect audio.
+ !#zh 设置音效音量(0.0 ~ 1.0)。
+ @param volume Volume must be in 0.0~1.0.
+
+ @example
+ ```js
+ cc.audioEngine.setEffectsVolume(0.5);
+ ```
+ */
+ static setEffectsVolume(volume: number): void;
+ /**
+ !#en The volume of the effect audio max value is 1.0,the min value is 0.0 .
+ !#zh 获取音效音量(0.0 ~ 1.0)。
+
+ @example
+ ```js
+ var volume = cc.audioEngine.getEffectsVolume();
+ ```
+ */
+ static getEffectsVolume(): number;
+ /**
+ !#en Pause effect audio.
+ !#zh 暂停播放音效。
+ @param audioID audio id.
+
+ @example
+ ```js
+ cc.audioEngine.pauseEffect(audioID);
+ ```
+ */
+ static pauseEffect(audioID: number): void;
+ /**
+ !#en Stop playing all the sound effects.
+ !#zh 暂停播放所有音效。
+
+ @example
+ ```js
+ cc.audioEngine.pauseAllEffects();
+ ```
+ */
+ static pauseAllEffects(): void;
+ /**
+ !#en Resume effect audio.
+ !#zh 恢复播放音效音频。
+ @param audioID The return value of function play.
+
+ @example
+ ```js
+ cc.audioEngine.resumeEffect(audioID);
+ ```
+ */
+ static resumeEffect(audioID: number): void;
+ /**
+ !#en Resume all effect audio.
+ !#zh 恢复播放所有之前暂停的音效。
+
+ @example
+ ```js
+ cc.audioEngine.resumeAllEffects();
+ ```
+ */
+ static resumeAllEffects(): void;
+ /**
+ !#en Stop playing the effect audio.
+ !#zh 停止播放音效。
+ @param audioID audio id.
+
+ @example
+ ```js
+ cc.audioEngine.stopEffect(id);
+ ```
+ */
+ static stopEffect(audioID: number): void;
+ /**
+ !#en Stop playing all the effects.
+ !#zh 停止播放所有音效。
+
+ @example
+ ```js
+ cc.audioEngine.stopAllEffects();
+ ```
+ */
+ static stopAllEffects(): void;
+ }
+ /** cc.TMXLayerInfo contains the information about the layers like:
+ - Layer name
+ - Layer size
+ - Layer opacity at creation time (it can be modified at runtime)
+ - Whether the layer is visible (if it's not visible, then the CocosNode won't be created)
+ This information is obtained from the TMX file. */
+ export class TMXLayerInfo {
+ /** Properties of the layer info. */
+ properties: any;
+ }
+ /** cc.TMXImageLayerInfo contains the information about the image layers.
+ This information is obtained from the TMX file. */
+ export class TMXImageLayerInfo {
+ }
+ /**
+ - Tileset name
+ - Tileset spacing
+ - Tileset margin
+ - size of the tiles
+ - Image used for the tiles
+ - Image size
+
+ This information is obtained from the TMX file.
+ - Map orientation (hexagonal, isometric or orthogonal)
+ - Tile size
+ - Map size
+ - Layers (an array of TMXLayerInfo objects)
+ - Tilesets (an array of TMXTilesetInfo objects)
+ - ObjectGroups (an array of TMXObjectGroupInfo objects)
+ The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor . Tileset Mgr +1.
+ If a tile is already placed at that position, then it will be removed.
+ !#zh
+ 设置给定坐标的 tile 的 gid (gid = tile 全局 id),
+ tile 的 GID 可以使用方法 “tileGIDAt” 来获得。
+ 如果一个 tile 已经放在那个位置,那么它将被删除。
+ @param gid gid
+ @param posOrX position or x
+ @param flagsOrY flags or y
+ @param flags flags
+
+ @example
+ ```js
+ tiledLayer.setTileGIDAt(1001, 10, 10, 1)
+ ```
+ */
+ setTileGIDAt(gid: number, posOrX: Vec2|number, flagsOrY: number, flags?: number): void;
+ /**
+ !#en
+ Returns the tiles data.An array fill with GIDs.
+ !#zh
+ 返回 tiles 数据. 由GID构成的一个数组.
+ */
+ getTiles(): number[];
+ /**
+ !#en
+ Returns the tile gid at a given tile coordinate.
+ if it returns 0, it means that the tile is empty.
+ !#zh
+ 通过给定的 tile 坐标、flags(可选)返回 tile 的 GID.
+ 如果它返回 0,则表示该 tile 为空。
+ @param pos or x
+ @param y y
+
+ @example
+ ```js
+ let tileGid = tiledLayer.getTileGIDAt(0, 0);
+ ```
+ */
+ getTileGIDAt(pos: Vec2|number, y?: number): number;
+ /**
+ !#en Layer orientation, which is the same as the map orientation.
+ !#zh 获取 Layer 方向(同地图方向)。
+
+ @example
+ ```js
+ let orientation = tiledLayer.getLayerOrientation();
+ cc.log("Layer Orientation: " + orientation);
+ ```
+ */
+ getLayerOrientation(): number;
+ /**
+ !#en properties from the layer. They can be added using Tiled.
+ !#zh 获取 layer 的属性,可以使用 Tiled 编辑器添加属性。
+
+ @example
+ ```js
+ let properties = tiledLayer.getProperties();
+ cc.log("Properties: " + properties);
+ ```
+ */
+ getProperties(): any;
+ /**
+ !#en
+ Get the TiledTile with the tile coordinate.
+ If there is no tile in the specified coordinate and forceCreate parameter is true,
+ then will create a new TiledTile at the coordinate.
+ The renderer will render the tile with the rotation, scale, position and color property of the TiledTile.
+ !#zh
+ 通过指定的 tile 坐标获取对应的 TiledTile。
+ 如果指定的坐标没有 tile,并且设置了 forceCreate 那么将会在指定的坐标创建一个新的 TiledTile 。
+ 在渲染这个 tile 的时候,将会使用 TiledTile 的节点的旋转、缩放、位移、颜色属性。
+ @param x x
+ @param y y
+ @param forceCreate forceCreate
+
+ @example
+ ```js
+ let tile = tiledLayer.getTiledTileAt(100, 100, true);
+ cc.log(tile);
+ ```
+ */
+ getTiledTileAt(x: number, y: number, forceCreate: boolean): TiledTile;
+ /**
+ !#en
+ Change tile to TiledTile at the specified coordinate.
+ !#zh
+ 将指定的 tile 坐标替换为指定的 TiledTile。
+ @param x x
+ @param y y
+ @param tiledTile tiledTile
+ */
+ setTiledTileAt(x: number, y: number, tiledTile: TiledTile): TiledTile;
+ /**
+ !#en Return texture.
+ !#zh 获取纹理。
+ @param index The index of textures
+ */
+ getTexture(index: any): Texture2D;
+ /**
+ !#en Return texture.
+ !#zh 获取纹理。
+ */
+ getTextures(): Texture2D;
+ /**
+ !#en Set the texture.
+ !#zh 设置纹理。
+ @param texture texture
+ */
+ setTexture(texture: Texture2D): void;
+ /**
+ !#en Set the texture.
+ !#zh 设置纹理。
+ @param textures textures
+ */
+ setTexture(textures: Texture2D): void;
+ /**
+ !#en Gets layer size.
+ !#zh 获得层大小。
+
+ @example
+ ```js
+ let size = tiledLayer.getLayerSize();
+ cc.log("layer size: " + size);
+ ```
+ */
+ getLayerSize(): Size;
+ /**
+ !#en Size of the map's tile (could be different from the tile's size).
+ !#zh 获取 tile 的大小( tile 的大小可能会有所不同)。
+
+ @example
+ ```js
+ let mapTileSize = tiledLayer.getMapTileSize();
+ cc.log("MapTile size: " + mapTileSize);
+ ```
+ */
+ getMapTileSize(): Size;
+ /**
+ !#en Gets Tile set first information for the layer.
+ !#zh 获取 layer 索引位置为0的 Tileset 信息。
+ @param index The index of tilesets
+ */
+ getTileSet(index: any): TMXTilesetInfo;
+ /**
+ !#en Gets tile set all information for the layer.
+ !#zh 获取 layer 所有的 Tileset 信息。
+ */
+ getTileSet(): TMXTilesetInfo;
+ /**
+ !#en Sets tile set information for the layer.
+ !#zh 设置 layer 的 tileset 信息。
+ @param tileset tileset
+ */
+ setTileSet(tileset: TMXTilesetInfo): void;
+ /**
+ !#en Sets Tile set information for the layer.
+ !#zh 设置 layer 的 Tileset 信息。
+ @param tilesets tilesets
+ */
+ setTileSets(tilesets: TMXTilesetInfo): void;
+ }
+ /** Class for tiled map asset handling. */
+ export class TiledMapAsset extends Asset {
+ textures: Texture2D[];
+ textureNames: string[];
+ textureSizes: Size[];
+ imageLayerTextures: Texture2D[];
+ imageLayerTextureNames: string[];
+ }
+ /** !#en Renders a TMX Tile Map in the scene.
+ !#zh 在场景中渲染一个 tmx 格式的 Tile Map。 */
+ export class TiledMap extends Component {
+ /** !#en The TiledMap Asset.
+ !#zh TiledMap 资源。 */
+ tmxAsset: TiledMapAsset;
+ /**
+ !#en Gets the map size.
+ !#zh 获取地图大小。
+
+ @example
+ ```js
+ let mapSize = tiledMap.getMapSize();
+ cc.log("Map Size: " + mapSize);
+ ```
+ */
+ getMapSize(): Size;
+ /**
+ !#en Gets the tile size.
+ !#zh 获取地图背景中 tile 元素的大小。
+
+ @example
+ ```js
+ let tileSize = tiledMap.getTileSize();
+ cc.log("Tile Size: " + tileSize);
+ ```
+ */
+ getTileSize(): Size;
+ /**
+ !#en map orientation.
+ !#zh 获取地图方向。
+
+ @example
+ ```js
+ let mapOrientation = tiledMap.getMapOrientation();
+ cc.log("Map Orientation: " + mapOrientation);
+ ```
+ */
+ getMapOrientation(): number;
+ /**
+ !#en object groups.
+ !#zh 获取所有的对象层。
+
+ @example
+ ```js
+ let objGroups = titledMap.getObjectGroups();
+ for (let i = 0; i < objGroups.length; ++i) {
+ cc.log("obj: " + objGroups[i]);
+ }
+ ```
+ */
+ getObjectGroups(): TiledObjectGroup[];
+ /**
+ !#en Return the TMXObjectGroup for the specific group.
+ !#zh 获取指定的 TMXObjectGroup。
+ @param groupName groupName
+
+ @example
+ ```js
+ let group = titledMap.getObjectGroup("Players");
+ cc.log("ObjectGroup: " + group);
+ ```
+ */
+ getObjectGroup(groupName: string): TiledObjectGroup;
+ /**
+ !#en enable or disable culling
+ !#zh 开启或关闭裁剪。
+ @param value value
+ */
+ enableCulling(value: boolean): void;
+ /**
+ !#en Gets the map properties.
+ !#zh 获取地图的属性。
+
+ @example
+ ```js
+ let properties = titledMap.getProperties();
+ for (let i = 0; i < properties.length; ++i) {
+ cc.log("Properties: " + properties[i]);
+ }
+ ```
+ */
+ getProperties(): any[];
+ /**
+ !#en Return All layers array.
+ !#zh 返回包含所有 layer 的数组。
+
+ @example
+ ```js
+ let layers = titledMap.getLayers();
+ for (let i = 0; i < layers.length; ++i) {
+ cc.log("Layers: " + layers[i]);
+ }
+ ```
+ */
+ getLayers(): TiledLayer[];
+ /**
+ !#en return the cc.TiledLayer for the specific layer.
+ !#zh 获取指定名称的 layer。
+ @param layerName layerName
+
+ @example
+ ```js
+ let layer = titledMap.getLayer("Player");
+ cc.log(layer);
+ ```
+ */
+ getLayer(layerName: string): TiledLayer;
+ /**
+ !#en Return the value for the specific property name.
+ !#zh 通过属性名称,获取指定的属性。
+ @param propertyName propertyName
+
+ @example
+ ```js
+ let property = titledMap.getProperty("info");
+ cc.log("Property: " + property);
+ ```
+ */
+ getProperty(propertyName: string): string;
+ /**
+ !#en Return properties dictionary for tile GID.
+ !#zh 通过 GID ,获取指定的属性。
+ @param GID GID
+
+ @example
+ ```js
+ let properties = titledMap.getPropertiesForGID(GID);
+ cc.log("Properties: " + properties);
+ ```
+ */
+ getPropertiesForGID(GID: number): any;
+ }
+ /** !#en TiledTile can control the specified map tile.
+ It will apply the node rotation, scale, translate to the map tile.
+ You can change the TiledTile's gid to change the map tile's style.
+ !#zh TiledTile 可以单独对某一个地图块进行操作。
+ 他会将节点的旋转,缩放,平移操作应用在这个地图块上,并可以通过更换当前地图块的 gid 来更换地图块的显示样式。 */
+ export class TiledTile extends Component {
+ /** !#en Specify the TiledTile horizontal coordinate,use map tile as the unit.
+ !#zh 指定 TiledTile 的横向坐标,以地图块为单位 */
+ x: number;
+ /** !#en Specify the TiledTile vertical coordinate,use map tile as the unit.
+ !#zh 指定 TiledTile 的纵向坐标,以地图块为单位 */
+ y: number;
+ /** !#en Specify the TiledTile gid.
+ !#zh 指定 TiledTile 的 gid 值 */
+ gid: number;
+ }
+ /** !#en Renders the TMX object group.
+ !#zh 渲染 tmx object group。 */
+ export class TiledObjectGroup extends Component {
+ /**
+ !#en Offset position of child objects.
+ !#zh 获取子对象的偏移位置。
+
+ @example
+ ```js
+ let offset = tMXObjectGroup.getPositionOffset();
+ ```
+ */
+ getPositionOffset(): Vec2;
+ /**
+ !#en List of properties stored in a dictionary.
+ !#zh 以映射的形式获取属性列表。
+
+ @example
+ ```js
+ let offset = tMXObjectGroup.getProperties();
+ ```
+ */
+ getProperties(): any;
+ /**
+ !#en Gets the Group name.
+ !#zh 获取组名称。
+
+ @example
+ ```js
+ let groupName = tMXObjectGroup.getGroupName;
+ ```
+ */
+ getGroupName(): string;
+ /**
+ !#en
+ Return the object for the specific object name.
+ It will return the 1st object found on the array for the given name.
+ !#zh 获取指定的对象。
+ @param objectName objectName
+
+ @example
+ ```js
+ let object = tMXObjectGroup.getObject("Group");
+ ```
+ */
+ getObject(objectName: string): any;
+ /**
+ !#en Gets the objects.
+ !#zh 获取对象数组。
+
+ @example
+ ```js
+ let objects = tMXObjectGroup.getObjects();
+ ```
+ */
+ getObjects(): any[];
+ }
+ /** !#en cc.VideoPlayer is a component for playing videos, you can use it for showing videos in your game. Because different platforms have different authorization, API and control methods for VideoPlayer component. And have not yet formed a unified standard, only Web, iOS, and Android platforms are currently supported.
+ !#zh Video 组件,用于在游戏中播放视频。由于不同平台对于 VideoPlayer 组件的授权、API、控制方式都不同,还没有形成统一的标准,所以目前只支持 Web、iOS 和 Android 平台。 */
+ export class VideoPlayer extends Component {
+ /** !#en The resource type of videoplayer, REMOTE for remote url and LOCAL for local file path.
+ !#zh 视频来源:REMOTE 表示远程视频 URL,LOCAL 表示本地视频地址。 */
+ resourceType: VideoPlayer.ResourceType;
+ /** !#en The remote URL of video.
+ !#zh 远程视频的 URL */
+ remoteURL: string;
+ /** !#en The local video clip.
+ !#zh 本地视频剪辑 */
+ clip: VideoClip;
+ /** !#en The current playback time of the now playing item in seconds, you could also change the start playback time.
+ !#zh 指定视频从什么时间点开始播放,单位是秒,也可以用来获取当前视频播放的时间进度。 */
+ currentTime: number;
+ /** !#en The volume of the video.
+ !#zh 视频的音量(0.0 ~ 1.0) */
+ volume: number;
+ /** !#en Mutes the VideoPlayer. Mute sets the volume=0, Un-Mute restore the original volume.
+ !#zh 是否静音视频。静音时设置音量为 0,取消静音是恢复原来的音量。 */
+ mute: boolean;
+ /** !#en Whether keep the aspect ration of the original video.
+ !#zh 是否保持视频原来的宽高比 */
+ keepAspectRatio: boolean;
+ /** !#en Whether play video in fullscreen mode.
+ !#zh 是否全屏播放视频 */
+ isFullscreen: boolean;
+ /** !#en Always below the game view (only useful on Web. Note: The specific effects are not guaranteed to be consistent, depending on whether each browser supports or restricts).
+ !#zh 永远在游戏视图最底层(这个属性只有在 Web 平台上有效果。注意:具体效果无法保证一致,跟各个浏览器是否支持与限制有关) */
+ stayOnBottom: boolean;
+ /** !#en the video player's callback, it will be triggered when certain event occurs, like: playing, paused, stopped and completed.
+ !#zh 视频播放回调函数,该回调函数会在特定情况被触发,比如播放中,暂时,停止和完成播放。 */
+ videoPlayerEvent: Component.EventHandler[];
+ /**
+ !#en If a video is paused, call this method could resume playing. If a video is stopped, call this method to play from scratch.
+ !#zh 如果视频被暂停播放了,调用这个接口可以继续播放。如果视频被停止播放了,调用这个接口可以从头开始播放。
+ */
+ play(): void;
+ /**
+ !#en If a video is paused, call this method to resume playing.
+ !#zh 如果一个视频播放被暂停播放了,调用这个接口可以继续播放。
+ */
+ resume(): void;
+ /**
+ !#en If a video is playing, call this method to pause playing.
+ !#zh 如果一个视频正在播放,调用这个接口可以暂停播放。
+ */
+ pause(): void;
+ /**
+ !#en If a video is playing, call this method to stop playing immediately.
+ !#zh 如果一个视频正在播放,调用这个接口可以立马停止播放。
+ */
+ stop(): void;
+ /**
+ !#en Gets the duration of the video
+ !#zh 获取视频文件的播放总时长
+ */
+ getDuration(): number;
+ /**
+ !#en Determine whether video is playing or not.
+ !#zh 判断当前视频是否处于播放状态
+ */
+ isPlaying(): boolean;
+ /**
+ !#en if you don't need the VideoPlayer and it isn't in any running Scene, you should
+ call the destroy method on this component or the associated node explicitly.
+ Otherwise, the created DOM element won't be removed from web page.
+ !#zh
+ 如果你不再使用 VideoPlayer,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。
+ 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。
+
+ @example
+ ```js
+ videoplayer.node.parent = null; // or videoplayer.node.removeFromParent(false);
+ // when you don't need videoplayer anymore
+ videoplayer.node.destroy();
+ ```
+ */
+ destroy(): boolean;
+ }
+ /** !#en An object to boot the game.
+ !#zh 包含游戏主体信息并负责驱动游戏的游戏对象。 */
+ export class debug {
+ /**
+ !#en Gets error message with the error id and possible parameters.
+ !#zh 通过 error id 和必要的参数来获取错误信息。
+ @param errorId errorId
+ @param param param
+ */
+ static getError(errorId: number, param?: any): string;
+ /**
+ !#en Returns whether or not to display the FPS informations.
+ !#zh 是否显示 FPS 信息。
+ */
+ static isDisplayStats(): boolean;
+ /**
+ !#en Sets whether display the FPS on the bottom-left corner.
+ !#zh 设置是否在左下角显示 FPS。
+ @param displayStats displayStats
+ */
+ static setDisplayStats(displayStats: boolean): void;
+ }
+ /** !#en
+
+ cc.director is a singleton object which manage your game's logic flow.
+ Since the cc.director is a singleton, you don't need to call any constructor or create functions,
+ the standard way to use it is by calling:
+ - cc.director.methodName();
+
+ It creates and handle the main Window and manages how and when to execute the Scenes.
+
+ The cc.director is also responsible for:
+ - initializing the OpenGL context
+ - setting the OpenGL pixel format (default on is RGB565)
+ - setting the OpenGL buffer depth (default on is 0-bit)
+ - setting the color for clear screen (default one is BLACK)
+ - setting the projection (default one is 3D)
+ - setting the orientation (default one is Portrait)
+
+
+ The cc.director also sets the default OpenGL context:
+ - GL_TEXTURE_2D is enabled
+ - GL_VERTEX_ARRAY is enabled
+ - GL_COLOR_ARRAY is enabled
+ - GL_TEXTURE_COORD_ARRAY is enabled
+
+ Features and Limitations:
+ - Scheduled timers & drawing are synchronizes with the refresh rate of the display
+ - Only supports animation intervals of 1/60 1/30 & 1/15
+
+ cc.director 一个管理你的游戏的逻辑流程的单例对象。
+ 由于 cc.director 是一个单例,你不需要调用任何构造函数或创建函数,
+ 使用它的标准方法是通过调用:
+ - cc.director.methodName();
+
+ 它创建和处理主窗口并且管理什么时候执行场景。
+
+ cc.director 还负责:
+ - 初始化 OpenGL 环境。
+ - 设置OpenGL像素格式。(默认是 RGB565)
+ - 设置OpenGL缓冲区深度 (默认是 0-bit)
+ - 设置空白场景的颜色 (默认是 黑色)
+ - 设置投影 (默认是 3D)
+ - 设置方向 (默认是 Portrait)
+
+ cc.director 设置了 OpenGL 默认环境
+ - GL_TEXTURE_2D 启用。
+ - GL_VERTEX_ARRAY 启用。
+ - GL_COLOR_ARRAY 启用。
+ - GL_TEXTURE_COORD_ARRAY 启用。
+
+ 特点和局限性:
+ - 将计时器 & 渲染与显示器的刷新频率同步。
+ - 只支持动画的间隔 1/60 1/30 & 1/15。
+
+ Useful to convert (multi) touches coordinates to the current layout (portrait or landscape)
+ Implementation can be found in CCDirectorWebGL.
+ !#zh 将触摸点的屏幕坐标转换为 WebGL View 下的坐标。
+ @param uiPoint uiPoint
+ */
+ convertToGL(uiPoint: Vec2): Vec2;
+ /**
+ !#en
+ Converts an OpenGL coordinate to a view coordinate
+ Useful to convert node points to window points for calls such as glScissor
+ Implementation can be found in CCDirectorWebGL.
+ !#zh 将触摸点的 WebGL View 坐标转换为屏幕坐标。
+ @param glPoint glPoint
+ */
+ convertToUI(glPoint: Vec2): Vec2;
+ /**
+ End the life of director in the next frame
+ */
+ end(): void;
+ /**
+ !#en
+ Returns the size of the WebGL view in points.
+ It takes into account any possible rotation (device orientation) of the window.
+ !#zh 获取视图的大小,以点为单位。
+ */
+ getWinSize(): Size;
+ /**
+ !#en
+ Returns the size of the OpenGL view in pixels.
+ It takes into account any possible rotation (device orientation) of the window.
+ On Mac winSize and winSizeInPixels return the same value.
+ (The pixel here refers to the resource resolution. If you want to get the physics resolution of device, you need to use cc.view.getFrameSize())
+ !#zh
+ 获取视图大小,以像素为单位(这里的像素指的是资源分辨率。
+ 如果要获取屏幕物理分辨率,需要用 cc.view.getFrameSize())
+ */
+ getWinSizeInPixels(): Size;
+ /**
+ !#en Pause the director's ticker, only involve the game logic execution.
+ It won't pause the rendering process nor the event manager.
+ If you want to pause the entier game including rendering, audio and event,
+ please use {{#crossLink "Game.pause"}}cc.game.pause{{/crossLink}}
+ !#zh 暂停正在运行的场景,该暂停只会停止游戏逻辑执行,但是不会停止渲染和 UI 响应。
+ 如果想要更彻底得暂停游戏,包含渲染,音频和事件,请使用 {{#crossLink "Game.pause"}}cc.game.pause{{/crossLink}}。
+ */
+ pause(): void;
+ /**
+ !#en
+ Run a scene. Replaces the running scene with a new one or enter the first scene.
+ The new scene will be launched immediately.
+ !#zh 立刻切换指定场景。
+ @param scene The need run scene.
+ @param onBeforeLoadScene The function invoked at the scene before loading.
+ @param onLaunched The function invoked at the scene after launch.
+ */
+ runSceneImmediate(scene: Scene|SceneAsset, onBeforeLoadScene?: Function, onLaunched?: Function): void;
+ /**
+ !#en
+ Run a scene. Replaces the running scene with a new one or enter the first scene.
+ The new scene will be launched at the end of the current frame.
+ !#zh 运行指定场景。
+ @param scene The need run scene.
+ @param onBeforeLoadScene The function invoked at the scene before loading.
+ @param onLaunched The function invoked at the scene after launch.
+ */
+ runScene(scene: Scene|SceneAsset, onBeforeLoadScene?: Function, onLaunched?: Function): void;
+ /**
+ !#en Loads the scene by its name.
+ !#zh 通过场景名称进行加载场景。
+ @param sceneName The name of the scene to load.
+ @param onLaunched callback, will be called after scene launched.
+ */
+ loadScene(sceneName: string, onLaunched?: Function): boolean;
+ /**
+ !#en
+ Preloads the scene to reduces loading time. You can call this method at any time you want.
+ After calling this method, you still need to launch the scene by `cc.director.loadScene`.
+ It will be totally fine to call `cc.director.loadScene` at any time even if the preloading is not
+ yet finished, the scene will be launched after loaded automatically.
+ !#zh 预加载场景,你可以在任何时候调用这个方法。
+ 调用完后,你仍然需要通过 `cc.director.loadScene` 来启动场景,因为这个方法不会执行场景加载操作。
+ 就算预加载还没完成,你也可以直接调用 `cc.director.loadScene`,加载完成后场景就会启动。
+ @param sceneName The name of the scene to preload.
+ @param onProgress callback, will be called when the load progression change.
+ @param onLoaded callback, will be called after scene loaded.
+ */
+ preloadScene(sceneName: string, onProgress?: (completedCount: number, totalCount: number, item: any) => void, onLoaded?: (error: Error) => void): void;
+ /**
+ !#en Resume game logic execution after pause, if the current scene is not paused, nothing will happen.
+ !#zh 恢复暂停场景的游戏逻辑,如果当前场景没有暂停将没任何事情发生。
+ */
+ resume(): void;
+ /**
+ !#en
+ Enables or disables WebGL depth test.
+ Implementation can be found in CCDirectorCanvas.js/CCDirectorWebGL.js
+ !#zh 启用/禁用深度测试(在 Canvas 渲染模式下不会生效)。
+ @param on on
+ */
+ setDepthTest(on: boolean): void;
+ /**
+ !#en
+ Set color for clear screen.
+ (Implementation can be found in CCDirectorCanvas.js/CCDirectorWebGL.js)
+ !#zh
+ 设置场景的默认擦除颜色。
+ 支持全透明,但不支持透明度为中间值。要支持全透明需手工开启 cc.macro.ENABLE_TRANSPARENT_CANVAS。
+ @param clearColor clearColor
+ */
+ setClearColor(clearColor: Color): void;
+ /**
+ !#en Returns current logic Scene.
+ !#zh 获取当前逻辑场景。
+
+ @example
+ ```js
+ // This will help you to get the Canvas node in scene
+ cc.director.getScene().getChildByName('Canvas');
+ ```
+ */
+ getScene(): Scene;
+ /**
+ !#en Returns the FPS value. Please use {{#crossLink "Game.setFrameRate"}}cc.game.setFrameRate{{/crossLink}} to control animation interval.
+ !#zh 获取单位帧执行时间。请使用 {{#crossLink "Game.setFrameRate"}}cc.game.setFrameRate{{/crossLink}} 来控制游戏帧率。
+ */
+ getAnimationInterval(): number;
+ /**
+ Sets animation interval, this doesn't control the main loop.
+ To control the game's frame rate overall, please use {{#crossLink "Game.setFrameRate"}}cc.game.setFrameRate{{/crossLink}}
+ @param value The animation interval desired.
+ */
+ setAnimationInterval(value: number): void;
+ /**
+ !#en Returns the delta time since last frame.
+ !#zh 获取上一帧的增量时间。
+ */
+ getDeltaTime(): number;
+ /**
+ !#en Returns the total passed time since game start, unit: ms
+ !#zh 获取从游戏开始到现在总共经过的时间,单位为 ms
+ */
+ getTotalTime(): number;
+ /**
+ !#en Returns how many frames were called since the director started.
+ !#zh 获取 director 启动以来游戏运行的总帧数。
+ */
+ getTotalFrames(): number;
+ /**
+ !#en Returns whether or not the Director is paused.
+ !#zh 是否处于暂停状态。
+ */
+ isPaused(): boolean;
+ /**
+ !#en Returns the cc.Scheduler associated with this director.
+ !#zh 获取和 director 相关联的 cc.Scheduler。
+ */
+ getScheduler(): Scheduler;
+ /**
+ !#en Sets the cc.Scheduler associated with this director.
+ !#zh 设置和 director 相关联的 cc.Scheduler。
+ @param scheduler scheduler
+ */
+ setScheduler(scheduler: Scheduler): void;
+ /**
+ !#en Returns the cc.ActionManager associated with this director.
+ !#zh 获取和 director 相关联的 cc.ActionManager(动作管理器)。
+ */
+ getActionManager(): ActionManager;
+ /**
+ !#en Sets the cc.ActionManager associated with this director.
+ !#zh 设置和 director 相关联的 cc.ActionManager(动作管理器)。
+ @param actionManager actionManager
+ */
+ setActionManager(actionManager: ActionManager): void;
+ /**
+ !#en Returns the cc.CollisionManager associated with this director.
+ !#zh 获取和 director 相关联的 cc.CollisionManager (碰撞管理器)。
+ */
+ getCollisionManager(): CollisionManager;
+ /**
+ !#en Returns the cc.PhysicsManager associated with this director.
+ !#zh 返回与 director 相关联的 cc.PhysicsManager (物理管理器)。
+ */
+ getPhysicsManager(): PhysicsManager;
+ /**
+ !#en Returns the cc.Physics3DManager associated with this director.
+ !#zh 返回与 director 相关联的 cc.Physics3DManager (物理管理器)。
+ */
+ getPhysics3DManager(): Physics3DManager;
+ /** !#en The event projection changed of cc.Director. This event will not get triggered since v2.0
+ !#zh cc.Director 投影变化的事件。从 v2.0 开始这个事件不会再被触发 */
+ static EVENT_PROJECTION_CHANGED: string;
+ /** !#en The event which will be triggered before loading a new scene.
+ !#zh 加载新场景之前所触发的事件。 */
+ static EVENT_BEFORE_SCENE_LOADING: string;
+ /** !#en The event which will be triggered before launching a new scene.
+ !#zh 运行新场景之前所触发的事件。 */
+ static EVENT_BEFORE_SCENE_LAUNCH: string;
+ /** !#en The event which will be triggered after launching a new scene.
+ !#zh 运行新场景之后所触发的事件。 */
+ static EVENT_AFTER_SCENE_LAUNCH: string;
+ /** !#en The event which will be triggered at the beginning of every frame.
+ !#zh 每个帧的开始时所触发的事件。 */
+ static EVENT_BEFORE_UPDATE: string;
+ /** !#en The event which will be triggered after engine and components update logic.
+ !#zh 将在引擎和组件 “update” 逻辑之后所触发的事件。 */
+ static EVENT_AFTER_UPDATE: string;
+ /** !#en The event is deprecated since v2.0, please use cc.Director.EVENT_BEFORE_DRAW instead
+ !#zh 这个事件从 v2.0 开始被废弃,请直接使用 cc.Director.EVENT_BEFORE_DRAW */
+ static EVENT_BEFORE_VISIT: string;
+ /** !#en The event is deprecated since v2.0, please use cc.Director.EVENT_BEFORE_DRAW instead
+ !#zh 这个事件从 v2.0 开始被废弃,请直接使用 cc.Director.EVENT_BEFORE_DRAW */
+ static EVENT_AFTER_VISIT: string;
+ /** !#en The event which will be triggered before the rendering process.
+ !#zh 渲染过程之前所触发的事件。 */
+ static EVENT_BEFORE_DRAW: string;
+ /** !#en The event which will be triggered after the rendering process.
+ !#zh 渲染过程之后所触发的事件。 */
+ static EVENT_AFTER_DRAW: string;
+ /** Constant for 2D projection (orthogonal projection) */
+ static PROJECTION_2D: number;
+ /** Constant for 3D projection with a fovy=60, znear=0.5f and zfar=1500. */
+ static PROJECTION_3D: number;
+ /** Constant for custom projection, if cc.Director's projection set to it, it calls "updateProjection" on the projection delegate. */
+ static PROJECTION_CUSTOM: number;
+ /** Constant for default projection of cc.Director, default projection is 2D projection */
+ static PROJECTION_DEFAULT: number;
+ }
+ /** !#en An object to boot the game.
+ !#zh 包含游戏主体信息并负责驱动游戏的游戏对象。 */
+ export class Game extends EventTarget {
+ /** !#en Event triggered when game hide to background.
+ Please note that this event is not 100% guaranteed to be fired on Web platform,
+ on native platforms, it corresponds to enter background event, os status bar or notification center may not trigger this event.
+ !#zh 游戏进入后台时触发的事件。
+ 请注意,在 WEB 平台,这个事件不一定会 100% 触发,这完全取决于浏览器的回调行为。
+ 在原生平台,它对应的是应用被切换到后台事件,下拉菜单和上拉状态栏等不一定会触发这个事件,这取决于系统行为。 */
+ EVENT_HIDE: string;
+ /** !#en Event triggered when game back to foreground
+ Please note that this event is not 100% guaranteed to be fired on Web platform,
+ on native platforms, it corresponds to enter foreground event.
+ !#zh 游戏进入前台运行时触发的事件。
+ 请注意,在 WEB 平台,这个事件不一定会 100% 触发,这完全取决于浏览器的回调行为。
+ 在原生平台,它对应的是应用被切换到前台事件。 */
+ EVENT_SHOW: string;
+ /** !#en Event triggered when game restart
+ !#zh 调用restart后,触发事件。 */
+ EVENT_RESTART: string;
+ /** Event triggered after game inited, at this point all engine objects and game scripts are loaded */
+ EVENT_GAME_INITED: string;
+ /** Event triggered after engine inited, at this point you will be able to use all engine classes.
+ It was defined as EVENT_RENDERER_INITED in cocos creator v1.x and renamed in v2.0 */
+ EVENT_ENGINE_INITED: string;
+ /** Web Canvas 2d API as renderer backend */
+ RENDER_TYPE_CANVAS: number;
+ /** WebGL API as renderer backend */
+ RENDER_TYPE_WEBGL: number;
+ /** OpenGL API as renderer backend */
+ RENDER_TYPE_OPENGL: number;
+ /** !#en The outer frame of the game canvas, parent of game container.
+ !#zh 游戏画布的外框,container 的父容器。 */
+ frame: any;
+ /** !#en The container of game canvas.
+ !#zh 游戏画布的容器。 */
+ container: HTMLDivElement;
+ /** !#en The canvas of the game.
+ !#zh 游戏的画布。 */
+ canvas: HTMLCanvasElement;
+ /** !#en The renderer backend of the game.
+ !#zh 游戏的渲染器类型。 */
+ renderType: number;
+ /** !#en
+ The current game configuration, including:
+ 1. debugMode
+ "debugMode" possible values :
+ 0 - No message will be printed.
+ 1 - cc.error, cc.assert, cc.warn, cc.log will print in console.
+ 2 - cc.error, cc.assert, cc.warn will print in console.
+ 3 - cc.error, cc.assert will print in console.
+ 4 - cc.error, cc.assert, cc.warn, cc.log will print on canvas, available only on web.
+ 5 - cc.error, cc.assert, cc.warn will print on canvas, available only on web.
+ 6 - cc.error, cc.assert will print on canvas, available only on web.
+ 2. showFPS
+ Left bottom corner fps information will show when "showFPS" equals true, otherwise it will be hide.
+ 3. exposeClassName
+ Expose class name to chrome debug tools, the class intantiate performance is a little bit slower when exposed.
+ 4. frameRate
+ "frameRate" set the wanted frame rate for your game, but the real fps depends on your game implementation and the running environment.
+ 5. id
+ "gameCanvas" sets the id of your canvas element on the web page, it's useful only on web.
+ 6. renderMode
+ "renderMode" sets the renderer type, only useful on web :
+ 0 - Automatically chosen by engine
+ 1 - Forced to use canvas renderer
+ 2 - Forced to use WebGL renderer, but this will be ignored on mobile browsers
+
+ Please DO NOT modify this object directly, it won't have any effect.
+ !#zh
+ 当前的游戏配置,包括:
+ 1. debugMode(debug 模式,但是在浏览器中这个选项会被忽略)
+ "debugMode" 各种设置选项的意义。
+ 0 - 没有消息被打印出来。
+ 1 - cc.error,cc.assert,cc.warn,cc.log 将打印在 console 中。
+ 2 - cc.error,cc.assert,cc.warn 将打印在 console 中。
+ 3 - cc.error,cc.assert 将打印在 console 中。
+ 4 - cc.error,cc.assert,cc.warn,cc.log 将打印在 canvas 中(仅适用于 web 端)。
+ 5 - cc.error,cc.assert,cc.warn 将打印在 canvas 中(仅适用于 web 端)。
+ 6 - cc.error,cc.assert 将打印在 canvas 中(仅适用于 web 端)。
+ 2. showFPS(显示 FPS)
+ 当 showFPS 为 true 的时候界面的左下角将显示 fps 的信息,否则被隐藏。
+ 3. exposeClassName
+ 暴露类名让 Chrome DevTools 可以识别,如果开启会稍稍降低类的创建过程的性能,但对对象构造没有影响。
+ 4. frameRate (帧率)
+ “frameRate” 设置想要的帧率你的游戏,但真正的FPS取决于你的游戏实现和运行环境。
+ 5. id
+ "gameCanvas" Web 页面上的 Canvas Element ID,仅适用于 web 端。
+ 6. renderMode(渲染模式)
+ “renderMode” 设置渲染器类型,仅适用于 web 端:
+ 0 - 通过引擎自动选择。
+ 1 - 强制使用 canvas 渲染。
+ 2 - 强制使用 WebGL 渲染,但是在部分 Android 浏览器中这个选项会被忽略。
+
+ 注意:请不要直接修改这个对象,它不会有任何效果。 */
+ config: any;
+ /**
+ !#en Callback when the scripts of engine have been load.
+ !#zh 当引擎完成启动后的回调函数。
+ */
+ onStart(): void;
+ /**
+ !#en Set frame rate of game.
+ !#zh 设置游戏帧率。
+ @param frameRate frameRate
+ */
+ setFrameRate(frameRate: number): void;
+ /**
+ !#en Get frame rate set for the game, it doesn't represent the real frame rate.
+ !#zh 获取设置的游戏帧率(不等同于实际帧率)。
+ */
+ getFrameRate(): number;
+ /**
+ !#en Run the game frame by frame.
+ !#zh 执行一帧游戏循环。
+ */
+ step(): void;
+ /**
+ !#en Pause the game main loop. This will pause:
+ game logic execution, rendering process, event manager, background music and all audio effects.
+ This is different with cc.director.pause which only pause the game logic execution.
+ !#zh 暂停游戏主循环。包含:游戏逻辑,渲染,事件处理,背景音乐和所有音效。这点和只暂停游戏逻辑的 cc.director.pause 不同。
+ */
+ pause(): void;
+ /**
+ !#en Resume the game from pause. This will resume:
+ game logic execution, rendering process, event manager, background music and all audio effects.
+ !#zh 恢复游戏主循环。包含:游戏逻辑,渲染,事件处理,背景音乐和所有音效。
+ */
+ resume(): void;
+ /**
+ !#en Check whether the game is paused.
+ !#zh 判断游戏是否暂停。
+ */
+ isPaused(): boolean;
+ /**
+ !#en Restart game.
+ !#zh 重新开始游戏
+ */
+ restart(): void;
+ /**
+ !#en End game, it will close the game window
+ !#zh 退出游戏
+ */
+ end(): void;
+ /**
+ !#en
+ Register an callback of a specific event type on the game object.
+ This type of event should be triggered via `emit`.
+ !#zh
+ 注册 game 的特定事件类型回调。这种类型的事件应该被 `emit` 触发。
+ @param type A string representing the event type to listen for.
+ @param callback The callback that will be invoked when the event is dispatched.
+ The callback is ignored if it is a duplicate (the callbacks are unique).
+ @param target The target (this object) to invoke the callback, can be null
+ */
+ on
+ The target node must be placed in the root level of hierarchy, otherwise this API won't have any effect.
+ !#zh
+ 声明常驻根节点,该节点不会被在场景切换中被销毁。
+ 目标节点必须位于为层级的根节点,否则无效。
+ @param node The node to be made persistent
+ */
+ addPersistRootNode(node: Node): void;
+ /**
+ !#en Remove a persistent root node.
+ !#zh 取消常驻根节点。
+ @param node The node to be removed from persistent node list
+ */
+ removePersistRootNode(node: Node): void;
+ /**
+ !#en Check whether the node is a persistent root node.
+ !#zh 检查节点是否是常驻根节点。
+ @param node The node to be checked
+ */
+ isPersistRootNode(node: Node): boolean;
+ }
+ /** !#en
+ Class of private entities in Cocos Creator scenes.
+ The PrivateNode is hidden in editor, and completely transparent to users.
+ It's normally used as Node's private content created by components in parent node.
+ So in theory private nodes are not children, they are part of the parent node.
+ Private node have two important characteristics:
+ 1. It has the minimum z index and cannot be modified, because they can't be displayed over real children.
+ 2. The positioning of private nodes is also special, they will consider the left bottom corner of the parent node's bounding box as the origin of local coordinates.
+ In this way, they can be easily kept inside the bounding box.
+ Currently, it's used by RichText component and TileMap component.
+ !#zh
+ Cocos Creator 场景中的私有节点类。
+ 私有节点在编辑器中不可见,对用户透明。
+ 通常私有节点是被一些特殊的组件创建出来作为父节点的一部分而存在的,理论上来说,它们不是子节点,而是父节点的组成部分。
+ 私有节点有两个非常重要的特性:
+ 1. 它有着最小的渲染排序的 Z 轴深度,并且无法被更改,因为它们不能被显示在其他正常子节点之上。
+ 2. 它的定位也是特殊的,对于私有节点来说,父节点包围盒的左下角是它的局部坐标系原点,这个原点相当于父节点的位置减去它锚点的偏移。这样私有节点可以比较容易被控制在包围盒之中。
+ 目前在引擎中,RichText 和 TileMap 都有可能生成私有节点。 */
+ export class PrivateNode extends Node {
+ /**
+
+ @param name name
+ */
+ constructor(name?: string);
+ }
+ /** !#en
+ Class of all entities in Cocos Creator scenes.
+ For events supported by Node, please refer to {{#crossLink "Node.EventType"}}{{/crossLink}}
+ !#zh
+ Cocos Creator 场景中的所有节点类。
+ 支持的节点事件,请参阅 {{#crossLink "Node.EventType"}}{{/crossLink}}。 */
+ export class Node extends _BaseNode {
+ /** !#en
+ Group index of node.
+ Which Group this node belongs to will resolve that this node's collision components can collide with which other collision componentns.
+ !#zh
+ 节点的分组索引。
+ 节点的分组将关系到节点的碰撞组件可以与哪些碰撞组件相碰撞。
*/
+ groupIndex: number;
+ /** !#en
+ Group of node.
+ Which Group this node belongs to will resolve that this node's collision components can collide with which other collision componentns.
+ !#zh
+ 节点的分组。
+ 节点的分组将关系到节点的碰撞组件可以与哪些碰撞组件相碰撞。
*/
+ group: string;
+ /** !#en The position (x, y) of the node in its parent's coordinates.
+ !#zh 节点在父节点坐标系中的位置(x, y)。 */
+ position: Vec3;
+ /** !#en x axis position of node.
+ !#zh 节点 X 轴坐标。 */
+ x: number;
+ /** !#en y axis position of node.
+ !#zh 节点 Y 轴坐标。 */
+ y: number;
+ /** !#en z axis position of node.
+ !#zh 节点 Z 轴坐标。 */
+ z: number;
+ /** !#en Rotation of node.
+ !#zh 该节点旋转角度。 */
+ rotation: number;
+ /** !#en
+ Angle of node, the positive value is anti-clockwise direction.
+ !#zh
+ 该节点的旋转角度,正值为逆时针方向。 */
+ angle: number;
+ /** !#en The rotation as Euler angles in degrees, used in 3D node.
+ !#zh 该节点的欧拉角度,用于 3D 节点。 */
+ eulerAngles: Vec3;
+ /** !#en Rotation on x axis.
+ !#zh 该节点 X 轴旋转角度。 */
+ rotationX: number;
+ /** !#en Rotation on y axis.
+ !#zh 该节点 Y 轴旋转角度。 */
+ rotationY: number;
+ /** !#en The local scale relative to the parent.
+ !#zh 节点相对父节点的缩放。 */
+ scale: number;
+ /** !#en Scale on x axis.
+ !#zh 节点 X 轴缩放。 */
+ scaleX: number;
+ /** !#en Scale on y axis.
+ !#zh 节点 Y 轴缩放。 */
+ scaleY: number;
+ /** !#en Scale on z axis.
+ !#zh 节点 Z 轴缩放。 */
+ scaleZ: number;
+ /** !#en Skew x
+ !#zh 该节点 X 轴倾斜角度。 */
+ skewX: number;
+ /** !#en Skew y
+ !#zh 该节点 Y 轴倾斜角度。 */
+ skewY: number;
+ /** !#en Opacity of node, default value is 255.
+ !#zh 节点透明度,默认值为 255。 */
+ opacity: number;
+ /** !#en Color of node, default value is white: (255, 255, 255).
+ !#zh 节点颜色。默认为白色,数值为:(255,255,255)。 */
+ color: Color;
+ /** !#en Anchor point's position on x axis.
+ !#zh 节点 X 轴锚点位置。 */
+ anchorX: number;
+ /** !#en Anchor point's position on y axis.
+ !#zh 节点 Y 轴锚点位置。 */
+ anchorY: number;
+ /** !#en Width of node.
+ !#zh 节点宽度。 */
+ width: number;
+ /** !#en Height of node.
+ !#zh 节点高度。 */
+ height: number;
+ /** !#en zIndex is the 'key' used to sort the node relative to its siblings.
+ The value of zIndex should be in the range between cc.macro.MIN_ZINDEX and cc.macro.MAX_ZINDEX.
+ The Node's parent will sort all its children based on the zIndex value and the arrival order.
+ Nodes with greater zIndex will be sorted after nodes with smaller zIndex.
+ If two nodes have the same zIndex, then the node that was added first to the children's array will be in front of the other node in the array.
+ Node's order in children list will affect its rendering order. Parent is always rendering before all children.
+ !#zh zIndex 是用来对节点进行排序的关键属性,它决定一个节点在兄弟节点之间的位置。
+ zIndex 的取值应该介于 cc.macro.MIN_ZINDEX 和 cc.macro.MAX_ZINDEX 之间
+ 父节点主要根据节点的 zIndex 和添加次序来排序,拥有更高 zIndex 的节点将被排在后面,如果两个节点的 zIndex 一致,先添加的节点会稳定排在另一个节点之前。
+ 节点在 children 中的顺序决定了其渲染顺序。父节点永远在所有子节点之前被渲染 */
+ zIndex: number;
+ /** !#en
+ Switch 2D/3D node. The 2D nodes will run faster.
+ !#zh
+ 切换 2D/3D 节点,2D 节点会有更高的运行效率 */
+ is3DNode: boolean;
+ /** !#en Returns a normalized vector representing the up direction (Y axis) of the node in world space.
+ !#zh 获取节点正上方(y 轴)面对的方向,返回值为世界坐标系下的归一化向量 */
+ up: Vec3;
+ /** !#en Returns a normalized vector representing the right direction (X axis) of the node in world space.
+ !#zh 获取节点正右方(x 轴)面对的方向,返回值为世界坐标系下的归一化向量 */
+ right: Vec3;
+ /** !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space.
+ !#zh 获取节点正前方(z 轴)面对的方向,返回值为世界坐标系下的归一化向量 */
+ forward: Vec3;
+ /**
+
+ @param name name
+ */
+ constructor(name?: string);
+ /**
+ !#en
+ Register a callback of a specific event type on Node.
+ Use this method to register touch or mouse event permit propagation based on scene graph,
+ These kinds of event are triggered with dispatchEvent, the dispatch process has three steps:
+ 1. Capturing phase: dispatch in capture targets (`_getCapturingTargets`), e.g. parents in node tree, from root to the real target
+ 2. At target phase: dispatch to the listeners of the real target
+ 3. Bubbling phase: dispatch in bubble targets (`_getBubblingTargets`), e.g. parents in node tree, from the real target to root
+ In any moment of the dispatching process, it can be stopped via `event.stopPropagation()` or `event.stopPropagationImmidiate()`.
+ It's the recommended way to register touch/mouse event for Node,
+ please do not use cc.eventManager directly for Node.
+ You can also register custom event and use `emit` to trigger custom event on Node.
+ For such events, there won't be capturing and bubbling phase, your event will be dispatched directly to its listeners registered on the same node.
+ You can also pass event callback parameters with `emit` by passing parameters after `type`.
+ !#zh
+ 在节点上注册指定类型的回调函数,也可以设置 target 用于绑定响应函数的 this 对象。
+ 鼠标或触摸事件会被系统调用 dispatchEvent 方法触发,触发的过程包含三个阶段:
+ 1. 捕获阶段:派发事件给捕获目标(通过 `_getCapturingTargets` 获取),比如,节点树中注册了捕获阶段的父节点,从根节点开始派发直到目标节点。
+ 2. 目标阶段:派发给目标节点的监听器。
+ 3. 冒泡阶段:派发事件给冒泡目标(通过 `_getBubblingTargets` 获取),比如,节点树中注册了冒泡阶段的父节点,从目标节点开始派发直到根节点。
+ 同时您可以将事件派发到父节点或者通过调用 stopPropagation 拦截它。
+ 推荐使用这种方式来监听节点上的触摸或鼠标事件,请不要在节点上直接使用 cc.eventManager。
+ 你也可以注册自定义事件到节点上,并通过 emit 方法触发此类事件,对于这类事件,不会发生捕获冒泡阶段,只会直接派发给注册在该节点上的监听器
+ 你可以通过在 emit 方法调用时在 type 之后传递额外的参数作为事件回调的参数列表
+ @param type A string representing the event type to listen for.
See {{#crossLink "Node/EventTyupe/POSITION_CHANGED"}}Node Events{{/crossLink}} for all builtin events.
+ @param callback The callback that will be invoked when the event is dispatched. The callback is ignored if it is a duplicate (the callbacks are unique).
+ @param target The target (this object) to invoke the callback, can be null
+ @param useCapture When set to true, the listener will be triggered at capturing phase which is ahead of the final target emit, otherwise it will be triggered during bubbling phase.
+
+ @example
+ ```js
+ this.node.on(cc.Node.EventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass.
+ node.on(cc.Node.EventType.TOUCH_START, callback, this);
+ node.on(cc.Node.EventType.TOUCH_MOVE, callback, this);
+ node.on(cc.Node.EventType.TOUCH_END, callback, this);
+ node.on(cc.Node.EventType.TOUCH_CANCEL, callback, this);
+ node.on(cc.Node.EventType.ANCHOR_CHANGED, callback);
+ node.on(cc.Node.EventType.COLOR_CHANGED, callback);
+ ```
+ */
+ on
+ The node becomes the action's target. Refer to cc.Action's getTarget()
+ Calling runAction while the node is not active won't have any effect.
+ Note:You shouldn't modify the action after runAction, that won't take any effect.
+ if you want to modify, when you define action plus.
+ !#zh
+ 执行并返回该执行的动作。该节点将会变成动作的目标。
+ 调用 runAction 时,节点自身处于不激活状态将不会有任何效果。
+ 注意:你不应该修改 runAction 后的动作,将无法发挥作用,如果想进行修改,请在定义 action 时加入。
+ @param action action
+
+ @example
+ ```js
+ var action = cc.scaleTo(0.2, 1, 0.6);
+ node.runAction(action);
+ node.runAction(action).repeatForever(); // fail
+ node.runAction(action.repeatForever()); // right
+ ```
+ */
+ runAction(action: Action): Action;
+ /**
+ !#en Pause all actions running on the current node. Equals to `cc.director.getActionManager().pauseTarget(node)`.
+ !#zh 暂停本节点上所有正在运行的动作。和 `cc.director.getActionManager().pauseTarget(node);` 等价。
+
+ @example
+ ```js
+ node.pauseAllActions();
+ ```
+ */
+ pauseAllActions(): void;
+ /**
+ !#en Resume all paused actions on the current node. Equals to `cc.director.getActionManager().resumeTarget(node)`.
+ !#zh 恢复运行本节点上所有暂停的动作。和 `cc.director.getActionManager().resumeTarget(node);` 等价。
+
+ @example
+ ```js
+ node.resumeAllActions();
+ ```
+ */
+ resumeAllActions(): void;
+ /**
+ !#en Stops and removes all actions from the running action list .
+ !#zh 停止并且移除所有正在运行的动作列表。
+
+ @example
+ ```js
+ node.stopAllActions();
+ ```
+ */
+ stopAllActions(): void;
+ /**
+ !#en Stops and removes an action from the running action list.
+ !#zh 停止并移除指定的动作。
+ @param action An action object to be removed.
+
+ @example
+ ```js
+ var action = cc.scaleTo(0.2, 1, 0.6);
+ node.stopAction(action);
+ ```
+ */
+ stopAction(action: Action): void;
+ /**
+ !#en Removes an action from the running action list by its tag.
+ !#zh 停止并且移除指定标签的动作。
+ @param tag A tag that indicates the action to be removed.
+
+ @example
+ ```js
+ node.stopActionByTag(1);
+ ```
+ */
+ stopActionByTag(tag: number): void;
+ /**
+ !#en Returns an action from the running action list by its tag.
+ !#zh 通过标签获取指定动作。
+ @param tag tag
+
+ @example
+ ```js
+ var action = node.getActionByTag(1);
+ ```
+ */
+ getActionByTag(tag: number): Action;
+ /**
+ !#en
+ Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
+ Composable actions are counted as 1 action. Example:
+ If you are running 1 Sequence of 7 actions, it will return 1.
+ If you are running 7 Sequences of 2 actions, it will return 7.
+ The scheduled method will be called every 'interval' seconds.
+ If paused is YES, then it won't be called until it is resumed.
+ If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead.
+ If the callback function is already scheduled, then only the interval parameter will be updated without re-scheduling it again.
+ repeat let the action be repeated repeat + 1 times, use cc.macro.REPEAT_FOREVER to let the action run continuously
+ delay is the amount of time the action will wait before it'll start. Unit: s.
+
+ Gets current target of the event
+ note: It only be available when the event listener is associated with node.
+ It returns 0 when the listener is associated with fixed priority.
+
+ If enabled, the texture coordinates will be calculated by using this formula:
+ - texCoord.left = (rect.x*2+1) / (texture.wide*2);
+ - texCoord.right = texCoord.left + (rect.width*2-2)/(texture.wide*2);
+
+ The same for bottom and top.
+
+ This formula prevents artifacts by using 99% of the texture.
+ The "correct" way to prevent artifacts is by expand the texture's border with the same color by 1 pixel
+
+ Affected component:
+ - cc.TMXLayer
+
+ Enabled by default. To disabled set it to 0.
+ To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h
+
+ If enabled, actions that alter the position property (eg: CCMoveBy, CCJumpBy, CCBezierBy, etc..) will be stacked.
+ If you run 2 or more 'position' actions at the same time on a node, then end position will be the sum of all the positions.
+ If disabled, only the last run action will take effect.
+
cc.game.containerStrategy class is the root strategy class of container's scale strategy, + it controls the behavior of how to scale the cc.game.container and cc.game.canvas object
*/ + export class ContainerStrategy { + /** + !#en + Manipulation before appling the strategy + !#zh 在应用策略之前的操作 + @param view The target view + */ + preApply(view: View): void; + /** + !#en + Function to apply this strategy + !#zh 策略应用方法 + @param view view + @param designedResolution designedResolution + */ + apply(view: View, designedResolution: Size): void; + /** + !#en + Manipulation after applying the strategy + !#zh 策略调用之后的操作 + @param view The target view + */ + postApply(view: View): void; + } + /**cc.ContentStrategy class is the root strategy class of content's scale strategy, + it controls the behavior of how to scale the scene and setup the viewport for the game
*/ + export class ContentStrategy { + /** + !#en + Manipulation before applying the strategy + !#zh 策略应用前的操作 + @param view The target view + */ + preApply(view: View): void; + /** + !#en Function to apply this strategy + The return value is {scale: [scaleX, scaleY], viewport: {cc.Rect}}, + The target view can then apply these value to itself, it's preferred not to modify directly its private variables + !#zh 调用策略方法 + @param view view + @param designedResolution designedResolution + */ + apply(view: View, designedResolution: Size): any; + /** + !#en + Manipulation after applying the strategy + !#zh 策略调用之后的操作 + @param view The target view + */ + postApply(view: View): void; + } + /** undefined */ + export class EqualToFrame extends ContainerStrategy { + } + /** undefined */ + export class ProportionalToFrame extends ContainerStrategy { + } + /** undefined */ + export class EqualToWindow extends EqualToFrame { + } + /** undefined */ + export class ProportionalToWindow extends ProportionalToFrame { + } + /** undefined */ + export class OriginalContainer extends ContainerStrategy { + } + /**cc.ResolutionPolicy class is the root strategy class of scale strategy, + its main task is to maintain the compatibility with Cocos2d-x
*/ + export class ResolutionPolicy { + /** + + @param containerStg The container strategy + @param contentStg The content strategy + */ + constructor(containerStg: ContainerStrategy, contentStg: ContentStrategy); + /** + !#en Manipulation before applying the resolution policy + !#zh 策略应用前的操作 + @param view The target view + */ + preApply(view: View): void; + /** + !#en Function to apply this resolution policy + The return value is {scale: [scaleX, scaleY], viewport: {cc.Rect}}, + The target view can then apply these value to itself, it's preferred not to modify directly its private variables + !#zh 调用策略方法 + @param view The target view + @param designedResolution The user defined design resolution + */ + apply(view: View, designedResolution: Size): any; + /** + !#en Manipulation after appyling the strategy + !#zh 策略应用之后的操作 + @param view The target view + */ + postApply(view: View): void; + /** + !#en + Setup the container's scale strategy + !#zh 设置容器的适配策略 + @param containerStg containerStg + */ + setContainerStrategy(containerStg: ContainerStrategy): void; + /** + !#en + Setup the content's scale strategy + !#zh 设置内容的适配策略 + @param contentStg contentStg + */ + setContentStrategy(contentStg: ContentStrategy): void; + /** The entire application is visible in the specified area without trying to preserve the original aspect ratio.