├── project.json ├── assets ├── Script │ ├── .DS_Store │ ├── Lib.meta │ ├── rank.ts.meta │ ├── test.ts.meta │ ├── Lib │ │ ├── Util.ts.meta │ │ ├── NodePoolManager.ts.meta │ │ ├── OptimizeDrawCall.ts.meta │ │ ├── Util.ts │ │ ├── NodePoolManager.ts │ │ └── OptimizeDrawCall.ts │ ├── rank.ts │ └── test.ts ├── Texture │ ├── singleColor.png │ └── singleColor.png.meta ├── Scene.meta ├── Script.meta ├── Texture.meta ├── Prefab.meta ├── Scene │ ├── rank.fire.meta │ ├── test.fire.meta │ ├── test.fire │ └── rank.fire └── Prefab │ ├── word.prefab.meta │ ├── flowLine.prefab.meta │ ├── rankItem.prefab.meta │ ├── word.ts.meta │ ├── flowLine.ts.meta │ ├── rankItem.ts.meta │ ├── flowLine.ts │ ├── rankItem.ts │ ├── word.ts │ ├── flowLine.prefab │ ├── word.prefab │ └── rankItem.prefab ├── tsconfig.json └── README.md /project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos2d-html5", 3 | "packages": "packages", 4 | "version": "2.1.2" 5 | } -------------------------------------------------------------------------------- /assets/Script/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nemo1105/optimize_draw_call/HEAD/assets/Script/.DS_Store -------------------------------------------------------------------------------- /assets/Texture/singleColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nemo1105/optimize_draw_call/HEAD/assets/Texture/singleColor.png -------------------------------------------------------------------------------- /assets/Scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Texture.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "7b81d4e8-ec84-4716-968d-500ac1d78a54", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "f5107968-d2e7-445d-9633-3f7b08a4b0d2", 4 | "isSubpackage": false, 5 | "subpackageName": "", 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /assets/Script/Lib.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "1b778c7e-7f41-4d12-b45a-e134f05dfa90", 4 | "isSubpackage": false, 5 | "subpackageName": "", 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /assets/Scene/rank.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "uuid": "6a9c301a-6f27-4382-857f-a874dcf63b4e", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /assets/Scene/test.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "uuid": "5d85dc03-73ad-4a07-80b7-c6156edcae41", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /assets/Prefab/word.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "uuid": "bd5a246f-28e0-4f0a-be4f-2d0cb2f85912", 4 | "optimizationPolicy": "AUTO", 5 | "asyncLoadAssets": false, 6 | "readonly": false, 7 | "subMetas": {} 8 | } -------------------------------------------------------------------------------- /assets/Prefab/flowLine.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "uuid": "9206acb2-b674-4007-9a7f-03b4588ca5e5", 4 | "optimizationPolicy": "AUTO", 5 | "asyncLoadAssets": false, 6 | "readonly": false, 7 | "subMetas": {} 8 | } -------------------------------------------------------------------------------- /assets/Prefab/rankItem.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "uuid": "bfebcd17-8665-4d07-b360-5864fcf3de1f", 4 | "optimizationPolicy": "AUTO", 5 | "asyncLoadAssets": false, 6 | "readonly": false, 7 | "subMetas": {} 8 | } -------------------------------------------------------------------------------- /assets/Prefab/word.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "cce9beee-47a9-4e64-bcf0-b53c23cebf54", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/rank.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "8dd44f7e-f5cf-4dfb-931f-e8f3ae4c97c4", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/test.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "15010987-cebb-442f-9c19-3a30bca9c3a5", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Prefab/flowLine.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "ec5bb6cc-3031-496b-89f0-7aadcd42561a", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Prefab/rankItem.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "b00b98e9-19ee-49ef-802d-b8e207e47a19", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/Lib/Util.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "adfb5b4b-4de2-4b08-a02f-9478ea12b69a", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/Lib/NodePoolManager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "69eabc56-e00c-4736-868d-2d0c62c1e68b", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/Lib/OptimizeDrawCall.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "08fbb9af-790d-4b86-99f5-6e0864baecdc", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/Lib/Util.ts: -------------------------------------------------------------------------------- 1 | 2 | export default class Util { 3 | 4 | /** 5 | * 生成随机整数 6 | * @param min 最小值 包含 7 | * @param max 最大值 包含 8 | * @returns number 9 | */ 10 | static random(min: number, max: number): number { 11 | return Math.floor(Math.random() * (max - min)) + 1 + min; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "lib": [ "dom", "es5", "es2015.promise" , "esnext.asynciterable"], 5 | "target": "es5", 6 | "allowJs": true, 7 | "experimentalDecorators": true, 8 | "skipLibCheck": true 9 | }, 10 | "exclude": [ 11 | "node_modules", 12 | "library", 13 | "local", 14 | "temp", 15 | "build", 16 | "settings" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /assets/Prefab/flowLine.ts: -------------------------------------------------------------------------------- 1 | const {ccclass, property} = cc._decorator; 2 | 3 | @ccclass 4 | export default class FlowLine extends cc.Component { 5 | 6 | // LIFE-CYCLE CALLBACKS: 7 | 8 | onLoad () { 9 | } 10 | 11 | start () { 12 | } 13 | 14 | unuse(){ 15 | cc.log("unuse line", this.node.uuid, this.node) 16 | } 17 | 18 | reuse(){ 19 | cc.log("reuse line", this.node.uuid, this.node) 20 | } 21 | 22 | // update (dt) {} 23 | } 24 | -------------------------------------------------------------------------------- /assets/Prefab/rankItem.ts: -------------------------------------------------------------------------------- 1 | const { ccclass, property } = cc._decorator; 2 | 3 | @ccclass 4 | export default class RankItem extends cc.Component { 5 | @property(cc.Label) 6 | rank: cc.Label = null; 7 | @property(cc.Label) 8 | nickname: cc.Label = null; 9 | @property(cc.Label) 10 | score: cc.Label = null; 11 | 12 | init(rank: number, nickname: string, score: number) { 13 | this.rank.string = rank.toString() 14 | this.nickname.string = nickname 15 | this.score.string = score.toString() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /assets/Prefab/word.ts: -------------------------------------------------------------------------------- 1 | const { ccclass, property } = cc._decorator; 2 | 3 | @ccclass 4 | export default class Word extends cc.Component { 5 | 6 | @property(cc.Label) 7 | label: cc.Label = null; 8 | 9 | callback = null; 10 | 11 | // LIFE-CYCLE CALLBACKS: 12 | 13 | // onLoad () {} 14 | 15 | setWord(word: string) { 16 | this.label.string = word 17 | } 18 | 19 | unuse(){ 20 | cc.log("unuse word", this.node.uuid, this.node) 21 | } 22 | 23 | reuse(){ 24 | cc.log("reuse word", this.node.uuid, this.node) 25 | } 26 | // update (dt) {} 27 | } 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Optimize Draw Call Demo 2 | 3 | Only for CocosCreator 4 | 5 | The core file is `assets/Script/Lib/OptimizeDrawCall.ts`. You can copy it to your project. 6 | 7 | Topic: https://forum.cocos.com/t/draw-call/80902 8 | 9 | 10 | ## DEMO 11 | 12 | - [x] common prefabs(bag) 13 | - [x] rank(scroll view) 14 | 15 | ## DONE 16 | 17 | - [x] support multiple paths(Now, you can also use multiple nodes that contain this Component to do it) 18 | - [x] support multiple root nodes 19 | - [x] support inactive nodes 20 | 21 | ## TODO 22 | 23 | - [ ] support proxy mode(when you destory optimized node's parent, it will not destory automatically) 24 | -------------------------------------------------------------------------------- /assets/Texture/singleColor.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "2.3.1", 3 | "uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "premultiplyAlpha": false, 8 | "platformSettings": {}, 9 | "subMetas": { 10 | "singleColor": { 11 | "ver": "1.0.4", 12 | "uuid": "410fb916-8721-4663-bab8-34397391ace7", 13 | "rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", 14 | "trimType": "auto", 15 | "trimThreshold": 1, 16 | "rotated": false, 17 | "offsetX": 0, 18 | "offsetY": 0, 19 | "trimX": 0, 20 | "trimY": 0, 21 | "width": 2, 22 | "height": 2, 23 | "rawWidth": 2, 24 | "rawHeight": 2, 25 | "borderTop": 0, 26 | "borderBottom": 0, 27 | "borderLeft": 0, 28 | "borderRight": 0, 29 | "subMetas": {} 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /assets/Script/rank.ts: -------------------------------------------------------------------------------- 1 | import OptimizeDrawCall from "./Lib/OptimizeDrawCall"; 2 | import NodepoolManager from "./Lib/NodePoolManager"; 3 | import RankItem from "../Prefab/rankItem"; 4 | 5 | const { ccclass, property } = cc._decorator; 6 | 7 | @ccclass 8 | export default class Rank extends cc.Component { 9 | 10 | @property(cc.Node) 11 | list: cc.Node = null 12 | 13 | @property(cc.Prefab) 14 | item: cc.Prefab = null 15 | 16 | @property(OptimizeDrawCall) 17 | optimizeDrawCall: OptimizeDrawCall = null 18 | 19 | @property(NodepoolManager) 20 | nodePoolManager: NodepoolManager = null 21 | 22 | start() { 23 | for (let i = 0; i < 30; ++i) { 24 | let item = this.nodePoolManager.get(this.item) 25 | item.getComponent(RankItem).init(i + 1, "Nemo_" + i, 100 - i) 26 | this.list.addChild(item) 27 | } 28 | // 模拟下一页数据 29 | setTimeout(() => { 30 | for (let i = 30; i < 60; ++i) { 31 | let item = this.nodePoolManager.get(this.item) 32 | item.getComponent(RankItem).init(i + 1, "Nemo_" + i, 100 - i) 33 | this.list.addChild(item) 34 | } 35 | this.optimizeDrawCall.do() 36 | }, 5000); 37 | } 38 | 39 | back() { 40 | cc.director.loadScene("main") 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/Script/test.ts: -------------------------------------------------------------------------------- 1 | import Util from "./Lib/Util"; 2 | import Word from "../Prefab/word"; 3 | 4 | const { ccclass, property } = cc._decorator; 5 | 6 | @ccclass 7 | export default class Test extends cc.Component { 8 | 9 | @property(cc.Prefab) 10 | word: cc.Prefab = null; 11 | 12 | @property(cc.Prefab) 13 | line: cc.Prefab = null; 14 | 15 | start() { 16 | for (let i = 0; i < 30; ++i) { 17 | let line = cc.instantiate(this.line); 18 | for (let j = 0; j < 5; j++) { 19 | let word = cc.instantiate(this.word); 20 | line.addChild(word) 21 | line.setPosition(Util.random(-this.node.width / 2, this.node.width / 2), Util.random(-this.node.height / 2, this.node.height)) 22 | word.setPosition(Util.random(-this.node.width / 2, this.node.width / 2), Util.random(-this.node.height / 2, this.node.height)) 23 | word.getComponent(Word).setWord(Util.random(1, 9).toString()) 24 | // TODO:无法消除,需要使用替换的方式,使用代理节点替换待优化节点。当有任何动作时,通知已优化节点做同样操作 25 | word.on(cc.Node.EventType.TOUCH_START, event => this.destroy()) 26 | } 27 | this.node.addChild(line) 28 | } 29 | } 30 | 31 | gotoScene(event: cc.Event, scene: string) { 32 | cc.director.loadScene(scene) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /assets/Script/Lib/NodePoolManager.ts: -------------------------------------------------------------------------------- 1 | const { ccclass, property, menu } = cc._decorator; 2 | 3 | @ccclass("NodePoolOptions") 4 | export class NodePoolOptions { 5 | 6 | @property({ 7 | type: cc.Prefab, 8 | displayName: 'Prefab' 9 | }) 10 | prefab: cc.Prefab = undefined 11 | 12 | @property({ 13 | type: cc.Integer, 14 | displayName: '初始化大小' 15 | }) 16 | size = 1 17 | 18 | @property({ 19 | displayName: 'handler组件名', 20 | tooltip: '挂载在Prefab上的组件,需要实现reuse、unuse方法。类需要指定类名,例如:@ccclass("className")' 21 | }) 22 | handlerName: string = '' 23 | } 24 | 25 | /** 26 | * 对象池管理组件 27 | * @author Nemo 28 | * @version 1.0 29 | */ 30 | @ccclass 31 | @menu("优化组件/对象池管理") 32 | export default class NodepoolManager extends cc.Component { 33 | 34 | @property({ 35 | type: NodePoolOptions, 36 | displayName: '对象池', 37 | }) 38 | options: NodePoolOptions[] = [] 39 | 40 | pool: { [index: string]: cc.NodePool } = {} 41 | 42 | onLoad() { 43 | this.options.forEach(option => { 44 | this.pool[option.prefab.name] = new cc.NodePool(option.handlerName) 45 | for (let i = 0; i < option.size; i++) { 46 | this.pool[option.prefab.name].put(cc.instantiate(option.prefab)) 47 | } 48 | }) 49 | } 50 | 51 | get(prefab: cc.Prefab): cc.Node { 52 | if (typeof this.pool[prefab.name] == "undefined") { 53 | cc.error("init pool without handler", prefab.name, prefab) 54 | this.pool[prefab.name] = new cc.NodePool() 55 | } 56 | if (this.pool[prefab.name].size() > 0) { 57 | return this.pool[prefab.name].get() 58 | } 59 | cc.warn("pool init", prefab.name, prefab) 60 | return cc.instantiate(prefab) 61 | } 62 | 63 | put(node: cc.Node) { 64 | this.pool[node.name].put(node) 65 | } 66 | 67 | } -------------------------------------------------------------------------------- /assets/Prefab/flowLine.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "asyncLoadAssets": false, 12 | "readonly": false 13 | }, 14 | { 15 | "__type__": "cc.Node", 16 | "_name": "flowLine", 17 | "_objFlags": 0, 18 | "_parent": null, 19 | "_children": [], 20 | "_active": true, 21 | "_level": 1, 22 | "_components": [ 23 | { 24 | "__id__": 2 25 | }, 26 | { 27 | "__id__": 3 28 | }, 29 | { 30 | "__id__": 4 31 | } 32 | ], 33 | "_prefab": { 34 | "__id__": 5 35 | }, 36 | "_opacity": 255, 37 | "_color": { 38 | "__type__": "cc.Color", 39 | "r": 51, 40 | "g": 51, 41 | "b": 51, 42 | "a": 255 43 | }, 44 | "_contentSize": { 45 | "__type__": "cc.Size", 46 | "width": 640, 47 | "height": 2 48 | }, 49 | "_anchorPoint": { 50 | "__type__": "cc.Vec2", 51 | "x": 0.5, 52 | "y": 0.5 53 | }, 54 | "_position": { 55 | "__type__": "cc.Vec3", 56 | "x": 320, 57 | "y": 0, 58 | "z": 0 59 | }, 60 | "_scale": { 61 | "__type__": "cc.Vec3", 62 | "x": 1, 63 | "y": 1, 64 | "z": 1 65 | }, 66 | "_eulerAngles": { 67 | "__type__": "cc.Vec3", 68 | "x": 0, 69 | "y": 0, 70 | "z": 0 71 | }, 72 | "_skewX": 0, 73 | "_skewY": 0, 74 | "_is3DNode": false, 75 | "groupIndex": 0, 76 | "_id": "" 77 | }, 78 | { 79 | "__type__": "cc.Widget", 80 | "_name": "", 81 | "_objFlags": 0, 82 | "node": { 83 | "__id__": 1 84 | }, 85 | "_enabled": true, 86 | "alignMode": 1, 87 | "_target": null, 88 | "_alignFlags": 40, 89 | "_left": 0, 90 | "_right": 0, 91 | "_top": 0, 92 | "_bottom": 0, 93 | "_verticalCenter": 0, 94 | "_horizontalCenter": 0, 95 | "_isAbsLeft": true, 96 | "_isAbsRight": true, 97 | "_isAbsTop": true, 98 | "_isAbsBottom": true, 99 | "_isAbsHorizontalCenter": true, 100 | "_isAbsVerticalCenter": true, 101 | "_originalWidth": 0, 102 | "_originalHeight": 0, 103 | "_id": "" 104 | }, 105 | { 106 | "__type__": "cc.Sprite", 107 | "_name": "", 108 | "_objFlags": 0, 109 | "node": { 110 | "__id__": 1 111 | }, 112 | "_enabled": true, 113 | "_materials": [ 114 | { 115 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 116 | } 117 | ], 118 | "_srcBlendFactor": 770, 119 | "_dstBlendFactor": 771, 120 | "_spriteFrame": { 121 | "__uuid__": "410fb916-8721-4663-bab8-34397391ace7" 122 | }, 123 | "_type": 0, 124 | "_sizeMode": 0, 125 | "_fillType": 0, 126 | "_fillCenter": { 127 | "__type__": "cc.Vec2", 128 | "x": 0, 129 | "y": 0 130 | }, 131 | "_fillStart": 0, 132 | "_fillRange": 0, 133 | "_isTrimmedMode": true, 134 | "_atlas": null, 135 | "_id": "" 136 | }, 137 | { 138 | "__type__": "ec5bbbMMDFJa4nweq3NQlYa", 139 | "_name": "", 140 | "_objFlags": 0, 141 | "node": { 142 | "__id__": 1 143 | }, 144 | "_enabled": true, 145 | "_id": "" 146 | }, 147 | { 148 | "__type__": "cc.PrefabInfo", 149 | "root": { 150 | "__id__": 1 151 | }, 152 | "asset": { 153 | "__uuid__": "9206acb2-b674-4007-9a7f-03b4588ca5e5" 154 | }, 155 | "fileId": "b2H1SAnXBOE5GWVn/gT8wk", 156 | "sync": false 157 | } 158 | ] -------------------------------------------------------------------------------- /assets/Script/Lib/OptimizeDrawCall.ts: -------------------------------------------------------------------------------- 1 | const { ccclass, property, menu, executionOrder, help } = cc._decorator; 2 | 3 | @ccclass("OptimizeDrawCallOptions") 4 | export class OptimizeDrawCallOptions { 5 | 6 | @property({ 7 | displayName: '开启优化', 8 | tooltip: '用于对比优化效果' 9 | }) 10 | enabledOptimize: boolean = true 11 | 12 | /** 13 | * 待优化节点所属根节点 14 | * 从此节点下获取指定路径指定名称的子节点进行优化 15 | */ 16 | @property({ 17 | type: cc.Node, 18 | displayName: '待优化根节点', 19 | tooltip: '从此节点下获取指定路径指定名称的子节点进行优化' 20 | }) 21 | rootNode: cc.Node = null; 22 | 23 | /** 24 | * 待优化节点的路径,层级使用斜线分隔 25 | * 例如:nodeNameA/nodeNameB/nodeNameC 26 | */ 27 | @property({ 28 | type: cc.String, 29 | displayName: '待优化节点路径', 30 | tooltip: '相对于待优化根节点计算,顺序决定zIndex,索引低的在底层。例如:nodeNameA/nodeNameB/nodeNameC' 31 | }) 32 | pathToNode: string[] = []; 33 | 34 | /** 35 | * 待隐藏节点的路径,层级使用斜线分隔 36 | * 例如:nodeNameA/nodeNameB/nodeNameC 37 | */ 38 | @property({ 39 | type: cc.String, 40 | displayName: '待隐藏节点路径', 41 | tooltip: '相对于待优化根节点计算,用于移除占用高度的空节点(子节点全部被优化的父节点)。例如:nodeNameA/nodeNameB/nodeNameC' 42 | }) 43 | pathToNode4Hide: string[] = []; 44 | 45 | /** 46 | * 存放分层节点的节点 47 | * 要考虑好和优化节点的联动 48 | */ 49 | @property({ 50 | type: cc.Node, 51 | displayName: '分层容器', 52 | tooltip: '所有优化后的节点挂到此节点上' 53 | }) 54 | container: cc.Node = null; 55 | 56 | /** 57 | * 分层节点的zIndex 58 | */ 59 | @property({ 60 | type: cc.Integer, 61 | displayName: '分层节点zIndex', 62 | tooltip: '如层级不对,可自行调整,一般节点层级默认为0' 63 | }) 64 | containerZIndex: number = 1; 65 | } 66 | 67 | 68 | /** 69 | * Draw Call优化组件 70 | * 通过把相同类型的节点放在一起,合并draw call实现降低draw call效果 71 | * @author Nemo 72 | * @thanks mister_akai 73 | * @version 1.2 74 | * @link https://forum.cocos.com/t/draw-call/80902 75 | * @source https://github.com/wclssdn/optimize_draw_call/ 76 | */ 77 | @ccclass 78 | @menu("优化组件/DrawCall") 79 | @executionOrder(1) 80 | @help("https://github.com/wclssdn/optimize_draw_call/") 81 | export default class OptimizeDrawCall extends cc.Component { 82 | 83 | @property({ 84 | type: OptimizeDrawCallOptions, 85 | displayName: '优化项', 86 | tooltip: '不共享同一个根节点,更灵活' 87 | }) 88 | options: OptimizeDrawCallOptions[] = [] 89 | 90 | start() { 91 | this.do() 92 | } 93 | 94 | /** 95 | * 执行优化操作 96 | * 当节点内容发生动态变化时,可手动调用 97 | */ 98 | do() { 99 | this.options.forEach(option => { 100 | cc.log("option", option.enabledOptimize) 101 | if (!option.enabledOptimize){ 102 | return 103 | } 104 | let widget = option.rootNode.getComponent(cc.Widget) 105 | if (widget) { 106 | widget.updateAlignment() 107 | } 108 | let layout = option.rootNode.getComponent(cc.Layout) 109 | if (layout) { 110 | layout.updateLayout() 111 | } 112 | option.container.width = option.rootNode.width 113 | option.container.height = option.rootNode.height 114 | option.rootNode.on(cc.Node.EventType.SIZE_CHANGED, () => { 115 | option.container.width = option.rootNode.width 116 | option.container.height = option.rootNode.height 117 | }) 118 | option.pathToNode.forEach((nodePath, zIndex) => { 119 | this.findTarget(option.rootNode, nodePath).forEach(node => { 120 | let pos = option.container.convertToNodeSpaceAR(node.convertToWorldSpaceAR(cc.Vec2.ZERO)) 121 | node.parent = option.container; 122 | node.position = pos 123 | node.zIndex = zIndex 124 | }) 125 | }) 126 | // 子节点均被优化掉,隐藏对应节点,释放位置 127 | option.pathToNode4Hide.forEach(nodePath => { 128 | this.findTarget(option.rootNode, nodePath).forEach(node => node.active = false) 129 | }) 130 | option.container.zIndex = option.containerZIndex 131 | }) 132 | } 133 | 134 | findTarget(rootNode: cc.Node, nodePath: string): cc.Node[] { 135 | if (!rootNode) { 136 | return [] 137 | } 138 | let path = nodePath.split('/').filter(v => v.length > 0); 139 | let firstPath = path.shift() 140 | if (path.length == 0) { 141 | return rootNode.children.filter(v => v.name == firstPath) 142 | } 143 | let target = [] 144 | rootNode.children.forEach(v => { 145 | if (v.name == firstPath) { 146 | target = target.concat(this.findTarget(v, path.join('/'))) 147 | } 148 | }) 149 | return target 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /assets/Prefab/word.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "asyncLoadAssets": false, 12 | "readonly": false 13 | }, 14 | { 15 | "__type__": "cc.Node", 16 | "_name": "word", 17 | "_objFlags": 0, 18 | "_parent": null, 19 | "_children": [ 20 | { 21 | "__id__": 2 22 | }, 23 | { 24 | "__id__": 5 25 | } 26 | ], 27 | "_active": true, 28 | "_level": 1, 29 | "_components": [ 30 | { 31 | "__id__": 8 32 | }, 33 | { 34 | "__id__": 9 35 | } 36 | ], 37 | "_prefab": { 38 | "__id__": 11 39 | }, 40 | "_opacity": 255, 41 | "_color": { 42 | "__type__": "cc.Color", 43 | "r": 231, 44 | "g": 0, 45 | "b": 0, 46 | "a": 255 47 | }, 48 | "_contentSize": { 49 | "__type__": "cc.Size", 50 | "width": 100, 51 | "height": 100 52 | }, 53 | "_anchorPoint": { 54 | "__type__": "cc.Vec2", 55 | "x": 0.5, 56 | "y": 0.5 57 | }, 58 | "_position": { 59 | "__type__": "cc.Vec3", 60 | "x": 0, 61 | "y": 0, 62 | "z": 0 63 | }, 64 | "_scale": { 65 | "__type__": "cc.Vec3", 66 | "x": 1, 67 | "y": 1, 68 | "z": 1 69 | }, 70 | "_eulerAngles": { 71 | "__type__": "cc.Vec3", 72 | "x": 0, 73 | "y": 0, 74 | "z": 0 75 | }, 76 | "_skewX": 0, 77 | "_skewY": 0, 78 | "_is3DNode": false, 79 | "groupIndex": 0, 80 | "_rotationX": 0, 81 | "_rotationY": 0, 82 | "_id": "" 83 | }, 84 | { 85 | "__type__": "cc.Node", 86 | "_name": "bg", 87 | "_objFlags": 0, 88 | "_parent": { 89 | "__id__": 1 90 | }, 91 | "_children": [], 92 | "_active": true, 93 | "_level": 2, 94 | "_components": [ 95 | { 96 | "__id__": 3 97 | } 98 | ], 99 | "_prefab": { 100 | "__id__": 4 101 | }, 102 | "_opacity": 255, 103 | "_color": { 104 | "__type__": "cc.Color", 105 | "r": 148, 106 | "g": 76, 107 | "b": 76, 108 | "a": 255 109 | }, 110 | "_contentSize": { 111 | "__type__": "cc.Size", 112 | "width": 100, 113 | "height": 90 114 | }, 115 | "_anchorPoint": { 116 | "__type__": "cc.Vec2", 117 | "x": 0.5, 118 | "y": 0.5 119 | }, 120 | "_position": { 121 | "__type__": "cc.Vec3", 122 | "x": 0, 123 | "y": 0, 124 | "z": 0 125 | }, 126 | "_scale": { 127 | "__type__": "cc.Vec3", 128 | "x": 1, 129 | "y": 1, 130 | "z": 1 131 | }, 132 | "_eulerAngles": { 133 | "__type__": "cc.Vec3", 134 | "x": 0, 135 | "y": 0, 136 | "z": 0 137 | }, 138 | "_skewX": 0, 139 | "_skewY": 0, 140 | "_is3DNode": false, 141 | "groupIndex": 0, 142 | "_rotationX": 0, 143 | "_rotationY": 0, 144 | "_id": "" 145 | }, 146 | { 147 | "__type__": "cc.Sprite", 148 | "_name": "", 149 | "_objFlags": 0, 150 | "node": { 151 | "__id__": 2 152 | }, 153 | "_enabled": true, 154 | "_materials": [ 155 | { 156 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 157 | } 158 | ], 159 | "_srcBlendFactor": 770, 160 | "_dstBlendFactor": 771, 161 | "_spriteFrame": { 162 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 163 | }, 164 | "_type": 0, 165 | "_sizeMode": 0, 166 | "_fillType": 0, 167 | "_fillCenter": { 168 | "__type__": "cc.Vec2", 169 | "x": 0, 170 | "y": 0 171 | }, 172 | "_fillStart": 0, 173 | "_fillRange": 0, 174 | "_isTrimmedMode": true, 175 | "_atlas": null, 176 | "_id": "" 177 | }, 178 | { 179 | "__type__": "cc.PrefabInfo", 180 | "root": { 181 | "__id__": 1 182 | }, 183 | "asset": { 184 | "__uuid__": "bd5a246f-28e0-4f0a-be4f-2d0cb2f85912" 185 | }, 186 | "fileId": "c3rOnn3mJLHpJe4ltl8Uv2", 187 | "sync": false 188 | }, 189 | { 190 | "__type__": "cc.Node", 191 | "_name": "word label", 192 | "_objFlags": 0, 193 | "_parent": { 194 | "__id__": 1 195 | }, 196 | "_children": [], 197 | "_active": true, 198 | "_level": 2, 199 | "_components": [ 200 | { 201 | "__id__": 6 202 | } 203 | ], 204 | "_prefab": { 205 | "__id__": 7 206 | }, 207 | "_opacity": 255, 208 | "_color": { 209 | "__type__": "cc.Color", 210 | "r": 255, 211 | "g": 255, 212 | "b": 255, 213 | "a": 255 214 | }, 215 | "_contentSize": { 216 | "__type__": "cc.Size", 217 | "width": 0, 218 | "height": 52.4 219 | }, 220 | "_anchorPoint": { 221 | "__type__": "cc.Vec2", 222 | "x": 0.5, 223 | "y": 0.5 224 | }, 225 | "_position": { 226 | "__type__": "cc.Vec3", 227 | "x": 0, 228 | "y": 0, 229 | "z": 0 230 | }, 231 | "_scale": { 232 | "__type__": "cc.Vec3", 233 | "x": 1, 234 | "y": 1, 235 | "z": 1 236 | }, 237 | "_eulerAngles": { 238 | "__type__": "cc.Vec3", 239 | "x": 0, 240 | "y": 0, 241 | "z": 0 242 | }, 243 | "_skewX": 0, 244 | "_skewY": 0, 245 | "_is3DNode": false, 246 | "groupIndex": 0, 247 | "_rotationX": 0, 248 | "_rotationY": 0, 249 | "_id": "" 250 | }, 251 | { 252 | "__type__": "cc.Label", 253 | "_name": "", 254 | "_objFlags": 0, 255 | "node": { 256 | "__id__": 5 257 | }, 258 | "_enabled": true, 259 | "_materials": [ 260 | { 261 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 262 | } 263 | ], 264 | "_useOriginalSize": false, 265 | "_string": "", 266 | "_N$string": "", 267 | "_fontSize": 40, 268 | "_lineHeight": 42, 269 | "_enableWrapText": true, 270 | "_N$file": null, 271 | "_isSystemFontUsed": true, 272 | "_spacingX": 0, 273 | "_batchAsBitmap": false, 274 | "_N$horizontalAlign": 1, 275 | "_N$verticalAlign": 1, 276 | "_N$fontFamily": "Arial", 277 | "_N$overflow": 0, 278 | "_N$cacheMode": 2, 279 | "_id": "" 280 | }, 281 | { 282 | "__type__": "cc.PrefabInfo", 283 | "root": { 284 | "__id__": 1 285 | }, 286 | "asset": { 287 | "__uuid__": "bd5a246f-28e0-4f0a-be4f-2d0cb2f85912" 288 | }, 289 | "fileId": "a8M5zAAxNMHL0iTTTwzuyB", 290 | "sync": false 291 | }, 292 | { 293 | "__type__": "cce9b7uR6lOZLzwtTwjzr9U", 294 | "_name": "", 295 | "_objFlags": 0, 296 | "node": { 297 | "__id__": 1 298 | }, 299 | "_enabled": true, 300 | "label": { 301 | "__id__": 6 302 | }, 303 | "_id": "" 304 | }, 305 | { 306 | "__type__": "cc.Button", 307 | "_name": "", 308 | "_objFlags": 0, 309 | "node": { 310 | "__id__": 1 311 | }, 312 | "_enabled": true, 313 | "duration": 0.1, 314 | "zoomScale": 1.2, 315 | "clickEvents": [ 316 | { 317 | "__id__": 10 318 | } 319 | ], 320 | "_N$interactable": true, 321 | "_N$enableAutoGrayEffect": false, 322 | "_N$transition": 0, 323 | "transition": 0, 324 | "_N$normalColor": { 325 | "__type__": "cc.Color", 326 | "r": 214, 327 | "g": 214, 328 | "b": 214, 329 | "a": 255 330 | }, 331 | "_N$pressedColor": { 332 | "__type__": "cc.Color", 333 | "r": 211, 334 | "g": 211, 335 | "b": 211, 336 | "a": 255 337 | }, 338 | "pressedColor": { 339 | "__type__": "cc.Color", 340 | "r": 211, 341 | "g": 211, 342 | "b": 211, 343 | "a": 255 344 | }, 345 | "_N$hoverColor": { 346 | "__type__": "cc.Color", 347 | "r": 255, 348 | "g": 255, 349 | "b": 255, 350 | "a": 255 351 | }, 352 | "hoverColor": { 353 | "__type__": "cc.Color", 354 | "r": 255, 355 | "g": 255, 356 | "b": 255, 357 | "a": 255 358 | }, 359 | "_N$disabledColor": { 360 | "__type__": "cc.Color", 361 | "r": 124, 362 | "g": 124, 363 | "b": 124, 364 | "a": 255 365 | }, 366 | "_N$normalSprite": null, 367 | "_N$pressedSprite": null, 368 | "pressedSprite": null, 369 | "_N$hoverSprite": null, 370 | "hoverSprite": null, 371 | "_N$disabledSprite": null, 372 | "_N$target": { 373 | "__id__": 1 374 | }, 375 | "_id": "" 376 | }, 377 | { 378 | "__type__": "cc.ClickEvent", 379 | "target": { 380 | "__id__": 1 381 | }, 382 | "component": "", 383 | "_componentId": "cce9b7uR6lOZLzwtTwjzr9U", 384 | "handler": "onTap", 385 | "customEventData": "" 386 | }, 387 | { 388 | "__type__": "cc.PrefabInfo", 389 | "root": { 390 | "__id__": 1 391 | }, 392 | "asset": { 393 | "__uuid__": "bd5a246f-28e0-4f0a-be4f-2d0cb2f85912" 394 | }, 395 | "fileId": "a58IKsTzFB2LkcfjltkUDy", 396 | "sync": false 397 | } 398 | ] -------------------------------------------------------------------------------- /assets/Prefab/rankItem.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "asyncLoadAssets": false, 12 | "readonly": false 13 | }, 14 | { 15 | "__type__": "cc.Node", 16 | "_name": "item", 17 | "_objFlags": 0, 18 | "_parent": null, 19 | "_children": [ 20 | { 21 | "__id__": 2 22 | }, 23 | { 24 | "__id__": 6 25 | }, 26 | { 27 | "__id__": 10 28 | }, 29 | { 30 | "__id__": 14 31 | } 32 | ], 33 | "_active": true, 34 | "_level": 1, 35 | "_components": [ 36 | { 37 | "__id__": 18 38 | }, 39 | { 40 | "__id__": 19 41 | } 42 | ], 43 | "_prefab": { 44 | "__id__": 20 45 | }, 46 | "_opacity": 255, 47 | "_color": { 48 | "__type__": "cc.Color", 49 | "r": 0, 50 | "g": 0, 51 | "b": 0, 52 | "a": 255 53 | }, 54 | "_contentSize": { 55 | "__type__": "cc.Size", 56 | "width": 640, 57 | "height": 60 58 | }, 59 | "_anchorPoint": { 60 | "__type__": "cc.Vec2", 61 | "x": 0, 62 | "y": 1 63 | }, 64 | "_position": { 65 | "__type__": "cc.Vec3", 66 | "x": 0, 67 | "y": 0, 68 | "z": 0 69 | }, 70 | "_scale": { 71 | "__type__": "cc.Vec3", 72 | "x": 1, 73 | "y": 1, 74 | "z": 1 75 | }, 76 | "_eulerAngles": { 77 | "__type__": "cc.Vec3", 78 | "x": 0, 79 | "y": 0, 80 | "z": 0 81 | }, 82 | "_skewX": 0, 83 | "_skewY": 0, 84 | "_is3DNode": false, 85 | "groupIndex": 0, 86 | "_rotationX": 0, 87 | "_rotationY": 0, 88 | "_id": "" 89 | }, 90 | { 91 | "__type__": "cc.Node", 92 | "_name": "rank", 93 | "_objFlags": 0, 94 | "_parent": { 95 | "__id__": 1 96 | }, 97 | "_children": [], 98 | "_active": true, 99 | "_level": 1, 100 | "_components": [ 101 | { 102 | "__id__": 3 103 | }, 104 | { 105 | "__id__": 4 106 | } 107 | ], 108 | "_prefab": { 109 | "__id__": 5 110 | }, 111 | "_opacity": 255, 112 | "_color": { 113 | "__type__": "cc.Color", 114 | "r": 255, 115 | "g": 255, 116 | "b": 255, 117 | "a": 255 118 | }, 119 | "_contentSize": { 120 | "__type__": "cc.Size", 121 | "width": 97.89, 122 | "height": 50.4 123 | }, 124 | "_anchorPoint": { 125 | "__type__": "cc.Vec2", 126 | "x": 0.5, 127 | "y": 0.5 128 | }, 129 | "_position": { 130 | "__type__": "cc.Vec3", 131 | "x": 58.935, 132 | "y": -30, 133 | "z": 0 134 | }, 135 | "_scale": { 136 | "__type__": "cc.Vec3", 137 | "x": 1, 138 | "y": 1, 139 | "z": 1 140 | }, 141 | "_eulerAngles": { 142 | "__type__": "cc.Vec3", 143 | "x": 0, 144 | "y": 0, 145 | "z": 0 146 | }, 147 | "_skewX": 0, 148 | "_skewY": 0, 149 | "_is3DNode": false, 150 | "groupIndex": 0, 151 | "_rotationX": 0, 152 | "_rotationY": 0, 153 | "_id": "" 154 | }, 155 | { 156 | "__type__": "cc.Label", 157 | "_name": "", 158 | "_objFlags": 0, 159 | "node": { 160 | "__id__": 2 161 | }, 162 | "_enabled": true, 163 | "_materials": [ 164 | { 165 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 166 | } 167 | ], 168 | "_useOriginalSize": false, 169 | "_string": "Label", 170 | "_N$string": "Label", 171 | "_fontSize": 40, 172 | "_lineHeight": 40, 173 | "_enableWrapText": true, 174 | "_N$file": null, 175 | "_isSystemFontUsed": true, 176 | "_spacingX": 0, 177 | "_batchAsBitmap": false, 178 | "_N$horizontalAlign": 1, 179 | "_N$verticalAlign": 1, 180 | "_N$fontFamily": "Arial", 181 | "_N$overflow": 0, 182 | "_N$cacheMode": 2, 183 | "_id": "" 184 | }, 185 | { 186 | "__type__": "cc.Widget", 187 | "_name": "", 188 | "_objFlags": 0, 189 | "node": { 190 | "__id__": 2 191 | }, 192 | "_enabled": true, 193 | "alignMode": 0, 194 | "_target": null, 195 | "_alignFlags": 8, 196 | "_left": 9.990000000000002, 197 | "_right": 0, 198 | "_top": 0, 199 | "_bottom": 0, 200 | "_verticalCenter": 0, 201 | "_horizontalCenter": 0, 202 | "_isAbsLeft": true, 203 | "_isAbsRight": true, 204 | "_isAbsTop": true, 205 | "_isAbsBottom": true, 206 | "_isAbsHorizontalCenter": true, 207 | "_isAbsVerticalCenter": true, 208 | "_originalWidth": 0, 209 | "_originalHeight": 0, 210 | "_id": "" 211 | }, 212 | { 213 | "__type__": "cc.PrefabInfo", 214 | "root": { 215 | "__id__": 1 216 | }, 217 | "asset": { 218 | "__uuid__": "bfebcd17-8665-4d07-b360-5864fcf3de1f" 219 | }, 220 | "fileId": "1aYch6UwRPfIwx94ItWEip", 221 | "sync": false 222 | }, 223 | { 224 | "__type__": "cc.Node", 225 | "_name": "nickname", 226 | "_objFlags": 0, 227 | "_parent": { 228 | "__id__": 1 229 | }, 230 | "_children": [], 231 | "_active": true, 232 | "_level": 1, 233 | "_components": [ 234 | { 235 | "__id__": 7 236 | }, 237 | { 238 | "__id__": 8 239 | } 240 | ], 241 | "_prefab": { 242 | "__id__": 9 243 | }, 244 | "_opacity": 255, 245 | "_color": { 246 | "__type__": "cc.Color", 247 | "r": 255, 248 | "g": 255, 249 | "b": 255, 250 | "a": 255 251 | }, 252 | "_contentSize": { 253 | "__type__": "cc.Size", 254 | "width": 97.89, 255 | "height": 50.4 256 | }, 257 | "_anchorPoint": { 258 | "__type__": "cc.Vec2", 259 | "x": 0.5, 260 | "y": 0.5 261 | }, 262 | "_position": { 263 | "__type__": "cc.Vec3", 264 | "x": 231.945, 265 | "y": -30, 266 | "z": 0 267 | }, 268 | "_scale": { 269 | "__type__": "cc.Vec3", 270 | "x": 1, 271 | "y": 1, 272 | "z": 1 273 | }, 274 | "_eulerAngles": { 275 | "__type__": "cc.Vec3", 276 | "x": 0, 277 | "y": 0, 278 | "z": 0 279 | }, 280 | "_skewX": 0, 281 | "_skewY": 0, 282 | "_is3DNode": false, 283 | "groupIndex": 0, 284 | "_rotationX": 0, 285 | "_rotationY": 0, 286 | "_id": "" 287 | }, 288 | { 289 | "__type__": "cc.Label", 290 | "_name": "", 291 | "_objFlags": 0, 292 | "node": { 293 | "__id__": 6 294 | }, 295 | "_enabled": true, 296 | "_materials": [ 297 | { 298 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 299 | } 300 | ], 301 | "_useOriginalSize": false, 302 | "_string": "Label", 303 | "_N$string": "Label", 304 | "_fontSize": 40, 305 | "_lineHeight": 40, 306 | "_enableWrapText": true, 307 | "_N$file": null, 308 | "_isSystemFontUsed": true, 309 | "_spacingX": 0, 310 | "_batchAsBitmap": false, 311 | "_N$horizontalAlign": 1, 312 | "_N$verticalAlign": 1, 313 | "_N$fontFamily": "Arial", 314 | "_N$overflow": 0, 315 | "_N$cacheMode": 2, 316 | "_id": "" 317 | }, 318 | { 319 | "__type__": "cc.Widget", 320 | "_name": "", 321 | "_objFlags": 0, 322 | "node": { 323 | "__id__": 6 324 | }, 325 | "_enabled": true, 326 | "alignMode": 0, 327 | "_target": null, 328 | "_alignFlags": 8, 329 | "_left": 183, 330 | "_right": 0, 331 | "_top": 0, 332 | "_bottom": 0, 333 | "_verticalCenter": 0, 334 | "_horizontalCenter": 0, 335 | "_isAbsLeft": true, 336 | "_isAbsRight": true, 337 | "_isAbsTop": true, 338 | "_isAbsBottom": true, 339 | "_isAbsHorizontalCenter": true, 340 | "_isAbsVerticalCenter": true, 341 | "_originalWidth": 0, 342 | "_originalHeight": 0, 343 | "_id": "" 344 | }, 345 | { 346 | "__type__": "cc.PrefabInfo", 347 | "root": { 348 | "__id__": 1 349 | }, 350 | "asset": { 351 | "__uuid__": "bfebcd17-8665-4d07-b360-5864fcf3de1f" 352 | }, 353 | "fileId": "17NRa7kiVAOLX1Ik6PXpP3", 354 | "sync": false 355 | }, 356 | { 357 | "__type__": "cc.Node", 358 | "_name": "score", 359 | "_objFlags": 0, 360 | "_parent": { 361 | "__id__": 1 362 | }, 363 | "_children": [], 364 | "_active": true, 365 | "_level": 1, 366 | "_components": [ 367 | { 368 | "__id__": 11 369 | }, 370 | { 371 | "__id__": 12 372 | } 373 | ], 374 | "_prefab": { 375 | "__id__": 13 376 | }, 377 | "_opacity": 255, 378 | "_color": { 379 | "__type__": "cc.Color", 380 | "r": 255, 381 | "g": 255, 382 | "b": 255, 383 | "a": 255 384 | }, 385 | "_contentSize": { 386 | "__type__": "cc.Size", 387 | "width": 97.89, 388 | "height": 50.4 389 | }, 390 | "_anchorPoint": { 391 | "__type__": "cc.Vec2", 392 | "x": 0.5, 393 | "y": 0.5 394 | }, 395 | "_position": { 396 | "__type__": "cc.Vec3", 397 | "x": 581.0649999999999, 398 | "y": -30, 399 | "z": 0 400 | }, 401 | "_scale": { 402 | "__type__": "cc.Vec3", 403 | "x": 1, 404 | "y": 1, 405 | "z": 1 406 | }, 407 | "_eulerAngles": { 408 | "__type__": "cc.Vec3", 409 | "x": 0, 410 | "y": 0, 411 | "z": 0 412 | }, 413 | "_skewX": 0, 414 | "_skewY": 0, 415 | "_is3DNode": false, 416 | "groupIndex": 0, 417 | "_rotationX": 0, 418 | "_rotationY": 0, 419 | "_id": "" 420 | }, 421 | { 422 | "__type__": "cc.Label", 423 | "_name": "", 424 | "_objFlags": 0, 425 | "node": { 426 | "__id__": 10 427 | }, 428 | "_enabled": true, 429 | "_materials": [ 430 | { 431 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 432 | } 433 | ], 434 | "_useOriginalSize": false, 435 | "_string": "Label", 436 | "_N$string": "Label", 437 | "_fontSize": 40, 438 | "_lineHeight": 40, 439 | "_enableWrapText": true, 440 | "_N$file": null, 441 | "_isSystemFontUsed": true, 442 | "_spacingX": 0, 443 | "_batchAsBitmap": false, 444 | "_N$horizontalAlign": 1, 445 | "_N$verticalAlign": 1, 446 | "_N$fontFamily": "Arial", 447 | "_N$overflow": 0, 448 | "_N$cacheMode": 2, 449 | "_id": "" 450 | }, 451 | { 452 | "__type__": "cc.Widget", 453 | "_name": "", 454 | "_objFlags": 0, 455 | "node": { 456 | "__id__": 10 457 | }, 458 | "_enabled": true, 459 | "alignMode": 0, 460 | "_target": null, 461 | "_alignFlags": 32, 462 | "_left": 0, 463 | "_right": 9.990000000000002, 464 | "_top": 0, 465 | "_bottom": 0, 466 | "_verticalCenter": 0, 467 | "_horizontalCenter": 0, 468 | "_isAbsLeft": true, 469 | "_isAbsRight": true, 470 | "_isAbsTop": true, 471 | "_isAbsBottom": true, 472 | "_isAbsHorizontalCenter": true, 473 | "_isAbsVerticalCenter": true, 474 | "_originalWidth": 0, 475 | "_originalHeight": 0, 476 | "_id": "" 477 | }, 478 | { 479 | "__type__": "cc.PrefabInfo", 480 | "root": { 481 | "__id__": 1 482 | }, 483 | "asset": { 484 | "__uuid__": "bfebcd17-8665-4d07-b360-5864fcf3de1f" 485 | }, 486 | "fileId": "e2K0oOKE5HnLb5xHbX0Umu", 487 | "sync": false 488 | }, 489 | { 490 | "__type__": "cc.Node", 491 | "_name": "line", 492 | "_objFlags": 0, 493 | "_parent": { 494 | "__id__": 1 495 | }, 496 | "_children": [], 497 | "_active": true, 498 | "_level": 2, 499 | "_components": [ 500 | { 501 | "__id__": 15 502 | }, 503 | { 504 | "__id__": 16 505 | } 506 | ], 507 | "_prefab": { 508 | "__id__": 17 509 | }, 510 | "_opacity": 255, 511 | "_color": { 512 | "__type__": "cc.Color", 513 | "r": 255, 514 | "g": 255, 515 | "b": 255, 516 | "a": 255 517 | }, 518 | "_contentSize": { 519 | "__type__": "cc.Size", 520 | "width": 640, 521 | "height": 2 522 | }, 523 | "_anchorPoint": { 524 | "__type__": "cc.Vec2", 525 | "x": 0.5, 526 | "y": 0.5 527 | }, 528 | "_position": { 529 | "__type__": "cc.Vec3", 530 | "x": 320, 531 | "y": -50.963, 532 | "z": 0 533 | }, 534 | "_scale": { 535 | "__type__": "cc.Vec3", 536 | "x": 1, 537 | "y": 1, 538 | "z": 1 539 | }, 540 | "_eulerAngles": { 541 | "__type__": "cc.Vec3", 542 | "x": 0, 543 | "y": 0, 544 | "z": 0 545 | }, 546 | "_skewX": 0, 547 | "_skewY": 0, 548 | "_is3DNode": false, 549 | "groupIndex": 0, 550 | "_rotationX": 0, 551 | "_rotationY": 0, 552 | "_id": "" 553 | }, 554 | { 555 | "__type__": "cc.Sprite", 556 | "_name": "", 557 | "_objFlags": 0, 558 | "node": { 559 | "__id__": 14 560 | }, 561 | "_enabled": true, 562 | "_materials": [ 563 | { 564 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 565 | } 566 | ], 567 | "_srcBlendFactor": 770, 568 | "_dstBlendFactor": 771, 569 | "_spriteFrame": { 570 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 571 | }, 572 | "_type": 0, 573 | "_sizeMode": 0, 574 | "_fillType": 0, 575 | "_fillCenter": { 576 | "__type__": "cc.Vec2", 577 | "x": 0, 578 | "y": 0 579 | }, 580 | "_fillStart": 0, 581 | "_fillRange": 0, 582 | "_isTrimmedMode": true, 583 | "_atlas": null, 584 | "_id": "" 585 | }, 586 | { 587 | "__type__": "cc.Widget", 588 | "_name": "", 589 | "_objFlags": 0, 590 | "node": { 591 | "__id__": 14 592 | }, 593 | "_enabled": true, 594 | "alignMode": 1, 595 | "_target": null, 596 | "_alignFlags": 40, 597 | "_left": 0, 598 | "_right": 0, 599 | "_top": 0, 600 | "_bottom": 49, 601 | "_verticalCenter": 0, 602 | "_horizontalCenter": 0, 603 | "_isAbsLeft": true, 604 | "_isAbsRight": true, 605 | "_isAbsTop": true, 606 | "_isAbsBottom": true, 607 | "_isAbsHorizontalCenter": true, 608 | "_isAbsVerticalCenter": true, 609 | "_originalWidth": 100, 610 | "_originalHeight": 0, 611 | "_id": "" 612 | }, 613 | { 614 | "__type__": "cc.PrefabInfo", 615 | "root": { 616 | "__id__": 1 617 | }, 618 | "asset": { 619 | "__uuid__": "bfebcd17-8665-4d07-b360-5864fcf3de1f" 620 | }, 621 | "fileId": "1a2RLnGS9JCIQvL1ysKfYh", 622 | "sync": false 623 | }, 624 | { 625 | "__type__": "cc.Widget", 626 | "_name": "", 627 | "_objFlags": 0, 628 | "node": { 629 | "__id__": 1 630 | }, 631 | "_enabled": true, 632 | "alignMode": 0, 633 | "_target": null, 634 | "_alignFlags": 40, 635 | "_left": 0, 636 | "_right": 0, 637 | "_top": 0, 638 | "_bottom": 0, 639 | "_verticalCenter": 0, 640 | "_horizontalCenter": 0, 641 | "_isAbsLeft": true, 642 | "_isAbsRight": true, 643 | "_isAbsTop": true, 644 | "_isAbsBottom": true, 645 | "_isAbsHorizontalCenter": true, 646 | "_isAbsVerticalCenter": true, 647 | "_originalWidth": 131.33, 648 | "_originalHeight": 0, 649 | "_id": "" 650 | }, 651 | { 652 | "__type__": "b00b9jpGe5J74AtuOIH5HoZ", 653 | "_name": "", 654 | "_objFlags": 0, 655 | "node": { 656 | "__id__": 1 657 | }, 658 | "_enabled": true, 659 | "rank": { 660 | "__id__": 3 661 | }, 662 | "nickname": { 663 | "__id__": 7 664 | }, 665 | "score": { 666 | "__id__": 11 667 | }, 668 | "_id": "" 669 | }, 670 | { 671 | "__type__": "cc.PrefabInfo", 672 | "root": { 673 | "__id__": 1 674 | }, 675 | "asset": { 676 | "__uuid__": "bfebcd17-8665-4d07-b360-5864fcf3de1f" 677 | }, 678 | "fileId": "f4cxgLFMFGXpuJdYdSrYPz", 679 | "sync": false 680 | } 681 | ] -------------------------------------------------------------------------------- /assets/Scene/test.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "scene": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Scene", 13 | "_objFlags": 0, 14 | "_parent": null, 15 | "_children": [ 16 | { 17 | "__id__": 2 18 | }, 19 | { 20 | "__id__": 6 21 | } 22 | ], 23 | "_active": true, 24 | "_level": 0, 25 | "_components": [], 26 | "_prefab": null, 27 | "_opacity": 255, 28 | "_color": { 29 | "__type__": "cc.Color", 30 | "r": 255, 31 | "g": 255, 32 | "b": 255, 33 | "a": 255 34 | }, 35 | "_contentSize": { 36 | "__type__": "cc.Size", 37 | "width": 0, 38 | "height": 0 39 | }, 40 | "_anchorPoint": { 41 | "__type__": "cc.Vec2", 42 | "x": 0, 43 | "y": 0 44 | }, 45 | "_scale": { 46 | "__type__": "cc.Vec3", 47 | "x": 1, 48 | "y": 1, 49 | "z": 1 50 | }, 51 | "_eulerAngles": { 52 | "__type__": "cc.Vec3", 53 | "x": 0, 54 | "y": 0, 55 | "z": 0 56 | }, 57 | "_is3DNode": true, 58 | "groupIndex": 0, 59 | "autoReleaseAssets": false, 60 | "_id": "5d85dc03-73ad-4a07-80b7-c6156edcae41" 61 | }, 62 | { 63 | "__type__": "cc.Node", 64 | "_name": "Optimize Draw Call", 65 | "_objFlags": 0, 66 | "_parent": { 67 | "__id__": 1 68 | }, 69 | "_children": [], 70 | "_active": true, 71 | "_level": 1, 72 | "_components": [ 73 | { 74 | "__id__": 3 75 | } 76 | ], 77 | "_prefab": null, 78 | "_opacity": 255, 79 | "_color": { 80 | "__type__": "cc.Color", 81 | "r": 255, 82 | "g": 255, 83 | "b": 255, 84 | "a": 255 85 | }, 86 | "_contentSize": { 87 | "__type__": "cc.Size", 88 | "width": 0, 89 | "height": 0 90 | }, 91 | "_anchorPoint": { 92 | "__type__": "cc.Vec2", 93 | "x": 0.5, 94 | "y": 0.5 95 | }, 96 | "_position": { 97 | "__type__": "cc.Vec3", 98 | "x": 0, 99 | "y": 0, 100 | "z": 0 101 | }, 102 | "_scale": { 103 | "__type__": "cc.Vec3", 104 | "x": 1, 105 | "y": 1, 106 | "z": 1 107 | }, 108 | "_eulerAngles": { 109 | "__type__": "cc.Vec3", 110 | "x": 0, 111 | "y": 0, 112 | "z": 0 113 | }, 114 | "_skewX": 0, 115 | "_skewY": 0, 116 | "_is3DNode": false, 117 | "groupIndex": 0, 118 | "_id": "6fQzbqYqdPlrorfvMKZnd9" 119 | }, 120 | { 121 | "__type__": "08fbbmveQ1Lhpn1bghkuuzc", 122 | "_name": "", 123 | "_objFlags": 0, 124 | "node": { 125 | "__id__": 2 126 | }, 127 | "_enabled": true, 128 | "options": [ 129 | { 130 | "__id__": 4 131 | } 132 | ], 133 | "_id": "9bF4Y95axCUrN9sOD50m3A" 134 | }, 135 | { 136 | "__type__": "OptimizeDrawCallOptions", 137 | "enabledOptimize": true, 138 | "rootNode": { 139 | "__id__": 5 140 | }, 141 | "pathToNode": [ 142 | "flowLine/word/bg", 143 | "flowLine/word/word label" 144 | ], 145 | "pathToNode4Hide": [], 146 | "container": { 147 | "__id__": 20 148 | }, 149 | "containerZIndex": 1 150 | }, 151 | { 152 | "__type__": "cc.Node", 153 | "_name": "demo", 154 | "_objFlags": 0, 155 | "_parent": { 156 | "__id__": 6 157 | }, 158 | "_children": [ 159 | { 160 | "__id__": 20 161 | } 162 | ], 163 | "_active": true, 164 | "_level": 1, 165 | "_components": [ 166 | { 167 | "__id__": 21 168 | }, 169 | { 170 | "__id__": 22 171 | }, 172 | { 173 | "__id__": 23 174 | } 175 | ], 176 | "_prefab": null, 177 | "_opacity": 255, 178 | "_color": { 179 | "__type__": "cc.Color", 180 | "r": 255, 181 | "g": 233, 182 | "b": 233, 183 | "a": 255 184 | }, 185 | "_contentSize": { 186 | "__type__": "cc.Size", 187 | "width": 640, 188 | "height": 760 189 | }, 190 | "_anchorPoint": { 191 | "__type__": "cc.Vec2", 192 | "x": 0.5, 193 | "y": 0.5 194 | }, 195 | "_position": { 196 | "__type__": "cc.Vec3", 197 | "x": 0, 198 | "y": 0, 199 | "z": 0 200 | }, 201 | "_scale": { 202 | "__type__": "cc.Vec3", 203 | "x": 1, 204 | "y": 1, 205 | "z": 1 206 | }, 207 | "_eulerAngles": { 208 | "__type__": "cc.Vec3", 209 | "x": 0, 210 | "y": 0, 211 | "z": 0 212 | }, 213 | "_skewX": 0, 214 | "_skewY": 0, 215 | "_is3DNode": false, 216 | "groupIndex": 0, 217 | "_id": "20QfmRNvhK/5/NwkpxZ6GZ" 218 | }, 219 | { 220 | "__type__": "cc.Node", 221 | "_name": "Canvas", 222 | "_objFlags": 0, 223 | "_parent": { 224 | "__id__": 1 225 | }, 226 | "_children": [ 227 | { 228 | "__id__": 7 229 | }, 230 | { 231 | "__id__": 5 232 | }, 233 | { 234 | "__id__": 9 235 | }, 236 | { 237 | "__id__": 11 238 | } 239 | ], 240 | "_active": true, 241 | "_level": 0, 242 | "_components": [ 243 | { 244 | "__id__": 19 245 | } 246 | ], 247 | "_prefab": null, 248 | "_opacity": 255, 249 | "_color": { 250 | "__type__": "cc.Color", 251 | "r": 255, 252 | "g": 255, 253 | "b": 255, 254 | "a": 255 255 | }, 256 | "_contentSize": { 257 | "__type__": "cc.Size", 258 | "width": 640, 259 | "height": 960 260 | }, 261 | "_anchorPoint": { 262 | "__type__": "cc.Vec2", 263 | "x": 0.5, 264 | "y": 0.5 265 | }, 266 | "_position": { 267 | "__type__": "cc.Vec3", 268 | "x": 320, 269 | "y": 480, 270 | "z": 0 271 | }, 272 | "_scale": { 273 | "__type__": "cc.Vec3", 274 | "x": 1, 275 | "y": 1, 276 | "z": 1 277 | }, 278 | "_eulerAngles": { 279 | "__type__": "cc.Vec3", 280 | "x": 0, 281 | "y": 0, 282 | "z": 0 283 | }, 284 | "_skewX": 0, 285 | "_skewY": 0, 286 | "_is3DNode": false, 287 | "groupIndex": 0, 288 | "_id": "27Jt7LRypKXJWF2pS6IvLT" 289 | }, 290 | { 291 | "__type__": "cc.Node", 292 | "_name": "Main Camera", 293 | "_objFlags": 0, 294 | "_parent": { 295 | "__id__": 6 296 | }, 297 | "_children": [], 298 | "_active": true, 299 | "_level": 1, 300 | "_components": [ 301 | { 302 | "__id__": 8 303 | } 304 | ], 305 | "_prefab": null, 306 | "_opacity": 255, 307 | "_color": { 308 | "__type__": "cc.Color", 309 | "r": 255, 310 | "g": 255, 311 | "b": 255, 312 | "a": 255 313 | }, 314 | "_contentSize": { 315 | "__type__": "cc.Size", 316 | "width": 0, 317 | "height": 0 318 | }, 319 | "_anchorPoint": { 320 | "__type__": "cc.Vec2", 321 | "x": 0.5, 322 | "y": 0.5 323 | }, 324 | "_position": { 325 | "__type__": "cc.Vec3", 326 | "x": 0, 327 | "y": 0, 328 | "z": 831.3843876330611 329 | }, 330 | "_scale": { 331 | "__type__": "cc.Vec3", 332 | "x": 1, 333 | "y": 1, 334 | "z": 1 335 | }, 336 | "_eulerAngles": { 337 | "__type__": "cc.Vec3", 338 | "x": 0, 339 | "y": 0, 340 | "z": 0 341 | }, 342 | "_skewX": 0, 343 | "_skewY": 0, 344 | "_is3DNode": false, 345 | "groupIndex": 0, 346 | "_id": "bcx5DrvQFFGK2X/2sNtBo4" 347 | }, 348 | { 349 | "__type__": "cc.Camera", 350 | "_name": "", 351 | "_objFlags": 0, 352 | "node": { 353 | "__id__": 7 354 | }, 355 | "_enabled": true, 356 | "_cullingMask": 4294967295, 357 | "_clearFlags": 7, 358 | "_backgroundColor": { 359 | "__type__": "cc.Color", 360 | "r": 0, 361 | "g": 0, 362 | "b": 0, 363 | "a": 255 364 | }, 365 | "_depth": -1, 366 | "_zoomRatio": 1, 367 | "_targetTexture": null, 368 | "_fov": 60, 369 | "_orthoSize": 10, 370 | "_nearClip": 1, 371 | "_farClip": 4096, 372 | "_ortho": true, 373 | "_rect": { 374 | "__type__": "cc.Rect", 375 | "x": 0, 376 | "y": 0, 377 | "width": 1, 378 | "height": 1 379 | }, 380 | "_renderStages": 1, 381 | "_id": "fcJYAVMdFJj4Q1XKJVWln+" 382 | }, 383 | { 384 | "__type__": "cc.Node", 385 | "_name": "README", 386 | "_objFlags": 0, 387 | "_parent": { 388 | "__id__": 6 389 | }, 390 | "_children": [], 391 | "_active": true, 392 | "_level": 1, 393 | "_components": [ 394 | { 395 | "__id__": 10 396 | } 397 | ], 398 | "_prefab": null, 399 | "_opacity": 255, 400 | "_color": { 401 | "__type__": "cc.Color", 402 | "r": 129, 403 | "g": 236, 404 | "b": 168, 405 | "a": 255 406 | }, 407 | "_contentSize": { 408 | "__type__": "cc.Size", 409 | "width": 640, 410 | "height": 410.4 411 | }, 412 | "_anchorPoint": { 413 | "__type__": "cc.Vec2", 414 | "x": 0.5, 415 | "y": 0.5 416 | }, 417 | "_position": { 418 | "__type__": "cc.Vec3", 419 | "x": 0, 420 | "y": 0, 421 | "z": 0 422 | }, 423 | "_scale": { 424 | "__type__": "cc.Vec3", 425 | "x": 1, 426 | "y": 1, 427 | "z": 1 428 | }, 429 | "_eulerAngles": { 430 | "__type__": "cc.Vec3", 431 | "x": 0, 432 | "y": 0, 433 | "z": 0 434 | }, 435 | "_skewX": 0, 436 | "_skewY": 0, 437 | "_is3DNode": false, 438 | "groupIndex": 0, 439 | "_rotationX": 0, 440 | "_rotationY": 0, 441 | "_id": "110LpXfNlBh75SJx/8M3Q4" 442 | }, 443 | { 444 | "__type__": "cc.Label", 445 | "_name": "", 446 | "_objFlags": 0, 447 | "node": { 448 | "__id__": 9 449 | }, 450 | "_enabled": true, 451 | "_materials": [ 452 | { 453 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 454 | } 455 | ], 456 | "_useOriginalSize": false, 457 | "_string": "Optimize Draw Call节点上挂的脚本组件即唯一核心功能。\n目前只适用于无复杂交互的场景优化。\n如需删除父节点的同时删除已优化节点\n则需要自行实现(或者更新脚本,支持此功能)\n打开编辑器,可通过关闭优化,查看效果对比\n\nPs:页面效果是随机的,刷新就变(看不清文字就刷新)\n\n作者:Nemo\n鸣谢:@mister_akai", 458 | "_N$string": "Optimize Draw Call节点上挂的脚本组件即唯一核心功能。\n目前只适用于无复杂交互的场景优化。\n如需删除父节点的同时删除已优化节点\n则需要自行实现(或者更新脚本,支持此功能)\n打开编辑器,可通过关闭优化,查看效果对比\n\nPs:页面效果是随机的,刷新就变(看不清文字就刷新)\n\n作者:Nemo\n鸣谢:@mister_akai", 459 | "_fontSize": 20, 460 | "_lineHeight": 40, 461 | "_enableWrapText": true, 462 | "_N$file": null, 463 | "_isSystemFontUsed": true, 464 | "_spacingX": 0, 465 | "_batchAsBitmap": false, 466 | "_N$horizontalAlign": 1, 467 | "_N$verticalAlign": 1, 468 | "_N$fontFamily": "Arial", 469 | "_N$overflow": 3, 470 | "_N$cacheMode": 0, 471 | "_id": "bfEq4ypztAaZvdgMZwW+GG" 472 | }, 473 | { 474 | "__type__": "cc.Node", 475 | "_name": "New Button", 476 | "_objFlags": 0, 477 | "_parent": { 478 | "__id__": 6 479 | }, 480 | "_children": [ 481 | { 482 | "__id__": 12 483 | } 484 | ], 485 | "_active": true, 486 | "_level": 1, 487 | "_components": [ 488 | { 489 | "__id__": 17 490 | } 491 | ], 492 | "_prefab": null, 493 | "_opacity": 255, 494 | "_color": { 495 | "__type__": "cc.Color", 496 | "r": 255, 497 | "g": 255, 498 | "b": 255, 499 | "a": 255 500 | }, 501 | "_contentSize": { 502 | "__type__": "cc.Size", 503 | "width": 300, 504 | "height": 40 505 | }, 506 | "_anchorPoint": { 507 | "__type__": "cc.Vec2", 508 | "x": 0.5, 509 | "y": 0.5 510 | }, 511 | "_position": { 512 | "__type__": "cc.Vec3", 513 | "x": 0, 514 | "y": -421.424, 515 | "z": 0 516 | }, 517 | "_scale": { 518 | "__type__": "cc.Vec3", 519 | "x": 1, 520 | "y": 1, 521 | "z": 1 522 | }, 523 | "_eulerAngles": { 524 | "__type__": "cc.Vec3", 525 | "x": 0, 526 | "y": 0, 527 | "z": 0 528 | }, 529 | "_skewX": 0, 530 | "_skewY": 0, 531 | "_is3DNode": false, 532 | "groupIndex": 0, 533 | "_rotationX": 0, 534 | "_rotationY": 0, 535 | "_id": "62nJAF679Pp7NV9tN/GhnM" 536 | }, 537 | { 538 | "__type__": "cc.Node", 539 | "_name": "Background", 540 | "_objFlags": 0, 541 | "_parent": { 542 | "__id__": 11 543 | }, 544 | "_children": [ 545 | { 546 | "__id__": 13 547 | } 548 | ], 549 | "_active": true, 550 | "_level": 2, 551 | "_components": [ 552 | { 553 | "__id__": 15 554 | }, 555 | { 556 | "__id__": 16 557 | } 558 | ], 559 | "_prefab": null, 560 | "_opacity": 255, 561 | "_color": { 562 | "__type__": "cc.Color", 563 | "r": 230, 564 | "g": 230, 565 | "b": 230, 566 | "a": 255 567 | }, 568 | "_contentSize": { 569 | "__type__": "cc.Size", 570 | "width": 300, 571 | "height": 40 572 | }, 573 | "_anchorPoint": { 574 | "__type__": "cc.Vec2", 575 | "x": 0.5, 576 | "y": 0.5 577 | }, 578 | "_position": { 579 | "__type__": "cc.Vec3", 580 | "x": 0, 581 | "y": 0, 582 | "z": 0 583 | }, 584 | "_scale": { 585 | "__type__": "cc.Vec3", 586 | "x": 1, 587 | "y": 1, 588 | "z": 1 589 | }, 590 | "_eulerAngles": { 591 | "__type__": "cc.Vec3", 592 | "x": 0, 593 | "y": 0, 594 | "z": 0 595 | }, 596 | "_skewX": 0, 597 | "_skewY": 0, 598 | "_is3DNode": false, 599 | "groupIndex": 0, 600 | "_rotationX": 0, 601 | "_rotationY": 0, 602 | "_id": "6azpHn2E1DXIBtppxiNTyp" 603 | }, 604 | { 605 | "__type__": "cc.Node", 606 | "_name": "Label", 607 | "_objFlags": 0, 608 | "_parent": { 609 | "__id__": 12 610 | }, 611 | "_children": [], 612 | "_active": true, 613 | "_level": 3, 614 | "_components": [ 615 | { 616 | "__id__": 14 617 | } 618 | ], 619 | "_prefab": null, 620 | "_opacity": 255, 621 | "_color": { 622 | "__type__": "cc.Color", 623 | "r": 0, 624 | "g": 0, 625 | "b": 0, 626 | "a": 255 627 | }, 628 | "_contentSize": { 629 | "__type__": "cc.Size", 630 | "width": 233, 631 | "height": 50.4 632 | }, 633 | "_anchorPoint": { 634 | "__type__": "cc.Vec2", 635 | "x": 0.5, 636 | "y": 0.5 637 | }, 638 | "_position": { 639 | "__type__": "cc.Vec3", 640 | "x": 0, 641 | "y": 0, 642 | "z": 0 643 | }, 644 | "_scale": { 645 | "__type__": "cc.Vec3", 646 | "x": 1, 647 | "y": 1, 648 | "z": 1 649 | }, 650 | "_eulerAngles": { 651 | "__type__": "cc.Vec3", 652 | "x": 0, 653 | "y": 0, 654 | "z": 0 655 | }, 656 | "_skewX": 0, 657 | "_skewY": 0, 658 | "_is3DNode": false, 659 | "groupIndex": 0, 660 | "_rotationX": 0, 661 | "_rotationY": 0, 662 | "_id": "33jBD5EsJAJoIh2RzP7lww" 663 | }, 664 | { 665 | "__type__": "cc.Label", 666 | "_name": "", 667 | "_objFlags": 0, 668 | "node": { 669 | "__id__": 13 670 | }, 671 | "_enabled": true, 672 | "_materials": [ 673 | { 674 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 675 | } 676 | ], 677 | "_useOriginalSize": false, 678 | "_string": "排行榜(ScrollView)例子", 679 | "_N$string": "排行榜(ScrollView)例子", 680 | "_fontSize": 20, 681 | "_lineHeight": 40, 682 | "_enableWrapText": false, 683 | "_N$file": null, 684 | "_isSystemFontUsed": true, 685 | "_spacingX": 0, 686 | "_batchAsBitmap": false, 687 | "_N$horizontalAlign": 1, 688 | "_N$verticalAlign": 1, 689 | "_N$fontFamily": "Arial", 690 | "_N$overflow": 0, 691 | "_N$cacheMode": 0, 692 | "_id": "1bvVy21eFC0aYtQrrDQjuw" 693 | }, 694 | { 695 | "__type__": "cc.Sprite", 696 | "_name": "", 697 | "_objFlags": 0, 698 | "node": { 699 | "__id__": 12 700 | }, 701 | "_enabled": true, 702 | "_materials": [ 703 | { 704 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 705 | } 706 | ], 707 | "_srcBlendFactor": 770, 708 | "_dstBlendFactor": 771, 709 | "_spriteFrame": { 710 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 711 | }, 712 | "_type": 1, 713 | "_sizeMode": 0, 714 | "_fillType": 0, 715 | "_fillCenter": { 716 | "__type__": "cc.Vec2", 717 | "x": 0, 718 | "y": 0 719 | }, 720 | "_fillStart": 0, 721 | "_fillRange": 0, 722 | "_isTrimmedMode": true, 723 | "_atlas": null, 724 | "_id": "f9GpSA3bNAT4m+f6DqYsvU" 725 | }, 726 | { 727 | "__type__": "cc.Widget", 728 | "_name": "", 729 | "_objFlags": 0, 730 | "node": { 731 | "__id__": 12 732 | }, 733 | "_enabled": true, 734 | "alignMode": 0, 735 | "_target": null, 736 | "_alignFlags": 45, 737 | "_left": 0, 738 | "_right": 0, 739 | "_top": 0, 740 | "_bottom": 0, 741 | "_verticalCenter": 0, 742 | "_horizontalCenter": 0, 743 | "_isAbsLeft": true, 744 | "_isAbsRight": true, 745 | "_isAbsTop": true, 746 | "_isAbsBottom": true, 747 | "_isAbsHorizontalCenter": true, 748 | "_isAbsVerticalCenter": true, 749 | "_originalWidth": 100, 750 | "_originalHeight": 40, 751 | "_id": "0fbTP75bxJ4ImLtPlDdVAY" 752 | }, 753 | { 754 | "__type__": "cc.Button", 755 | "_name": "", 756 | "_objFlags": 0, 757 | "node": { 758 | "__id__": 11 759 | }, 760 | "_enabled": true, 761 | "duration": 0.1, 762 | "zoomScale": 1.2, 763 | "clickEvents": [ 764 | { 765 | "__id__": 18 766 | } 767 | ], 768 | "_N$interactable": true, 769 | "_N$enableAutoGrayEffect": false, 770 | "_N$transition": 2, 771 | "transition": 2, 772 | "_N$normalColor": { 773 | "__type__": "cc.Color", 774 | "r": 230, 775 | "g": 230, 776 | "b": 230, 777 | "a": 255 778 | }, 779 | "_N$pressedColor": { 780 | "__type__": "cc.Color", 781 | "r": 200, 782 | "g": 200, 783 | "b": 200, 784 | "a": 255 785 | }, 786 | "pressedColor": { 787 | "__type__": "cc.Color", 788 | "r": 200, 789 | "g": 200, 790 | "b": 200, 791 | "a": 255 792 | }, 793 | "_N$hoverColor": { 794 | "__type__": "cc.Color", 795 | "r": 255, 796 | "g": 255, 797 | "b": 255, 798 | "a": 255 799 | }, 800 | "hoverColor": { 801 | "__type__": "cc.Color", 802 | "r": 255, 803 | "g": 255, 804 | "b": 255, 805 | "a": 255 806 | }, 807 | "_N$disabledColor": { 808 | "__type__": "cc.Color", 809 | "r": 120, 810 | "g": 120, 811 | "b": 120, 812 | "a": 200 813 | }, 814 | "_N$normalSprite": { 815 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 816 | }, 817 | "_N$pressedSprite": { 818 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 819 | }, 820 | "pressedSprite": { 821 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 822 | }, 823 | "_N$hoverSprite": { 824 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 825 | }, 826 | "hoverSprite": { 827 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 828 | }, 829 | "_N$disabledSprite": { 830 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 831 | }, 832 | "_N$target": { 833 | "__id__": 12 834 | }, 835 | "_id": "55SuHSNdpHNottTD3/pqyU" 836 | }, 837 | { 838 | "__type__": "cc.ClickEvent", 839 | "target": { 840 | "__id__": 5 841 | }, 842 | "component": "", 843 | "_componentId": "15010mHzrtEL5wZOjC8qcOl", 844 | "handler": "gotoScene", 845 | "customEventData": "rank" 846 | }, 847 | { 848 | "__type__": "cc.Canvas", 849 | "_name": "", 850 | "_objFlags": 0, 851 | "node": { 852 | "__id__": 6 853 | }, 854 | "_enabled": true, 855 | "_designResolution": { 856 | "__type__": "cc.Size", 857 | "width": 640, 858 | "height": 960 859 | }, 860 | "_fitWidth": true, 861 | "_fitHeight": false, 862 | "_id": "7bIazfPrhMLrMNZwuxxrQ0" 863 | }, 864 | { 865 | "__type__": "cc.Node", 866 | "_name": "container", 867 | "_objFlags": 0, 868 | "_parent": { 869 | "__id__": 5 870 | }, 871 | "_children": [], 872 | "_active": true, 873 | "_level": 2, 874 | "_components": [], 875 | "_prefab": null, 876 | "_opacity": 255, 877 | "_color": { 878 | "__type__": "cc.Color", 879 | "r": 255, 880 | "g": 255, 881 | "b": 255, 882 | "a": 255 883 | }, 884 | "_contentSize": { 885 | "__type__": "cc.Size", 886 | "width": 0, 887 | "height": 0 888 | }, 889 | "_anchorPoint": { 890 | "__type__": "cc.Vec2", 891 | "x": 0.5, 892 | "y": 0.5 893 | }, 894 | "_position": { 895 | "__type__": "cc.Vec3", 896 | "x": 0, 897 | "y": 0, 898 | "z": 0 899 | }, 900 | "_scale": { 901 | "__type__": "cc.Vec3", 902 | "x": 1, 903 | "y": 1, 904 | "z": 1 905 | }, 906 | "_eulerAngles": { 907 | "__type__": "cc.Vec3", 908 | "x": 0, 909 | "y": 0, 910 | "z": 0 911 | }, 912 | "_skewX": 0, 913 | "_skewY": 0, 914 | "_is3DNode": false, 915 | "groupIndex": 0, 916 | "_id": "94khkMKaJEWYSfANfH2Vis" 917 | }, 918 | { 919 | "__type__": "15010mHzrtEL5wZOjC8qcOl", 920 | "_name": "", 921 | "_objFlags": 0, 922 | "node": { 923 | "__id__": 5 924 | }, 925 | "_enabled": true, 926 | "word": { 927 | "__uuid__": "bd5a246f-28e0-4f0a-be4f-2d0cb2f85912" 928 | }, 929 | "line": { 930 | "__uuid__": "9206acb2-b674-4007-9a7f-03b4588ca5e5" 931 | }, 932 | "_id": "051JaU+MFKi5kc/gW7enEc" 933 | }, 934 | { 935 | "__type__": "cc.Widget", 936 | "_name": "", 937 | "_objFlags": 0, 938 | "node": { 939 | "__id__": 5 940 | }, 941 | "_enabled": true, 942 | "alignMode": 1, 943 | "_target": null, 944 | "_alignFlags": 45, 945 | "_left": 0, 946 | "_right": 0, 947 | "_top": 100, 948 | "_bottom": 100, 949 | "_verticalCenter": 0, 950 | "_horizontalCenter": 0, 951 | "_isAbsLeft": true, 952 | "_isAbsRight": true, 953 | "_isAbsTop": true, 954 | "_isAbsBottom": true, 955 | "_isAbsHorizontalCenter": true, 956 | "_isAbsVerticalCenter": true, 957 | "_originalWidth": 0, 958 | "_originalHeight": 0, 959 | "_id": "e7oiwT5n9E3p+N3c2RAm1F" 960 | }, 961 | { 962 | "__type__": "cc.Sprite", 963 | "_name": "", 964 | "_objFlags": 0, 965 | "node": { 966 | "__id__": 5 967 | }, 968 | "_enabled": true, 969 | "_materials": [ 970 | { 971 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 972 | } 973 | ], 974 | "_srcBlendFactor": 770, 975 | "_dstBlendFactor": 771, 976 | "_spriteFrame": { 977 | "__uuid__": "410fb916-8721-4663-bab8-34397391ace7" 978 | }, 979 | "_type": 0, 980 | "_sizeMode": 0, 981 | "_fillType": 0, 982 | "_fillCenter": { 983 | "__type__": "cc.Vec2", 984 | "x": 0, 985 | "y": 0 986 | }, 987 | "_fillStart": 0, 988 | "_fillRange": 0, 989 | "_isTrimmedMode": true, 990 | "_atlas": null, 991 | "_id": "5du6gUi2hKj6Yr0/0CktER" 992 | } 993 | ] -------------------------------------------------------------------------------- /assets/Scene/rank.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "scene": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Scene", 13 | "_objFlags": 0, 14 | "_parent": null, 15 | "_children": [ 16 | { 17 | "__id__": 2 18 | }, 19 | { 20 | "__id__": 9 21 | } 22 | ], 23 | "_active": true, 24 | "_level": 0, 25 | "_components": [], 26 | "_prefab": null, 27 | "_opacity": 255, 28 | "_color": { 29 | "__type__": "cc.Color", 30 | "r": 255, 31 | "g": 255, 32 | "b": 255, 33 | "a": 255 34 | }, 35 | "_contentSize": { 36 | "__type__": "cc.Size", 37 | "width": 0, 38 | "height": 0 39 | }, 40 | "_anchorPoint": { 41 | "__type__": "cc.Vec2", 42 | "x": 0, 43 | "y": 0 44 | }, 45 | "_scale": { 46 | "__type__": "cc.Vec3", 47 | "x": 1, 48 | "y": 1, 49 | "z": 1 50 | }, 51 | "_eulerAngles": { 52 | "__type__": "cc.Vec3", 53 | "x": 0, 54 | "y": 0, 55 | "z": 0 56 | }, 57 | "_is3DNode": true, 58 | "groupIndex": 0, 59 | "autoReleaseAssets": false, 60 | "_id": "6a9c301a-6f27-4382-857f-a874dcf63b4e" 61 | }, 62 | { 63 | "__type__": "cc.Node", 64 | "_name": "rank", 65 | "_objFlags": 0, 66 | "_parent": { 67 | "__id__": 1 68 | }, 69 | "_children": [ 70 | { 71 | "__id__": 3 72 | }, 73 | { 74 | "__id__": 30 75 | } 76 | ], 77 | "_active": true, 78 | "_level": 1, 79 | "_components": [ 80 | { 81 | "__id__": 33 82 | } 83 | ], 84 | "_prefab": null, 85 | "_opacity": 255, 86 | "_color": { 87 | "__type__": "cc.Color", 88 | "r": 255, 89 | "g": 255, 90 | "b": 255, 91 | "a": 255 92 | }, 93 | "_contentSize": { 94 | "__type__": "cc.Size", 95 | "width": 0, 96 | "height": 0 97 | }, 98 | "_anchorPoint": { 99 | "__type__": "cc.Vec2", 100 | "x": 0.5, 101 | "y": 0.5 102 | }, 103 | "_position": { 104 | "__type__": "cc.Vec3", 105 | "x": 0, 106 | "y": 0, 107 | "z": 0 108 | }, 109 | "_scale": { 110 | "__type__": "cc.Vec3", 111 | "x": 1, 112 | "y": 1, 113 | "z": 1 114 | }, 115 | "_eulerAngles": { 116 | "__type__": "cc.Vec3", 117 | "x": 0, 118 | "y": 0, 119 | "z": 0 120 | }, 121 | "_skewX": 0, 122 | "_skewY": 0, 123 | "_is3DNode": false, 124 | "groupIndex": 0, 125 | "_id": "4dxAXUpYdNMK7xmkuDvIGI" 126 | }, 127 | { 128 | "__type__": "cc.Node", 129 | "_name": "optimizeDrawCall", 130 | "_objFlags": 0, 131 | "_parent": { 132 | "__id__": 2 133 | }, 134 | "_children": [], 135 | "_active": true, 136 | "_level": 2, 137 | "_components": [ 138 | { 139 | "__id__": 4 140 | } 141 | ], 142 | "_prefab": null, 143 | "_opacity": 255, 144 | "_color": { 145 | "__type__": "cc.Color", 146 | "r": 255, 147 | "g": 255, 148 | "b": 255, 149 | "a": 255 150 | }, 151 | "_contentSize": { 152 | "__type__": "cc.Size", 153 | "width": 0, 154 | "height": 0 155 | }, 156 | "_anchorPoint": { 157 | "__type__": "cc.Vec2", 158 | "x": 0.5, 159 | "y": 0.5 160 | }, 161 | "_position": { 162 | "__type__": "cc.Vec3", 163 | "x": 0, 164 | "y": 0, 165 | "z": 0 166 | }, 167 | "_scale": { 168 | "__type__": "cc.Vec3", 169 | "x": 1, 170 | "y": 1, 171 | "z": 1 172 | }, 173 | "_eulerAngles": { 174 | "__type__": "cc.Vec3", 175 | "x": 0, 176 | "y": 0, 177 | "z": 0 178 | }, 179 | "_skewX": 0, 180 | "_skewY": 0, 181 | "_is3DNode": false, 182 | "groupIndex": 0, 183 | "_id": "06psS5Gp5KPZLDbzpYYUe0" 184 | }, 185 | { 186 | "__type__": "08fbbmveQ1Lhpn1bghkuuzc", 187 | "_name": "", 188 | "_objFlags": 0, 189 | "node": { 190 | "__id__": 3 191 | }, 192 | "_enabled": true, 193 | "options": [ 194 | { 195 | "__id__": 5 196 | } 197 | ], 198 | "_id": "d5iceo0Z5D+IN5XgVRIkMF" 199 | }, 200 | { 201 | "__type__": "OptimizeDrawCallOptions", 202 | "enabledOptimize": true, 203 | "rootNode": { 204 | "__id__": 6 205 | }, 206 | "pathToNode": [ 207 | "item/rank", 208 | "item/nickname", 209 | "item/score", 210 | "item/line" 211 | ], 212 | "pathToNode4Hide": [ 213 | "item" 214 | ], 215 | "container": { 216 | "__id__": 27 217 | }, 218 | "containerZIndex": 1 219 | }, 220 | { 221 | "__type__": "cc.Node", 222 | "_name": "content", 223 | "_objFlags": 0, 224 | "_parent": { 225 | "__id__": 7 226 | }, 227 | "_children": [ 228 | { 229 | "__id__": 27 230 | } 231 | ], 232 | "_active": true, 233 | "_level": 0, 234 | "_components": [ 235 | { 236 | "__id__": 28 237 | }, 238 | { 239 | "__id__": 29 240 | } 241 | ], 242 | "_prefab": null, 243 | "_opacity": 255, 244 | "_color": { 245 | "__type__": "cc.Color", 246 | "r": 255, 247 | "g": 255, 248 | "b": 255, 249 | "a": 255 250 | }, 251 | "_contentSize": { 252 | "__type__": "cc.Size", 253 | "width": 600, 254 | "height": 0 255 | }, 256 | "_anchorPoint": { 257 | "__type__": "cc.Vec2", 258 | "x": 0.5, 259 | "y": 1 260 | }, 261 | "_position": { 262 | "__type__": "cc.Vec3", 263 | "x": 0, 264 | "y": 380, 265 | "z": 0 266 | }, 267 | "_scale": { 268 | "__type__": "cc.Vec3", 269 | "x": 1, 270 | "y": 1, 271 | "z": 1 272 | }, 273 | "_eulerAngles": { 274 | "__type__": "cc.Vec3", 275 | "x": 0, 276 | "y": 0, 277 | "z": 0 278 | }, 279 | "_skewX": 0, 280 | "_skewY": 0, 281 | "_is3DNode": false, 282 | "groupIndex": 0, 283 | "_rotationX": 0, 284 | "_rotationY": 0, 285 | "_id": "b7KsTunb1BhJ/QWStfgRzt" 286 | }, 287 | { 288 | "__type__": "cc.Node", 289 | "_name": "view", 290 | "_objFlags": 0, 291 | "_parent": { 292 | "__id__": 8 293 | }, 294 | "_children": [ 295 | { 296 | "__id__": 6 297 | } 298 | ], 299 | "_active": true, 300 | "_level": 0, 301 | "_components": [ 302 | { 303 | "__id__": 25 304 | }, 305 | { 306 | "__id__": 26 307 | } 308 | ], 309 | "_prefab": null, 310 | "_opacity": 255, 311 | "_color": { 312 | "__type__": "cc.Color", 313 | "r": 255, 314 | "g": 255, 315 | "b": 255, 316 | "a": 255 317 | }, 318 | "_contentSize": { 319 | "__type__": "cc.Size", 320 | "width": 600, 321 | "height": 760 322 | }, 323 | "_anchorPoint": { 324 | "__type__": "cc.Vec2", 325 | "x": 0.5, 326 | "y": 0.5 327 | }, 328 | "_position": { 329 | "__type__": "cc.Vec3", 330 | "x": 0, 331 | "y": 0, 332 | "z": 0 333 | }, 334 | "_scale": { 335 | "__type__": "cc.Vec3", 336 | "x": 1, 337 | "y": 1, 338 | "z": 1 339 | }, 340 | "_eulerAngles": { 341 | "__type__": "cc.Vec3", 342 | "x": 0, 343 | "y": 0, 344 | "z": 0 345 | }, 346 | "_skewX": 0, 347 | "_skewY": 0, 348 | "_is3DNode": false, 349 | "groupIndex": 0, 350 | "_rotationX": 0, 351 | "_rotationY": 0, 352 | "_id": "f0SCx5mYZEualNjZvXf56P" 353 | }, 354 | { 355 | "__type__": "cc.Node", 356 | "_name": "New ScrollView", 357 | "_objFlags": 0, 358 | "_parent": { 359 | "__id__": 9 360 | }, 361 | "_children": [ 362 | { 363 | "__id__": 16 364 | }, 365 | { 366 | "__id__": 7 367 | } 368 | ], 369 | "_active": true, 370 | "_level": 1, 371 | "_components": [ 372 | { 373 | "__id__": 23 374 | }, 375 | { 376 | "__id__": 20 377 | }, 378 | { 379 | "__id__": 24 380 | } 381 | ], 382 | "_prefab": null, 383 | "_opacity": 171, 384 | "_color": { 385 | "__type__": "cc.Color", 386 | "r": 80, 387 | "g": 80, 388 | "b": 80, 389 | "a": 255 390 | }, 391 | "_contentSize": { 392 | "__type__": "cc.Size", 393 | "width": 600, 394 | "height": 760 395 | }, 396 | "_anchorPoint": { 397 | "__type__": "cc.Vec2", 398 | "x": 0.5, 399 | "y": 0.5 400 | }, 401 | "_position": { 402 | "__type__": "cc.Vec3", 403 | "x": 0, 404 | "y": 0, 405 | "z": 0 406 | }, 407 | "_scale": { 408 | "__type__": "cc.Vec3", 409 | "x": 1, 410 | "y": 1, 411 | "z": 1 412 | }, 413 | "_eulerAngles": { 414 | "__type__": "cc.Vec3", 415 | "x": 0, 416 | "y": 0, 417 | "z": 0 418 | }, 419 | "_skewX": 0, 420 | "_skewY": 0, 421 | "_is3DNode": false, 422 | "groupIndex": 0, 423 | "_rotationX": 0, 424 | "_rotationY": 0, 425 | "_id": "3d4HrfmF9ExK8ah2dcymEO" 426 | }, 427 | { 428 | "__type__": "cc.Node", 429 | "_name": "Canvas", 430 | "_objFlags": 0, 431 | "_parent": { 432 | "__id__": 1 433 | }, 434 | "_children": [ 435 | { 436 | "__id__": 10 437 | }, 438 | { 439 | "__id__": 8 440 | }, 441 | { 442 | "__id__": 12 443 | } 444 | ], 445 | "_active": true, 446 | "_level": 0, 447 | "_components": [ 448 | { 449 | "__id__": 15 450 | } 451 | ], 452 | "_prefab": null, 453 | "_opacity": 255, 454 | "_color": { 455 | "__type__": "cc.Color", 456 | "r": 255, 457 | "g": 255, 458 | "b": 255, 459 | "a": 255 460 | }, 461 | "_contentSize": { 462 | "__type__": "cc.Size", 463 | "width": 640, 464 | "height": 960 465 | }, 466 | "_anchorPoint": { 467 | "__type__": "cc.Vec2", 468 | "x": 0.5, 469 | "y": 0.5 470 | }, 471 | "_position": { 472 | "__type__": "cc.Vec3", 473 | "x": 320, 474 | "y": 480, 475 | "z": 0 476 | }, 477 | "_scale": { 478 | "__type__": "cc.Vec3", 479 | "x": 1, 480 | "y": 1, 481 | "z": 1 482 | }, 483 | "_eulerAngles": { 484 | "__type__": "cc.Vec3", 485 | "x": 0, 486 | "y": 0, 487 | "z": 0 488 | }, 489 | "_skewX": 0, 490 | "_skewY": 0, 491 | "_is3DNode": false, 492 | "groupIndex": 0, 493 | "_id": "92eib9Ri9I3acdk1Ldrz8k" 494 | }, 495 | { 496 | "__type__": "cc.Node", 497 | "_name": "Main Camera", 498 | "_objFlags": 0, 499 | "_parent": { 500 | "__id__": 9 501 | }, 502 | "_children": [], 503 | "_active": true, 504 | "_level": 1, 505 | "_components": [ 506 | { 507 | "__id__": 11 508 | } 509 | ], 510 | "_prefab": null, 511 | "_opacity": 255, 512 | "_color": { 513 | "__type__": "cc.Color", 514 | "r": 255, 515 | "g": 255, 516 | "b": 255, 517 | "a": 255 518 | }, 519 | "_contentSize": { 520 | "__type__": "cc.Size", 521 | "width": 0, 522 | "height": 0 523 | }, 524 | "_anchorPoint": { 525 | "__type__": "cc.Vec2", 526 | "x": 0.5, 527 | "y": 0.5 528 | }, 529 | "_position": { 530 | "__type__": "cc.Vec3", 531 | "x": 0, 532 | "y": 0, 533 | "z": 0 534 | }, 535 | "_scale": { 536 | "__type__": "cc.Vec3", 537 | "x": 1, 538 | "y": 1, 539 | "z": 1 540 | }, 541 | "_eulerAngles": { 542 | "__type__": "cc.Vec3", 543 | "x": 0, 544 | "y": 0, 545 | "z": 0 546 | }, 547 | "_skewX": 0, 548 | "_skewY": 0, 549 | "_is3DNode": false, 550 | "groupIndex": 0, 551 | "_id": "5dsb0la8ZN0YT/lnD8Fj3z" 552 | }, 553 | { 554 | "__type__": "cc.Camera", 555 | "_name": "", 556 | "_objFlags": 0, 557 | "node": { 558 | "__id__": 10 559 | }, 560 | "_enabled": true, 561 | "_cullingMask": 4294967295, 562 | "_clearFlags": 7, 563 | "_backgroundColor": { 564 | "__type__": "cc.Color", 565 | "r": 0, 566 | "g": 0, 567 | "b": 0, 568 | "a": 255 569 | }, 570 | "_depth": -1, 571 | "_zoomRatio": 1, 572 | "_targetTexture": null, 573 | "_fov": 60, 574 | "_orthoSize": 10, 575 | "_nearClip": 1, 576 | "_farClip": 4096, 577 | "_ortho": true, 578 | "_rect": { 579 | "__type__": "cc.Rect", 580 | "x": 0, 581 | "y": 0, 582 | "width": 1, 583 | "height": 1 584 | }, 585 | "_renderStages": 1, 586 | "_id": "c8X6rkEXNLvKmTSEJBLy25" 587 | }, 588 | { 589 | "__type__": "cc.Node", 590 | "_name": "title", 591 | "_objFlags": 0, 592 | "_parent": { 593 | "__id__": 9 594 | }, 595 | "_children": [], 596 | "_active": true, 597 | "_level": 1, 598 | "_components": [ 599 | { 600 | "__id__": 13 601 | }, 602 | { 603 | "__id__": 14 604 | } 605 | ], 606 | "_prefab": null, 607 | "_opacity": 255, 608 | "_color": { 609 | "__type__": "cc.Color", 610 | "r": 255, 611 | "g": 255, 612 | "b": 255, 613 | "a": 255 614 | }, 615 | "_contentSize": { 616 | "__type__": "cc.Size", 617 | "width": 303.36, 618 | "height": 50.4 619 | }, 620 | "_anchorPoint": { 621 | "__type__": "cc.Vec2", 622 | "x": 0.5, 623 | "y": 0.5 624 | }, 625 | "_position": { 626 | "__type__": "cc.Vec3", 627 | "x": 0, 628 | "y": 427.923, 629 | "z": 0 630 | }, 631 | "_scale": { 632 | "__type__": "cc.Vec3", 633 | "x": 1, 634 | "y": 1, 635 | "z": 1 636 | }, 637 | "_eulerAngles": { 638 | "__type__": "cc.Vec3", 639 | "x": 0, 640 | "y": 0, 641 | "z": 0 642 | }, 643 | "_skewX": 0, 644 | "_skewY": 0, 645 | "_is3DNode": false, 646 | "groupIndex": 0, 647 | "_rotationX": 0, 648 | "_rotationY": 0, 649 | "_id": "c9S0NinfdPEqdldByhBq0w" 650 | }, 651 | { 652 | "__type__": "cc.Label", 653 | "_name": "", 654 | "_objFlags": 0, 655 | "node": { 656 | "__id__": 12 657 | }, 658 | "_enabled": true, 659 | "_materials": [ 660 | { 661 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 662 | } 663 | ], 664 | "_useOriginalSize": false, 665 | "_string": "排行榜+滚动视图", 666 | "_N$string": "排行榜+滚动视图", 667 | "_fontSize": 40, 668 | "_lineHeight": 40, 669 | "_enableWrapText": true, 670 | "_N$file": null, 671 | "_isSystemFontUsed": true, 672 | "_spacingX": 0, 673 | "_batchAsBitmap": false, 674 | "_N$horizontalAlign": 1, 675 | "_N$verticalAlign": 1, 676 | "_N$fontFamily": "Arial", 677 | "_N$overflow": 0, 678 | "_N$cacheMode": 0, 679 | "_id": "edH6Rb7i5I2Yf0GMtcziK2" 680 | }, 681 | { 682 | "__type__": "cc.Widget", 683 | "_name": "", 684 | "_objFlags": 0, 685 | "node": { 686 | "__id__": 12 687 | }, 688 | "_enabled": true, 689 | "alignMode": 1, 690 | "_target": null, 691 | "_alignFlags": 1, 692 | "_left": 0, 693 | "_right": 0, 694 | "_top": 26.87700000000001, 695 | "_bottom": 0, 696 | "_verticalCenter": 0, 697 | "_horizontalCenter": 0, 698 | "_isAbsLeft": true, 699 | "_isAbsRight": true, 700 | "_isAbsTop": true, 701 | "_isAbsBottom": true, 702 | "_isAbsHorizontalCenter": true, 703 | "_isAbsVerticalCenter": true, 704 | "_originalWidth": 0, 705 | "_originalHeight": 0, 706 | "_id": "4a+WmmeAtBr4QgY5VuS13T" 707 | }, 708 | { 709 | "__type__": "cc.Canvas", 710 | "_name": "", 711 | "_objFlags": 0, 712 | "node": { 713 | "__id__": 9 714 | }, 715 | "_enabled": true, 716 | "_designResolution": { 717 | "__type__": "cc.Size", 718 | "width": 640, 719 | "height": 960 720 | }, 721 | "_fitWidth": true, 722 | "_fitHeight": false, 723 | "_id": "32W7Ux2ZpDp7aVxvVKLNZ3" 724 | }, 725 | { 726 | "__type__": "cc.Node", 727 | "_name": "scrollBar", 728 | "_objFlags": 0, 729 | "_parent": { 730 | "__id__": 8 731 | }, 732 | "_children": [ 733 | { 734 | "__id__": 17 735 | } 736 | ], 737 | "_active": true, 738 | "_level": 0, 739 | "_components": [ 740 | { 741 | "__id__": 19 742 | }, 743 | { 744 | "__id__": 21 745 | }, 746 | { 747 | "__id__": 22 748 | } 749 | ], 750 | "_prefab": null, 751 | "_opacity": 255, 752 | "_color": { 753 | "__type__": "cc.Color", 754 | "r": 255, 755 | "g": 255, 756 | "b": 255, 757 | "a": 255 758 | }, 759 | "_contentSize": { 760 | "__type__": "cc.Size", 761 | "width": 12, 762 | "height": 760 763 | }, 764 | "_anchorPoint": { 765 | "__type__": "cc.Vec2", 766 | "x": 1, 767 | "y": 0.5 768 | }, 769 | "_position": { 770 | "__type__": "cc.Vec3", 771 | "x": 300, 772 | "y": 0, 773 | "z": 0 774 | }, 775 | "_scale": { 776 | "__type__": "cc.Vec3", 777 | "x": 1, 778 | "y": 1, 779 | "z": 1 780 | }, 781 | "_eulerAngles": { 782 | "__type__": "cc.Vec3", 783 | "x": 0, 784 | "y": 0, 785 | "z": 0 786 | }, 787 | "_skewX": 0, 788 | "_skewY": 0, 789 | "_is3DNode": false, 790 | "groupIndex": 0, 791 | "_rotationX": 0, 792 | "_rotationY": 0, 793 | "_id": "03Fk9X/XZK4I4mJJZJwm0U" 794 | }, 795 | { 796 | "__type__": "cc.Node", 797 | "_name": "bar", 798 | "_objFlags": 0, 799 | "_parent": { 800 | "__id__": 16 801 | }, 802 | "_children": [], 803 | "_active": true, 804 | "_level": 0, 805 | "_components": [ 806 | { 807 | "__id__": 18 808 | } 809 | ], 810 | "_prefab": null, 811 | "_opacity": 255, 812 | "_color": { 813 | "__type__": "cc.Color", 814 | "r": 255, 815 | "g": 255, 816 | "b": 255, 817 | "a": 255 818 | }, 819 | "_contentSize": { 820 | "__type__": "cc.Size", 821 | "width": 10, 822 | "height": 30 823 | }, 824 | "_anchorPoint": { 825 | "__type__": "cc.Vec2", 826 | "x": 1, 827 | "y": 0 828 | }, 829 | "_position": { 830 | "__type__": "cc.Vec3", 831 | "x": -1, 832 | "y": 0, 833 | "z": 0 834 | }, 835 | "_scale": { 836 | "__type__": "cc.Vec3", 837 | "x": 1, 838 | "y": 1, 839 | "z": 1 840 | }, 841 | "_eulerAngles": { 842 | "__type__": "cc.Vec3", 843 | "x": 0, 844 | "y": 0, 845 | "z": 0 846 | }, 847 | "_skewX": 0, 848 | "_skewY": 0, 849 | "_is3DNode": false, 850 | "groupIndex": 0, 851 | "_rotationX": 0, 852 | "_rotationY": 0, 853 | "_id": "31sO72NA9Mwr0R8ibywD1x" 854 | }, 855 | { 856 | "__type__": "cc.Sprite", 857 | "_name": "", 858 | "_objFlags": 0, 859 | "node": { 860 | "__id__": 17 861 | }, 862 | "_enabled": true, 863 | "_materials": [ 864 | { 865 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 866 | } 867 | ], 868 | "_srcBlendFactor": 770, 869 | "_dstBlendFactor": 771, 870 | "_spriteFrame": { 871 | "__uuid__": "5c3bb932-6c3c-468f-88a9-c8c61d458641" 872 | }, 873 | "_type": 1, 874 | "_sizeMode": 0, 875 | "_fillType": 0, 876 | "_fillCenter": { 877 | "__type__": "cc.Vec2", 878 | "x": 0, 879 | "y": 0 880 | }, 881 | "_fillStart": 0, 882 | "_fillRange": 0, 883 | "_isTrimmedMode": true, 884 | "_atlas": null, 885 | "_id": "d910r/2OFD0IwVAA1f1OmP" 886 | }, 887 | { 888 | "__type__": "cc.Scrollbar", 889 | "_name": "", 890 | "_objFlags": 0, 891 | "node": { 892 | "__id__": 16 893 | }, 894 | "_enabled": true, 895 | "_scrollView": { 896 | "__id__": 20 897 | }, 898 | "_touching": false, 899 | "_opacity": 255, 900 | "enableAutoHide": true, 901 | "autoHideTime": 1, 902 | "_N$handle": { 903 | "__id__": 18 904 | }, 905 | "_N$direction": 1, 906 | "_id": "16Vq2jYC1Ggq82nm1XvgGM" 907 | }, 908 | { 909 | "__type__": "cc.ScrollView", 910 | "_name": "", 911 | "_objFlags": 0, 912 | "node": { 913 | "__id__": 8 914 | }, 915 | "_enabled": true, 916 | "horizontal": false, 917 | "vertical": true, 918 | "inertia": true, 919 | "brake": 0.75, 920 | "elastic": true, 921 | "bounceDuration": 0.23, 922 | "scrollEvents": [], 923 | "cancelInnerEvents": true, 924 | "_N$content": { 925 | "__id__": 6 926 | }, 927 | "content": { 928 | "__id__": 6 929 | }, 930 | "_N$horizontalScrollBar": null, 931 | "_N$verticalScrollBar": { 932 | "__id__": 19 933 | }, 934 | "_id": "db/Koq7GtNooSjzgWGdedj" 935 | }, 936 | { 937 | "__type__": "cc.Widget", 938 | "_name": "", 939 | "_objFlags": 0, 940 | "node": { 941 | "__id__": 16 942 | }, 943 | "_enabled": true, 944 | "alignMode": 0, 945 | "_target": null, 946 | "_alignFlags": 37, 947 | "_left": 350.07654921020657, 948 | "_right": 0, 949 | "_top": 0, 950 | "_bottom": 0, 951 | "_verticalCenter": 0, 952 | "_horizontalCenter": 0, 953 | "_isAbsLeft": true, 954 | "_isAbsRight": true, 955 | "_isAbsTop": true, 956 | "_isAbsBottom": true, 957 | "_isAbsHorizontalCenter": true, 958 | "_isAbsVerticalCenter": true, 959 | "_originalWidth": 0, 960 | "_originalHeight": 237, 961 | "_id": "eesyA0MUtHBY3EZn9Xiwyd" 962 | }, 963 | { 964 | "__type__": "cc.Sprite", 965 | "_name": "", 966 | "_objFlags": 0, 967 | "node": { 968 | "__id__": 16 969 | }, 970 | "_enabled": true, 971 | "_materials": [ 972 | { 973 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 974 | } 975 | ], 976 | "_srcBlendFactor": 770, 977 | "_dstBlendFactor": 771, 978 | "_spriteFrame": { 979 | "__uuid__": "5fe5dcaa-b513-4dc5-a166-573627b3a159" 980 | }, 981 | "_type": 1, 982 | "_sizeMode": 0, 983 | "_fillType": 0, 984 | "_fillCenter": { 985 | "__type__": "cc.Vec2", 986 | "x": 0, 987 | "y": 0 988 | }, 989 | "_fillStart": 0, 990 | "_fillRange": 0, 991 | "_isTrimmedMode": true, 992 | "_atlas": null, 993 | "_id": "031zzitdJEd6Dm0YfsBPih" 994 | }, 995 | { 996 | "__type__": "cc.Sprite", 997 | "_name": "", 998 | "_objFlags": 0, 999 | "node": { 1000 | "__id__": 8 1001 | }, 1002 | "_enabled": true, 1003 | "_materials": [ 1004 | { 1005 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 1006 | } 1007 | ], 1008 | "_srcBlendFactor": 770, 1009 | "_dstBlendFactor": 771, 1010 | "_spriteFrame": { 1011 | "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" 1012 | }, 1013 | "_type": 1, 1014 | "_sizeMode": 0, 1015 | "_fillType": 0, 1016 | "_fillCenter": { 1017 | "__type__": "cc.Vec2", 1018 | "x": 0, 1019 | "y": 0 1020 | }, 1021 | "_fillStart": 0, 1022 | "_fillRange": 0, 1023 | "_isTrimmedMode": true, 1024 | "_atlas": null, 1025 | "_id": "78AfXFnBNGrqGrxzPRMoge" 1026 | }, 1027 | { 1028 | "__type__": "cc.Widget", 1029 | "_name": "", 1030 | "_objFlags": 0, 1031 | "node": { 1032 | "__id__": 8 1033 | }, 1034 | "_enabled": true, 1035 | "alignMode": 1, 1036 | "_target": null, 1037 | "_alignFlags": 45, 1038 | "_left": 20, 1039 | "_right": 20, 1040 | "_top": 100, 1041 | "_bottom": 100, 1042 | "_verticalCenter": 0, 1043 | "_horizontalCenter": 0, 1044 | "_isAbsLeft": true, 1045 | "_isAbsRight": true, 1046 | "_isAbsTop": true, 1047 | "_isAbsBottom": true, 1048 | "_isAbsHorizontalCenter": true, 1049 | "_isAbsVerticalCenter": true, 1050 | "_originalWidth": 240, 1051 | "_originalHeight": 250, 1052 | "_id": "9dCdCdQYZMEbvWBhPNEB4w" 1053 | }, 1054 | { 1055 | "__type__": "cc.Mask", 1056 | "_name": "", 1057 | "_objFlags": 0, 1058 | "node": { 1059 | "__id__": 7 1060 | }, 1061 | "_enabled": true, 1062 | "_materials": [ 1063 | { 1064 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" 1065 | } 1066 | ], 1067 | "_spriteFrame": null, 1068 | "_type": 0, 1069 | "_segments": 64, 1070 | "_N$alphaThreshold": 0, 1071 | "_N$inverted": false, 1072 | "_id": "240oCsislAjaSG/6J7xINZ" 1073 | }, 1074 | { 1075 | "__type__": "cc.Widget", 1076 | "_name": "", 1077 | "_objFlags": 0, 1078 | "node": { 1079 | "__id__": 7 1080 | }, 1081 | "_enabled": true, 1082 | "alignMode": 1, 1083 | "_target": null, 1084 | "_alignFlags": 45, 1085 | "_left": 0, 1086 | "_right": 0, 1087 | "_top": 0, 1088 | "_bottom": 0, 1089 | "_verticalCenter": 0, 1090 | "_horizontalCenter": 0, 1091 | "_isAbsLeft": true, 1092 | "_isAbsRight": true, 1093 | "_isAbsTop": true, 1094 | "_isAbsBottom": true, 1095 | "_isAbsHorizontalCenter": true, 1096 | "_isAbsVerticalCenter": true, 1097 | "_originalWidth": 240, 1098 | "_originalHeight": 250, 1099 | "_id": "f7rXrnfINO16+W1/3e1I65" 1100 | }, 1101 | { 1102 | "__type__": "cc.Node", 1103 | "_name": "container", 1104 | "_objFlags": 0, 1105 | "_parent": { 1106 | "__id__": 6 1107 | }, 1108 | "_children": [], 1109 | "_active": true, 1110 | "_level": 1, 1111 | "_components": [], 1112 | "_prefab": null, 1113 | "_opacity": 255, 1114 | "_color": { 1115 | "__type__": "cc.Color", 1116 | "r": 255, 1117 | "g": 255, 1118 | "b": 255, 1119 | "a": 255 1120 | }, 1121 | "_contentSize": { 1122 | "__type__": "cc.Size", 1123 | "width": 0, 1124 | "height": 0 1125 | }, 1126 | "_anchorPoint": { 1127 | "__type__": "cc.Vec2", 1128 | "x": 0.5, 1129 | "y": 1 1130 | }, 1131 | "_position": { 1132 | "__type__": "cc.Vec3", 1133 | "x": 0, 1134 | "y": 0, 1135 | "z": 0 1136 | }, 1137 | "_scale": { 1138 | "__type__": "cc.Vec3", 1139 | "x": 1, 1140 | "y": 1, 1141 | "z": 1 1142 | }, 1143 | "_eulerAngles": { 1144 | "__type__": "cc.Vec3", 1145 | "x": 0, 1146 | "y": 0, 1147 | "z": 0 1148 | }, 1149 | "_skewX": 0, 1150 | "_skewY": 0, 1151 | "_is3DNode": false, 1152 | "groupIndex": 0, 1153 | "_id": "18PpzQDctHi4uGZEtlG0Bs" 1154 | }, 1155 | { 1156 | "__type__": "cc.Widget", 1157 | "_name": "", 1158 | "_objFlags": 0, 1159 | "node": { 1160 | "__id__": 6 1161 | }, 1162 | "_enabled": true, 1163 | "alignMode": 1, 1164 | "_target": null, 1165 | "_alignFlags": 41, 1166 | "_left": 0, 1167 | "_right": 0, 1168 | "_top": 0, 1169 | "_bottom": -150, 1170 | "_verticalCenter": 0, 1171 | "_horizontalCenter": 0, 1172 | "_isAbsLeft": true, 1173 | "_isAbsRight": true, 1174 | "_isAbsTop": true, 1175 | "_isAbsBottom": true, 1176 | "_isAbsHorizontalCenter": true, 1177 | "_isAbsVerticalCenter": true, 1178 | "_originalWidth": 220, 1179 | "_originalHeight": 400, 1180 | "_id": "78ie7ZeYNGYrh5gQ9h/wnu" 1181 | }, 1182 | { 1183 | "__type__": "cc.Layout", 1184 | "_name": "", 1185 | "_objFlags": 0, 1186 | "node": { 1187 | "__id__": 6 1188 | }, 1189 | "_enabled": true, 1190 | "_layoutSize": { 1191 | "__type__": "cc.Size", 1192 | "width": 600, 1193 | "height": 0 1194 | }, 1195 | "_resize": 1, 1196 | "_N$layoutType": 2, 1197 | "_N$padding": 0, 1198 | "_N$cellSize": { 1199 | "__type__": "cc.Size", 1200 | "width": 40, 1201 | "height": 40 1202 | }, 1203 | "_N$startAxis": 0, 1204 | "_N$paddingLeft": 0, 1205 | "_N$paddingRight": 0, 1206 | "_N$paddingTop": 0, 1207 | "_N$paddingBottom": 0, 1208 | "_N$spacingX": 0, 1209 | "_N$spacingY": 0, 1210 | "_N$verticalDirection": 1, 1211 | "_N$horizontalDirection": 0, 1212 | "_N$affectedByScale": false, 1213 | "_id": "7eNr3fdHJCILch6ydHwLri" 1214 | }, 1215 | { 1216 | "__type__": "cc.Node", 1217 | "_name": "nodePoolManager", 1218 | "_objFlags": 0, 1219 | "_parent": { 1220 | "__id__": 2 1221 | }, 1222 | "_children": [], 1223 | "_active": true, 1224 | "_level": 2, 1225 | "_components": [ 1226 | { 1227 | "__id__": 31 1228 | } 1229 | ], 1230 | "_prefab": null, 1231 | "_opacity": 255, 1232 | "_color": { 1233 | "__type__": "cc.Color", 1234 | "r": 255, 1235 | "g": 255, 1236 | "b": 255, 1237 | "a": 255 1238 | }, 1239 | "_contentSize": { 1240 | "__type__": "cc.Size", 1241 | "width": 0, 1242 | "height": 0 1243 | }, 1244 | "_anchorPoint": { 1245 | "__type__": "cc.Vec2", 1246 | "x": 0.5, 1247 | "y": 0.5 1248 | }, 1249 | "_position": { 1250 | "__type__": "cc.Vec3", 1251 | "x": 0, 1252 | "y": 0, 1253 | "z": 0 1254 | }, 1255 | "_scale": { 1256 | "__type__": "cc.Vec3", 1257 | "x": 1, 1258 | "y": 1, 1259 | "z": 1 1260 | }, 1261 | "_eulerAngles": { 1262 | "__type__": "cc.Vec3", 1263 | "x": 0, 1264 | "y": 0, 1265 | "z": 0 1266 | }, 1267 | "_skewX": 0, 1268 | "_skewY": 0, 1269 | "_is3DNode": false, 1270 | "groupIndex": 0, 1271 | "_id": "edgZ+e0OdOAp0m5DXMhz/A" 1272 | }, 1273 | { 1274 | "__type__": "69eabxW4AxHNoaNLQxiweaL", 1275 | "_name": "", 1276 | "_objFlags": 0, 1277 | "node": { 1278 | "__id__": 30 1279 | }, 1280 | "_enabled": true, 1281 | "options": [ 1282 | { 1283 | "__id__": 32 1284 | } 1285 | ], 1286 | "_id": "69SjJxKARMbrEbEerO+Aln" 1287 | }, 1288 | { 1289 | "__type__": "NodePoolOptions", 1290 | "prefab": { 1291 | "__uuid__": "bfebcd17-8665-4d07-b360-5864fcf3de1f" 1292 | }, 1293 | "size": 60, 1294 | "handlerName": "" 1295 | }, 1296 | { 1297 | "__type__": "8dd449+9c9N+5Mf6POuTJfE", 1298 | "_name": "", 1299 | "_objFlags": 0, 1300 | "node": { 1301 | "__id__": 2 1302 | }, 1303 | "_enabled": true, 1304 | "list": { 1305 | "__id__": 6 1306 | }, 1307 | "item": { 1308 | "__uuid__": "bfebcd17-8665-4d07-b360-5864fcf3de1f" 1309 | }, 1310 | "optimizeDrawCall": { 1311 | "__id__": 4 1312 | }, 1313 | "nodePoolManager": { 1314 | "__id__": 31 1315 | }, 1316 | "_id": "abj/3fxLtEhJfM8iPQ8pHZ" 1317 | } 1318 | ] --------------------------------------------------------------------------------