From 2ceb878bd15713e7af0166b896fd7c95b479c60b Mon Sep 17 00:00:00 2001 From: muzzik <1226085293@qq.com> Date: Sat, 16 Jul 2022 01:54:43 +0800 Subject: [PATCH] ... --- assets/BezierCurveAnimation.ts | 3 +- assets/RollingLottery.ts | 367 +++++---- assets/main.scene | 1329 ++++++++++++-------------------- assets/main.ts | 23 +- 4 files changed, 679 insertions(+), 1043 deletions(-) diff --git a/assets/BezierCurveAnimation.ts b/assets/BezierCurveAnimation.ts index c563651..f312a73 100644 --- a/assets/BezierCurveAnimation.ts +++ b/assets/BezierCurveAnimation.ts @@ -1,7 +1,7 @@ import { _decorator, Component } from 'cc'; import * as cc from 'cc'; import BezierCurve from './BezierCurve'; -const { ccclass, property } = _decorator; +const { ccclass, property, help } = _decorator; /** 缓动枚举 */ let easingEnum = {}; @@ -51,6 +51,7 @@ class BezierCurveAnimationTweenUnit { /** 贝塞尔曲线通用动画组件 */ @ccclass('BezierCurveAnimation') +@help('https://www.desmos.com/calculator/cahqdxeshd?lang=zh-CN') export class BezierCurveAnimation extends Component { /* --------------- 属性 --------------- */ /** 缓动单元 */ diff --git a/assets/RollingLottery.ts b/assets/RollingLottery.ts index d92072d..e99e2b6 100644 --- a/assets/RollingLottery.ts +++ b/assets/RollingLottery.ts @@ -33,8 +33,6 @@ export class RollingLottery2 extends Component { @property({ displayName: '滚动结束事件', type: cc.EventHandler }) scrollEndEvent = new cc.EventHandler(); /* --------------- private --------------- */ - /** transform 组件 */ - private _uiTransform: cc.UITransform; /** 周长 */ private _perimeterV3 = cc.v3(); /** 总距离 */ @@ -45,7 +43,7 @@ export class RollingLottery2 extends Component { private _ItemSize: cc.Size; /** 滚动状态 */ private _scrollB = false; - /** 循环状态 */ + /** 循环滚动状态 */ private _loopScrollB = false; /** 循环缓动 */ private _loopTween: cc.Tween; @@ -53,19 +51,33 @@ export class RollingLottery2 extends Component { private _selfRect = cc.rect(); /** 上次曲线 Y */ private _lastCurveYN = 0; - /** 当前目标 */ - private _currTargetN: number; /** 当前缓动下标 */ - private _currTweenN = 0; + private _currTweenIndexN = 0; /** 当前滚动配置 */ private _scrollConfig: RollingLottery2ScrollConfig; /** 父节点中心点矩形 */ private _parentCenterRect: cc.Rect; /** 跳过状态 */ private _jumpB = false; + /** uiTransform 表 */ + private _uiTransformTab: { [k: string]: cc.UITransform }; /* --------------- 临时变量 --------------- */ private _tempM4 = cc.mat4(); private _temp2M4 = cc.mat4(); + /** 滚动子节点临时变量 */ + private _temp = new (class { + /** 当前节点矩形 */ + currNodeRect = cc.rect(); + /** 更新节点坐标 */ + updatePosB: boolean; + /** 当前节点 UITransform */ + currTransform: cc.UITransform; + /** 当前下标 */ + currIndexN: number; + /** 超出周长倍数 */ + outOfRangeMultipleN: number; + })(); + private _temp3Rect = cc.rect(); /* --------------- public --------------- */ /** 曲线组件 */ curveComp: BezierCurveAnimation; @@ -94,17 +106,148 @@ export class RollingLottery2 extends Component { } /* ------------------------------- 功能 ------------------------------- */ /** 获取在世界坐标系下的节点包围盒(不包含自身激活的子节点范围) */ - private _getBoundingBoxToWorld(node_: cc.Node): cc.Rect { - let uiTransform = node_.getComponent(cc.UITransform); + private _getBoundingBoxToWorld(node_: cc.Node, outRect_ = cc.rect()): cc.Rect { + let uiTransform = this._uiTransformTab[node_.uuid]; cc.Mat4.fromRTS(this._tempM4, node_.getRotation(), node_.getPosition(), node_.getScale()); const width = uiTransform.contentSize.width; const height = uiTransform.contentSize.height; - const rect = cc.rect(-uiTransform.anchorPoint.x * width, -uiTransform.anchorPoint.y * height, width, height); + outRect_.set(-uiTransform.anchorPoint.x * width, -uiTransform.anchorPoint.y * height, width, height); node_.parent.getWorldMatrix(this._temp2M4); cc.Mat4.multiply(this._temp2M4, this._temp2M4, this._tempM4); - rect.transformMat4(this._temp2M4); - return rect; + outRect_.transformMat4(this._temp2M4); + return outRect_; + } + + /** 更新节点下标 */ + private _updateNodeIndex(node_: cc.Node, indexN_: number): void { + node_.name = String(indexN_); + this.itemUpdateEvent.emit([node_, indexN_]); + } + + /** 上到下移动子节点 */ + private _moveNodeTopToBottom(distN_: number): void { + this.node.children.forEach((v, kN) => { + this._temp.currTransform = this._uiTransformTab[v.uuid]; + this._temp.updatePosB = false; + this._getBoundingBoxToWorld(v, this._temp.currNodeRect); + + // 移动坐标 + this._temp.currNodeRect.y += distN_; + + // 相交则更新节点坐标 + if (this._temp.currNodeRect.intersects(this._selfRect)) { + this._temp.updatePosB = true; + } + // 若不相交则超出范围 + else { + // 若节点在上方则跳过更新 + if (this._temp.currNodeRect.yMin > this._selfRect.yMax) { + this._temp.updatePosB = true; + } else { + // (超出范围 / 周长) + 超出视图区域的 1 + this._temp.outOfRangeMultipleN = + Math.floor((this._selfRect.yMin - this._temp.currNodeRect.yMax) / this._perimeterV3.y) + 1; + + // 更新坐标 + this._temp.currNodeRect.y += this._temp.outOfRangeMultipleN * this._perimeterV3.y; + v.worldPosition = cc.v3( + v.worldPosition.x, + this._temp.currNodeRect.y + this._ItemSize.height * this._temp.currTransform.anchorY + ); + + // 更新 item 下标 + this._updateNodeIndex( + v, + Number(v.name) - this._temp.outOfRangeMultipleN * this.node.children.length + ); + } + } + + // 更新节点坐标 + if (this._temp.updatePosB) { + v.worldPosition = cc.v3( + v.worldPosition.x, + this._temp.currNodeRect.y + this._temp.currNodeRect.height * this._temp.currTransform.anchorY + ); + } + + // 更新当前下标 + this._temp.currIndexN = Number(v.name); + + if ( + this._temp.currIndexN < this._currIndexN && + cc.Rect.intersection(this._temp3Rect, this._temp.currNodeRect, this._parentCenterRect).height >= + this._parentCenterRect.height * 0.5 + ) { + if (this._temp.currIndexN === -51) { + debugger; + } + this.currIndexN = this._temp.currIndexN; + } + }); + } + + /** 下到上移动子节点 */ + private _moveNodeBottomToTop(distN_: number): void { + this.node.children.forEach((v, kN) => { + this._temp.currTransform = this._uiTransformTab[v.uuid]; + this._temp.updatePosB = false; + this._getBoundingBoxToWorld(v, this._temp.currNodeRect); + + // 移动坐标 + this._temp.currNodeRect.y += distN_; + + // 相交则更新节点坐标 + if (this._temp.currNodeRect.intersects(this._selfRect)) { + this._temp.updatePosB = true; + } + // 若不相交则超出范围 + else { + // 若节点在下方则跳过更新 + if (this._selfRect.yMin > this._temp.currNodeRect.yMax) { + this._temp.updatePosB = true; + } else { + // (超出范围 / 周长) + 超出视图区域的 1 + this._temp.outOfRangeMultipleN = + Math.floor((this._temp.currNodeRect.yMin - this._selfRect.yMax) / this._perimeterV3.y) + 1; + + // 更新坐标 + this._temp.currNodeRect.y -= this._temp.outOfRangeMultipleN * this._perimeterV3.y; + v.worldPosition = cc.v3( + v.worldPosition.x, + this._temp.currNodeRect.y + this._ItemSize.height * this._temp.currTransform.anchorY + ); + + // 更新 item 下标 + this._updateNodeIndex( + v, + Number(v.name) + this._temp.outOfRangeMultipleN * this.node.children.length + ); + } + } + + // 更新节点坐标 + if (this._temp.updatePosB) { + v.worldPosition = cc.v3( + v.worldPosition.x, + this._temp.currNodeRect.y + this._temp.currNodeRect.height * this._temp.currTransform.anchorY + ); + } + + // 更新当前下标 + this._temp.currIndexN = Number(v.name); + if ( + this._temp.currIndexN > this._currIndexN && + cc.Rect.intersection(this._temp3Rect, this._temp.currNodeRect, this._parentCenterRect).height >= + this._parentCenterRect.height * 0.5 + ) { + if (this._temp.currIndexN === -51) { + debugger; + } + this.currIndexN = this._temp.currIndexN; + } + }); } /** @@ -112,23 +255,6 @@ export class RollingLottery2 extends Component { * @param distV3_ 距离 */ private _scrollChild(distV3_: cc.Vec3): void { - /** 当前节点矩形 */ - let currNodeRect: cc.Rect; - /** 更新节点坐标 */ - let updatePosB = false; - /** 当前节点 UITransform */ - let currTransform: cc.UITransform; - /** 头节点 */ - // let headNode = this.node.children[0]; - // /** 尾节点 */ - // let tailNode = this.node.children[this.node.children.length - 1]; - // /** 头节点矩形 */ - // let headNodeRect: cc.Rect; - // /** 尾节点矩形 */ - // let tailNodeRect: cc.Rect; - /** 当前下标 */ - let currIndexN: number; - // 左右滚动 if (this.dire === RollingLottery2Direction.HORIZONTAL) { cc.error('未实现'); @@ -138,148 +264,11 @@ export class RollingLottery2 extends Component { else { // 从上往下滚动 if (distV3_.y < 0) { - this.node.children.forEach((v, kN) => { - currTransform = v.getComponent(cc.UITransform); - updatePosB = false; - currNodeRect = this._getBoundingBoxToWorld(v); - - // 移动坐标 - currNodeRect.y += distV3_.y; - - // 相交则更新节点坐标 - if (currNodeRect.intersects(this._selfRect)) { - updatePosB = true; - } - // 若不相交则超出范围 - else { - // 若节点在上方则跳过更新 - if (currNodeRect.yMin > this._selfRect.yMax) { - updatePosB = true; - } else { - // // setTimeout 防止获取节点坐标错误、防止 setSiblingIndex 后遍历错误 - // setTimeout(() => { - // // 切换位置到头节点上方 - // headNodeRect = this._getBoundingBoxToWorld(headNode); - // v.worldPosition = cc.v3( - // v.worldPosition.x, - // headNodeRect.yMax + currNodeRect.height * currTransform.anchorY - // ); - // // 更新 item - // let indexN = Number(headNode.name) - 1; - // v.name = String(indexN); - // this.itemUpdateEvent.emit([v, indexN]); - // // 更新 item 下标 - // headNode = v; - // v.setSiblingIndex(0); - // }, 0); - - /** 展示周长 */ - let tempN = this._selfRect.height + this._ItemSize.height; - // 超出圈数 - let beyondTurnsN = Math.floor((this._selfRect.yMin - currNodeRect.yMax) / tempN); - - // 超出距离 - let beyondDistN = (this._selfRect.yMin - currNodeRect.yMax) % tempN; - cc.log(beyondDistN); - - currNodeRect.y = this._selfRect.yMax + currNodeRect.height - beyondDistN; - v.worldPosition = cc.v3( - v.worldPosition.x, - currNodeRect.y - currNodeRect.height * (1 - currTransform.anchorY) - ); - - // // 更新 item - // let indexN = Number(v.name) - beyondTurnsN; - // v.name = String(indexN); - // this.itemUpdateEvent.emit([v, indexN]); - } - } - - // 更新节点坐标 - if (updatePosB) { - v.worldPosition = cc.v3( - v.worldPosition.x, - currNodeRect.y + currNodeRect.height * currTransform.anchorY - ); - } - - // 更新当前下标 - currIndexN = Number(v.name); - if (currIndexN < this._currIndexN && currNodeRect.intersects(this._parentCenterRect)) { - this.currIndexN = currIndexN; - } - }); + this._moveNodeTopToBottom(distV3_.y); } // 从下往上滚动 else if (distV3_.y > 0) { - this.node.children.forEach((v, kN) => { - currTransform = v.getComponent(cc.UITransform); - updatePosB = false; - currNodeRect = this._getBoundingBoxToWorld(v); - - // 移动坐标 - currNodeRect.y += distV3_.y; - - // 相交则更新节点坐标 - if (currNodeRect.intersects(this._selfRect)) { - updatePosB = true; - } - // 若不相交则超出范围 - else { - // 若节点在下方则跳过更新 - if (this._selfRect.yMin > currNodeRect.yMax) { - updatePosB = true; - } else { - // // setTimeout 防止获取节点坐标错误、防止 setSiblingIndex 后遍历错误 - // setTimeout(() => { - // // 切换位置到尾节点下方 - // tailNodeRect = this._getBoundingBoxToWorld(tailNode); - // v.worldPosition = cc.v3( - // v.worldPosition.x, - // tailNodeRect.yMin - currNodeRect.height * (1 - currTransform.anchorY) - // ); - // // 更新 item - // let indexN = Number(tailNode.name) + 1; - // v.name = String(indexN); - // this.itemUpdateEvent.emit([v, indexN]); - // // 更新 item 下标 - // tailNode = v; - // v.setSiblingIndex(this.node.children.length - 1); - // }, 0); - - // 超出圈数 - let beyondTurnsN = Math.floor( - (this._selfRect.yMin - currNodeRect.yMax) / this._selfRect.height - ); - - // 超出距离 - let beyondDistN = (currNodeRect.yMin - this._selfRect.yMax) % this._selfRect.height; - v.worldPosition = cc.v3( - v.worldPosition.x, - this._selfRect.yMin + beyondDistN + currNodeRect.height * currTransform.anchorY - ); - - // 更新 item - let indexN = Number(v.name) + beyondTurnsN; - v.name = String(indexN); - this.itemUpdateEvent.emit([v, indexN]); - } - } - - // 更新节点坐标 - if (updatePosB) { - v.worldPosition = cc.v3( - v.worldPosition.x, - currNodeRect.y + currNodeRect.height * currTransform.anchorY - ); - } - - // 更新当前下标 - currIndexN = Number(v.name); - if (currIndexN > this._currIndexN && currNodeRect.intersects(this._parentCenterRect)) { - this.currIndexN = currIndexN; - } - }); + this._moveNodeBottomToTop(distV3_.y); } } } @@ -299,17 +288,12 @@ export class RollingLottery2 extends Component { this._totalDistV3 = cc.v3(intervalN * boxDistN + offsetDistV3.x); } else { this._totalDistV3 = cc.v3(0, intervalN * boxDistN + offsetDistV3.y); - cc.log('目标距离', this._currIndexN, offsetDistV3.y, this._totalDistV3.y); } - // // eslint-disable-next-line autofix/no-debugger - // debugger; - this._currDistV3 = cc.v3(); } /** 初始化数据 */ private _initData(): void { this.curveComp = this.node.getComponent(BezierCurveAnimation); - this._uiTransform = this.node.getComponent(cc.UITransform); // 设置更新事件 let updateEvent = new cc.EventHandler(); @@ -340,15 +324,18 @@ export class RollingLottery2 extends Component { this._ItemSize.height ); - // 自己矩形 + // 重置数据 + this._uiTransformTab = Object.create(null); + this._uiTransformTab[this.node.uuid] = this.node.getComponent(cc.UITransform); this._selfRect = this._getBoundingBoxToWorld(this.node); - - // 单圈长度 this._perimeterV3.set(cc.Vec3.ZERO); - let size: cc.Size; + + // 更新 _uiTransformTab, _perimeterV3 + let itemSize: cc.Size; this.node.children.forEach((v1) => { - size = v1.getComponent(cc.UITransform).contentSize; - this._perimeterV3.add3f(size.x, size.y, 0); + this._uiTransformTab[v1.uuid] = v1.getComponent(cc.UITransform); + itemSize = this._uiTransformTab[v1.uuid].contentSize; + this._perimeterV3.add3f(itemSize.x, itemSize.y, 0); }); } @@ -431,9 +418,6 @@ export class RollingLottery2 extends Component { if (this._scrollB && !this._loopScrollB) { return; } - if (this.currIndexN === indexN_) { - return; - } this._scrollB = true; this._jumpB = true; @@ -449,6 +433,9 @@ export class RollingLottery2 extends Component { // 开始滚动 this._scrollChild(this._totalDistV3); // 更新状态 + if (indexN_ === -51) { + debugger; + } this.currIndexN = indexN_; this._scrollB = false; this._jumpB = false; @@ -459,10 +446,6 @@ export class RollingLottery2 extends Component { if (this._scrollB && !this._loopScrollB) { return; } - if (this.currIndexN === indexN_) { - return; - } - cc.log('目标', indexN_); this._scrollB = true; this._scrollConfig = new RollingLottery2ScrollConfig(scrollConfig_); @@ -473,22 +456,19 @@ export class RollingLottery2 extends Component { this._loopScrollB = false; } - this._currTargetN = indexN_; this._lastCurveYN = 0; // 更新移动距离 this._updateMoveDist(indexN_); // 开始滚动 - this._currTweenN = this._scrollConfig.tweenIndexN; - this.curveComp.startTween(this._currTweenN); + this._currTweenIndexN = this._scrollConfig.tweenIndexN; + this.curveComp.startTween(this._currTweenIndexN); } - private _currDistV3: cc.Vec3; /* ------------------------------- 自定义事件 ------------------------------- */ private _eventUpdate(yN_: number, indexN_: number, y2N_: number): void { if (this.dire === RollingLottery2Direction.HORIZONTAL) { cc.error('未实现'); // ... } else { - this._currDistV3.add(cc.v3(0, (yN_ - this._lastCurveYN) * this._totalDistV3.y)); this._scrollChild(cc.v3(0, (yN_ - this._lastCurveYN) * this._totalDistV3.y)); } this._lastCurveYN = yN_; @@ -497,13 +477,10 @@ export class RollingLottery2 extends Component { private _eventEnd(): void { this._scrollB = false; - this.currIndexN = this._currTargetN; - - cc.log('滚动结束', this._currDistV3.y, this._totalDistV3.y); // 继续缓动 - if (this._scrollConfig.nextPlayB && ++this._currTweenN < this.curveComp.tweenUnitAS.length) { - this.curveComp.startTween(this._currTweenN); + if (this._scrollConfig.nextPlayB && ++this._currTweenIndexN < this.curveComp.tweenUnitAS.length) { + this.curveComp.startTween(this._currTweenIndexN); } else { this.scrollEndEvent.emit([]); this._scrollConfig.endCBF?.(); diff --git a/assets/main.scene b/assets/main.scene index 870de31..38d59dd 100644 --- a/assets/main.scene +++ b/assets/main.scene @@ -19,12 +19,6 @@ }, { "__id__": 4 - }, - { - "__id__": 58 - }, - { - "__id__": 61 } ], "_active": true, @@ -32,7 +26,7 @@ "_prefab": null, "autoReleaseAssets": false, "_globals": { - "__id__": 64 + "__id__": 53 }, "_id": "4c7c011d-1dee-494d-b761-aa723a3a84c7" }, @@ -141,16 +135,16 @@ "_active": true, "_components": [ { - "__id__": 54 + "__id__": 49 }, { - "__id__": 55 + "__id__": 50 }, { - "__id__": 56 + "__id__": 51 }, { - "__id__": 57 + "__id__": 52 } ], "_prefab": null, @@ -406,7 +400,7 @@ }, { "__type__": "cc.Node", - "_name": "Node", + "_name": "layout", "_objFlags": 0, "_parent": { "__id__": 4 @@ -416,13 +410,28 @@ "__id__": 12 }, { - "__id__": 16 + "__id__": 21 + }, + { + "__id__": 30 } ], "_active": true, "_components": [ { - "__id__": 53 + "__id__": 39 + }, + { + "__id__": 40 + }, + { + "__id__": 41 + }, + { + "__id__": 42 + }, + { + "__id__": 45 } ], "_prefab": null, @@ -445,209 +454,6 @@ "y": 1, "z": 1 }, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "aaC7Jfz8BGtJWCH44OYlTr" - }, - { - "__type__": "cc.Node", - "_name": "SpriteSplash", - "_objFlags": 0, - "_parent": { - "__id__": 11 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 13 - }, - { - "__id__": 14 - }, - { - "__id__": 15 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "5cI7n8QEpIVoKq050usnFD" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 12 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 200, - "height": 160 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "cbDS/tn7BIRalnGgdj7pqQ" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 12 - }, - "_enabled": true, - "__prefab": null, - "_visFlags": 0, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 195, - "g": 195, - "b": 195, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 0, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "0ceTBLwSRK5YhoR57uIjUc" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 12 - }, - "_enabled": true, - "__prefab": null, - "_alignFlags": 45, - "_target": null, - "_left": 0, - "_right": 0, - "_top": 0, - "_bottom": 0, - "_horizontalCenter": 0, - "_verticalCenter": 0, - "_isAbsLeft": true, - "_isAbsRight": true, - "_isAbsTop": true, - "_isAbsBottom": true, - "_isAbsHorizontalCenter": true, - "_isAbsVerticalCenter": true, - "_originalWidth": 100, - "_originalHeight": 100, - "_alignMode": 2, - "_lockFlags": 0, - "_id": "88A3CwFUJBRYRaF6qi39aw" - }, - { - "__type__": "cc.Node", - "_name": "layout", - "_objFlags": 0, - "_parent": { - "__id__": 11 - }, - "_children": [ - { - "__id__": 17 - }, - { - "__id__": 26 - }, - { - "__id__": 35 - } - ], - "_active": true, - "_components": [ - { - "__id__": 44 - }, - { - "__id__": 45 - }, - { - "__id__": 46 - }, - { - "__id__": 47 - }, - { - "__id__": 49 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, "_layer": 33554432, "_euler": { "__type__": "cc.Vec3", @@ -659,26 +465,26 @@ }, { "__type__": "cc.Node", - "_name": "-1", + "_name": "0", "_objFlags": 0, "_parent": { - "__id__": 16 + "__id__": 11 }, "_children": [ { - "__id__": 18 + "__id__": 13 }, { - "__id__": 21 + "__id__": 16 } ], "_active": true, "_components": [ { - "__id__": 24 + "__id__": 19 }, { - "__id__": 25 + "__id__": 20 } ], "_prefab": null, @@ -708,330 +514,6 @@ "y": 0, "z": 0 }, - "_id": "923kToIvFI8rfqik84HnlG" - }, - { - "__type__": "cc.Node", - "_name": "SpriteSplash", - "_objFlags": 0, - "_parent": { - "__id__": 17 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 19 - }, - { - "__id__": 20 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "27asd87KNAg7lVqRLyY5Ib" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 18 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 200, - "height": 80 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "f49kBHbjVNx7riiAEPDbfe" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 18 - }, - "_enabled": true, - "__prefab": null, - "_visFlags": 0, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 0, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "72L0YGfflKgrKYyFOzvNyV" - }, - { - "__type__": "cc.Node", - "_name": "Label", - "_objFlags": 0, - "_parent": { - "__id__": 17 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 22 - }, - { - "__id__": 23 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "e5tPqbl9JIQKr9NOnrWMXl" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 21 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 35.57, - "height": 50.4 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "2ai46cJ95JAaqmIhRK39l0" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 21 - }, - "_enabled": true, - "__prefab": null, - "_visFlags": 0, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_string": "-1", - "_horizontalAlign": 1, - "_verticalAlign": 1, - "_actualFontSize": 40, - "_fontSize": 40, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 0, - "_enableWrapText": true, - "_font": null, - "_isSystemFontUsed": true, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_id": "17OJGo8BtH4q7IwW19G0Ds" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 17 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 200, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "c6qPrd0TNGwLJOJRsHRuz8" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 17 - }, - "_enabled": true, - "__prefab": null, - "_visFlags": 0, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 46, - "g": 33, - "b": 33, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 0, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "e5hooe8ERLx6JlRfRd7aF8" - }, - { - "__type__": "cc.Node", - "_name": "0", - "_objFlags": 0, - "_parent": { - "__id__": 16 - }, - "_children": [ - { - "__id__": 27 - }, - { - "__id__": 30 - } - ], - "_active": true, - "_components": [ - { - "__id__": 33 - }, - { - "__id__": 34 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, "_id": "02Vo3suVZBTbOqlNaZkdkw" }, { @@ -1039,16 +521,16 @@ "_name": "SpriteSplash", "_objFlags": 0, "_parent": { - "__id__": 26 + "__id__": 12 }, "_children": [], "_active": true, "_components": [ { - "__id__": 28 + "__id__": 14 }, { - "__id__": 29 + "__id__": 15 } ], "_prefab": null, @@ -1085,7 +567,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 27 + "__id__": 13 }, "_enabled": true, "__prefab": null, @@ -1106,7 +588,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 27 + "__id__": 13 }, "_enabled": true, "__prefab": null, @@ -1145,16 +627,16 @@ "_name": "Label", "_objFlags": 0, "_parent": { - "__id__": 26 + "__id__": 12 }, "_children": [], "_active": true, "_components": [ { - "__id__": 31 + "__id__": 17 }, { - "__id__": 32 + "__id__": 18 } ], "_prefab": null, @@ -1191,7 +673,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 30 + "__id__": 16 }, "_enabled": true, "__prefab": null, @@ -1212,7 +694,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 30 + "__id__": 16 }, "_enabled": true, "__prefab": null, @@ -1250,7 +732,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 26 + "__id__": 12 }, "_enabled": true, "__prefab": null, @@ -1271,7 +753,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 26 + "__id__": 12 }, "_enabled": true, "__prefab": null, @@ -1310,30 +792,30 @@ "_name": "1", "_objFlags": 0, "_parent": { - "__id__": 16 + "__id__": 11 }, "_children": [ { - "__id__": 36 + "__id__": 22 }, { - "__id__": 39 + "__id__": 25 } ], "_active": true, "_components": [ { - "__id__": 42 + "__id__": 28 }, { - "__id__": 43 + "__id__": 29 } ], "_prefab": null, "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -100, + "y": 0, "z": 0 }, "_lrot": { @@ -1356,23 +838,23 @@ "y": 0, "z": 0 }, - "_id": "42HZx3oyNJSLCnkF1uwHLZ" + "_id": "54GyrbvkxF3bUTvVhX1UU7" }, { "__type__": "cc.Node", "_name": "SpriteSplash", "_objFlags": 0, "_parent": { - "__id__": 35 + "__id__": 21 }, "_children": [], "_active": true, "_components": [ { - "__id__": 37 + "__id__": 23 }, { - "__id__": 38 + "__id__": 24 } ], "_prefab": null, @@ -1402,14 +884,14 @@ "y": 0, "z": 0 }, - "_id": "28d20C3T5NoJefW6MOgrMl" + "_id": "460bviyiFLTIRTkenIJ9Vh" }, { "__type__": "cc.UITransform", "_name": "", "_objFlags": 0, "node": { - "__id__": 36 + "__id__": 22 }, "_enabled": true, "__prefab": null, @@ -1423,14 +905,14 @@ "x": 0.5, "y": 0.5 }, - "_id": "f39lo0anhGlaL/1YAnLe7k" + "_id": "e8rIPXJ11Nkqki2aNo8Hqx" }, { "__type__": "cc.Sprite", "_name": "", "_objFlags": 0, "node": { - "__id__": 36 + "__id__": 22 }, "_enabled": true, "__prefab": null, @@ -1462,23 +944,23 @@ "_isTrimmedMode": true, "_useGrayscale": false, "_atlas": null, - "_id": "e9eaPu/xhIBqcc01zfUYNU" + "_id": "39U3v2Ua1LBKzi0Zv63cJ4" }, { "__type__": "cc.Node", "_name": "Label", "_objFlags": 0, "_parent": { - "__id__": 35 + "__id__": 21 }, "_children": [], "_active": true, "_components": [ { - "__id__": 40 + "__id__": 26 }, { - "__id__": 41 + "__id__": 27 } ], "_prefab": null, @@ -1508,14 +990,14 @@ "y": 0, "z": 0 }, - "_id": "d9Re+HRSpFabVMmP1xR5CY" + "_id": "e3uUeX4SNLtpWleAoZigdf" }, { "__type__": "cc.UITransform", "_name": "", "_objFlags": 0, "node": { - "__id__": 39 + "__id__": 25 }, "_enabled": true, "__prefab": null, @@ -1529,14 +1011,14 @@ "x": 0.5, "y": 0.5 }, - "_id": "a7CEv4sEBC+7lkGVX+c0IB" + "_id": "b2ShKS2+9HF5ZQ5MAaiN7J" }, { "__type__": "cc.Label", "_name": "", "_objFlags": 0, "node": { - "__id__": 39 + "__id__": 25 }, "_enabled": true, "__prefab": null, @@ -1551,7 +1033,7 @@ "b": 0, "a": 255 }, - "_string": "1", + "_string": "0", "_horizontalAlign": 1, "_verticalAlign": 1, "_actualFontSize": 40, @@ -1567,14 +1049,14 @@ "_isUnderline": false, "_underlineHeight": 2, "_cacheMode": 0, - "_id": "80+pN6bORN0rlKy5z4xbMb" + "_id": "1a8Rs1ZH9LXZfkHv03B21a" }, { "__type__": "cc.UITransform", "_name": "", "_objFlags": 0, "node": { - "__id__": 35 + "__id__": 21 }, "_enabled": true, "__prefab": null, @@ -1588,14 +1070,14 @@ "x": 0.5, "y": 0.5 }, - "_id": "57fn6JufpM4a0gZ9ZvW88v" + "_id": "cetnJ7aT1LVbkkWGGLLWMz" }, { "__type__": "cc.Sprite", "_name": "", "_objFlags": 0, "node": { - "__id__": 35 + "__id__": 21 }, "_enabled": true, "__prefab": null, @@ -1605,9 +1087,9 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 228, - "g": 87, - "b": 87, + "r": 80, + "g": 66, + "b": 247, "a": 255 }, "_spriteFrame": { @@ -1627,14 +1109,338 @@ "_isTrimmedMode": true, "_useGrayscale": false, "_atlas": null, - "_id": "cfvOCOJaJFNpnGQM94AeFX" + "_id": "2dgUn4RLtFKb0vQXLNlEKH" + }, + { + "__type__": "cc.Node", + "_name": "2", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [ + { + "__id__": 31 + }, + { + "__id__": 34 + } + ], + "_active": true, + "_components": [ + { + "__id__": 37 + }, + { + "__id__": 38 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -100, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "36ReaawiNNIrb0pUJLvgBq" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash", + "_objFlags": 0, + "_parent": { + "__id__": 30 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 32 + }, + { + "__id__": 33 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "27Qk8MchtDkb3qzoMqorj2" }, { "__type__": "cc.UITransform", "_name": "", "_objFlags": 0, "node": { - "__id__": 16 + "__id__": 31 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "7fLKCMOhNJ4IMxyV6O+OZG" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 31 + }, + "_enabled": true, + "__prefab": null, + "_visFlags": 0, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "9aDeO8CRNNYbLPG8Czyw94" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "_parent": { + "__id__": 30 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 35 + }, + { + "__id__": 36 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "04uge49oFNvIk6HWTHMC/l" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 22.25, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "f2944ttIxLZ6zrAMOjFZXB" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": null, + "_visFlags": 0, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_string": "0", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 40, + "_fontSize": 40, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "798HbKDnlBdpnURc2Ip1Pa" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 30 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "447P0vywNGP6OWJ+DDnPTt" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 30 + }, + "_enabled": true, + "__prefab": null, + "_visFlags": 0, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 80, + "g": 66, + "b": 247, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "bd2zytYxFCKKIcpP5BT/yr" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 }, "_enabled": true, "__prefab": null, @@ -1655,7 +1461,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 16 + "__id__": 11 }, "_enabled": false, "__prefab": null, @@ -1686,7 +1492,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 16 + "__id__": 11 }, "_enabled": true, "__prefab": null, @@ -1713,13 +1519,16 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 16 + "__id__": 11 }, "_enabled": true, "__prefab": null, "tweenUnitAS": [ { - "__id__": 48 + "__id__": 43 + }, + { + "__id__": 44 } ], "tweenSwitchEventAS": [], @@ -1729,29 +1538,86 @@ }, { "__type__": "BezierCurveAnimationTweenUnit", - "customCurveB": false, - "easing": 6, - "controlPointV3S": [], - "timeSN": 1 + "customCurveB": true, + "easing": 41, + "controlPointV3S": [ + { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + { + "__type__": "cc.Vec3", + "x": 0.723, + "y": 0.555, + "z": 0 + }, + { + "__type__": "cc.Vec3", + "x": 0.9705, + "y": 1.0455, + "z": 0 + }, + { + "__type__": "cc.Vec3", + "x": 1, + "y": 1.0025, + "z": 0 + } + ], + "timeSN": 5 + }, + { + "__type__": "BezierCurveAnimationTweenUnit", + "customCurveB": true, + "easing": 0, + "controlPointV3S": [ + { + "__type__": "cc.Vec3", + "x": 0, + "y": 1.0025, + "z": 0 + }, + { + "__type__": "cc.Vec3", + "x": 0.136, + "y": 0.993, + "z": 0 + }, + { + "__type__": "cc.Vec3", + "x": 0.79, + "y": 1, + "z": 0 + }, + { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 0 + } + ], + "timeSN": 2 }, { "__type__": "b1f62Y9bmdIM5sNvTecZgMd", "_name": "", "_objFlags": 0, "node": { - "__id__": 16 + "__id__": 11 }, "_enabled": true, "__prefab": null, "dire": 0, "itemUpdateEvent": { - "__id__": 50 + "__id__": 46 }, "centerNodeEvent": { - "__id__": 51 + "__id__": 47 }, "scrollEndEvent": { - "__id__": 52 + "__id__": 48 }, "_id": "6d+rTEEL9OZoMInU6l+PWp" }, @@ -1767,41 +1633,24 @@ }, { "__type__": "cc.ClickEvent", - "target": null, + "target": { + "__id__": 4 + }, "component": "", - "_componentId": "", - "handler": "", + "_componentId": "c6550RvRXBJCp7yhDZhJZ5N", + "handler": "centerNodeEvent", "customEventData": "" }, { "__type__": "cc.ClickEvent", - "target": null, + "target": { + "__id__": 4 + }, "component": "", - "_componentId": "", - "handler": "", + "_componentId": "c6550RvRXBJCp7yhDZhJZ5N", + "handler": "scrollEndEvent", "customEventData": "" }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 11 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 200, - "height": 160 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "c8CKlli2VDop7657mEN4Tp" - }, { "__type__": "cc.UITransform", "_name": "", @@ -1878,231 +1727,19 @@ "__prefab": null, "_id": "30wjiGi11PK6zFwTt8v3LO" }, - { - "__type__": "cc.Node", - "_name": "SpriteSplash-001", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 59 - }, - { - "__id__": 60 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 380, - "y": -1, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "b9eTMxK8BIo5QAhbOac7M9" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 58 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 200, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_id": "bdtKd7NIJLQpH5ktpwkNmk" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 58 - }, - "_enabled": true, - "__prefab": null, - "_visFlags": 0, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 0, - "b": 0, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 0, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "47fkmFPodM9LY19cWrARD5" - }, - { - "__type__": "cc.Node", - "_name": "SpriteSplash-002", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 62 - }, - { - "__id__": 63 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 380, - "y": 279, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "9fVuUdkklPiKS2GfuR7eCb" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 61 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 200, - "height": 160 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_id": "c0Y2olqZtIW49koLsI+qSt" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 61 - }, - "_enabled": true, - "__prefab": null, - "_visFlags": 0, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 0, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "c3MWYT+E9I+7ulMRJ0K1+c" - }, { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 65 + "__id__": 54 }, "shadows": { - "__id__": 66 + "__id__": 55 }, "_skybox": { - "__id__": 67 + "__id__": 56 }, "fog": { - "__id__": 68 + "__id__": 57 } }, { diff --git a/assets/main.ts b/assets/main.ts index 88d9d5c..f2879ad 100644 --- a/assets/main.ts +++ b/assets/main.ts @@ -8,10 +8,31 @@ export class main extends Component { /* ------------------------------- segmentation ------------------------------- */ start() { let comp = this.node.getComponentInChildren(RollingLottery2); - comp.jump(-180); + // let indexN = 0; + // this.node.on( + // cc.Node.EventType.TOUCH_END, + // () => { + // comp['_scrollChild'](cc.v3(0, -50)); + // }, + // this + // ); + + // comp.loop(10000); + comp.scroll(50, { + tweenIndexN: 0, + nextPlayB: true + }); } /* ------------------------------- segmentation ------------------------------- */ eventItemUpdate(node_: cc.Node, indexN_: number): void { node_.getComponentInChildren(cc.Label).string = indexN_ + ''; } + + centerNodeEvent(indexN_: number): void { + cc.log('当前下标', indexN_); + } + + scrollEndEvent(): void { + cc.log('滚动结束'); + } }