commit 8bcf8cf3858bdbbc758b3658f069f166e1776d6f Author: yuanfengxin <1226085293@qq.com> Date: Wed Jul 13 18:35:31 2022 +0800 first commit diff --git a/.creator/default-meta.json b/.creator/default-meta.json new file mode 100644 index 0000000..abb1239 --- /dev/null +++ b/.creator/default-meta.json @@ -0,0 +1,5 @@ +{ + "image": { + "type": "sprite-frame" + } +} diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..72b5aca --- /dev/null +++ b/.eslintignore @@ -0,0 +1,23 @@ +# This file will tell ESLint which files and folders it should never lint. + +node_modules + +*.d.ts + +*.js + +build + +temp + +library + +local + +native + +profiles + +settings + +build-related \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..6dd4482 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,85 @@ +module.exports = { + root: true, + /** + * 扩展->采用 AlloyTeam 的 ESLintConfig + * @see https://github.com/AlloyTeam/eslint-config-alloy + */ + extends: ['alloy', 'alloy/typescript', 'plugin:eqeqeq-fix/recommended'], + /** + * 适用环境 + */ + env: { + node: true, + browser: true + }, + /** + * 解析器:使用 ESLint 解析 TypeScript 语法 + */ + parser: '@typescript-eslint/parser', + /** + * ESLint 插件 + */ + plugins: ['@typescript-eslint', 'unused-imports', 'autofix'], + globals: { + /** + * 指定Cocos Creator相关全局变量,这样子就不会触发 no-undef 的规则 + */ + Decimal: 'readonly', + CryptoJS: 'readonly', + jsb: 'readonly', + Editor: 'readonly', + globalThis: 'readonly', + protobuf: 'readonly', + gg: 'readonly', + logger: 'readonly' + }, + /** + * 默认规则 + * + * @see https://eslint.org/docs/rules/ + * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules + */ + rules: { + /** 在每条语句的末尾添加一个分号 */ + semi: ['error', 'always'], + /** 禁止修改原生对象,排除的类型可以扩展 */ + 'no-extend-native': ['error', { exceptions: ['String', 'Number', 'Date', 'Array'] }], + /** 字符串指定使用单引号 */ + 'autofix/quotes': ['error', 'single'], + /** 禁止使用console */ + 'autofix/no-console': ['error'], + /** 禁止使用debugger */ + 'autofix/no-debugger': ['error'], + /** 必须使用===,禁止使用== */ + 'eqeqeq-fix/eqeqeq': ['error'], + /** 当导入的东西未被使用时报错提示 */ + 'unused-imports/no-unused-imports': 'error', + /** 禁止将自己赋值给自己,属性可以 */ + 'no-self-assign': ['error', { props: false }], + /** 控制环复杂度最大值为25(默认20),超过后警告(默认是报错) */ + complexity: ['error', { max: 25 }], + /** 代码块嵌套的深度禁止超过 6 层 */ + 'max-depth': ['error', { max: 6 }], + /** 函数最多参数数量为 6个,超过之后警告,默认值是 3 */ + 'max-params': ['warn', 6], + /** 限制数组类型必须使用 Array 或 T[] */ + '@typescript-eslint/array-type': ['error'], + /** 指定类成员的排序规则 */ + '@typescript-eslint/member-ordering': 'off', + /** method 和 property 不需要显式声明 public 访问修饰符 */ + '@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }], + /** 禁止将 this 赋值给其他变量,除非是解构赋值 */ + '@typescript-eslint/no-this-alias': ['error', { allowDestructuring: true, allowedNames: ['self'] }], + /** 不允许对初始化为数字、字符串或布尔值的变量或参数进行显式类型声明 */ + '@typescript-eslint/no-inferrable-types': ['error', { ignoreParameters: true, ignoreProperties: true }], + /** 类型断言必须使用 as */ + '@typescript-eslint/consistent-type-assertions': [ + 'error', + { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' } + ], + camelcase: [ + 'error', + { properties: 'always', ignoreDestructuring: true, ignoreImports: true, ignoreGlobals: true, allow: [] } + ] + } +}; diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a231b3f --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ + +#/////////////////////////// +# Cocos Creator 3D Project +#/////////////////////////// +library/ +temp/ +local/ +build/ +profiles/ +native +#////////////////////////// +# NPM +#////////////////////////// +node_modules/ + +#////////////////////////// +# VSCode +#////////////////////////// +.vscode/ + +#////////////////////////// +# WebStorm +#////////////////////////// +.idea/ \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..305e524 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,57 @@ +// .prettierrc.js +module.exports = { + /** + * 一行最多 120 字符 + */ + printWidth: 120, + /** + * 使用 4 个空格缩进 + */ + tabWidth: 4, + // 不使用缩进符,而使用空格 + useTabs: false, + // 行尾需要有分号 + semi: true, + // 使用单引号 + singleQuote: true, + /** + * 对象属性的引号使用 + * as-needed 仅在需要的时候使用 + * consistent 有一个属性需要引号,就都需要引号 + * preserve 保留用户输入的情况 + */ + quoteProps: 'as-needed', + /** + * 对象属性的尾随逗号,最后一个属性后是否需要加逗号 + * none 末尾没有逗号 + * es5 es5有效的地方保留 + * all 在可能的地方都加上逗号 + */ + trailingComma: 'none', + /** + * 字面量对象括号中的空格,默认true + * true - Example: { foo: bar } + * false - Example: {foo: bar} + */ + bracketSpacing: true, + /** + * 箭头函数中的括号 + * “avoid” - 在有需要的时候使用. Example: x => x + * “always” - 一直使用. Example: (x) => x + */ + arrowParens: 'always', + // 每个文件格式化的范围是文件的全部内容 + rangeStart: 0, + rangeEnd: Infinity, + /** + * 折行标准 preserve,always + */ + proseWrap: 'always', + /** + * 行末尾标识 + * “auto”,“lf”,“crlf”,“cr” + */ + endOfLine: 'lf', + // 格式化内嵌代码 + embeddedLanguageFormatting: 'auto' +}; diff --git a/assets/BezierCurve.ts b/assets/BezierCurve.ts new file mode 100644 index 0000000..776f4ff --- /dev/null +++ b/assets/BezierCurve.ts @@ -0,0 +1,248 @@ +import * as cc from 'cc'; + +/** 贝塞尔曲线 */ +class BezierCurve { + constructor(pointAs_?: cc.Vec3[]) { + this.pointV3S = pointAs_; + this._resetData(); + } + /* --------------- private --------------- */ + private _distanceNS: number[] = []; + private _funcFSS: Function[][] = []; + /** 控制点 */ + private _pointV3S!: cc.Vec3[]; + /* --------------- public --------------- */ + /** 控制点 */ + get pointV3S() { + return this._pointV3S; + } + set pointV3S(valueV3S) { + this._pointV3S = valueV3S; + this._resetData(); + } + /* ------------------------------- 功能函数 ------------------------------- */ + /** 重置数据 */ + private _resetData(): void { + if (this._pointV3S.length < 2) { + return; + } + /** 首尾相等 */ + let equalsB = this._pointV3S[0].strictEquals(this._pointV3S[this._pointV3S.length - 1]); + /** 总距离 */ + let sumDistanceN = 0; + /** 临时变量 */ + let tempV3: cc.Vec3; + let temp2V3: cc.Vec3; + let temp3V3: cc.Vec3; + let temp4V3: cc.Vec3; + for (let kN = 0, lenN = this._pointV3S.length - 1; kN < lenN; kN++) { + if (kN === 0) { + tempV3 = equalsB ? this._pointV3S[this._pointV3S.length - 2] : this._pointV3S[0]; + } else { + tempV3 = this._pointV3S[kN - 1]; + } + temp2V3 = this._pointV3S[kN]; + temp3V3 = this._pointV3S[kN + 1]; + + if (kN + 1 === this._pointV3S.length - 1) { + temp4V3 = equalsB ? this._pointV3S[1] : this._pointV3S[this._pointV3S.length - 1]; + } else { + temp4V3 = this._pointV3S[kN + 2]; + } + + this._funcFSS[kN] = []; + [this._funcFSS[kN][0], this._funcFSS[kN][1]] = this._curve(tempV3, temp2V3, temp3V3, temp4V3); + + sumDistanceN += this._gaussLegendre(this._funcFSS[kN][1] as any, 0, 1); + this._distanceNS[kN] = sumDistanceN; + } + } + + /** + * 递归阶乘 + * @param valueN_ + * @returns + */ + private _factorial(valueN_: number): number { + let resultN = 1; + for (let kN = 2; kN <= valueN_; ++kN) { + resultN *= kN; + } + return resultN; + } + + /** + * 高斯—勒让德积分公式可以用较少节点数得到高精度的计算结果 + * @param valueF_ 曲线长度变化率,用于匀速曲线运动 + * @param valueN_ 左区间 + * @param value2N_ 右区间 + * @returns + */ + private _gaussLegendre(valueF_: (vN: number) => number, valueN_: number, value2N_: number): number { + // 3次系数 + let gauFactor = { + 0.7745966692: 0.555555556, + 0: 0.8888888889 + }; + // 5次系数 + // let GauFactor = {0.9061798459:0.2369268851,0.5384693101:0.4786286705,0:0.5688888889} + // 积分 + let gauSumN = 0; + let keyN: number; + for (let key in gauFactor) { + if (Object.prototype.hasOwnProperty.call(gauFactor, key)) { + keyN = Number(key); + let v = gauFactor[key]; + let t = ((value2N_ - valueN_) * keyN + valueN_ + value2N_) / 2; + let der = valueF_(t); + gauSumN = gauSumN + der * v; + if (keyN > 0) { + t = ((value2N_ - valueN_) * -key + valueN_ + value2N_) / 2; + der = valueF_(t); + gauSumN = gauSumN + der * v; + } + } + } + return (gauSumN * (value2N_ - valueN_)) / 2; + } + + private _curve(pointV3_: cc.Vec3, point2V3_: cc.Vec3, point3V3_: cc.Vec3, point4V3_: cc.Vec3) { + // 基本样条线插值算法 + // 弹性 + let sN = 0.5; + // 计算三次样条线函数系数 + let bV3 = pointV3_ + .clone() + .multiplyScalar(-sN) + .add(point2V3_.clone().multiplyScalar(2 - sN)) + .add(point3V3_.clone().multiplyScalar(sN - 2)) + .add(point4V3_.clone().multiplyScalar(sN)); + let b2V3 = pointV3_ + .clone() + .multiplyScalar(2 * sN) + .add(point2V3_.clone().multiplyScalar(sN - 3)) + .add(point3V3_.clone().multiplyScalar(3 - 2 * sN)) + .add(point4V3_.clone().multiplyScalar(-sN)); + let b3V3 = pointV3_.clone().multiplyScalar(-sN).add(point3V3_.clone().multiplyScalar(sN)); + let b4V3 = point2V3_; + + // 函数曲线 + function fx(xN: number) { + return bV3 + .clone() + .multiplyScalar(Math.pow(xN, 3)) + .add(b2V3.clone().multiplyScalar(Math.pow(xN, 2))) + .add(b3V3.clone().multiplyScalar(xN)) + .add(b4V3.clone()); + } + // 曲线长度变化率,用于匀速曲线运动 + function ds(xN: number) { + let derV3 = bV3 + .clone() + .multiplyScalar(3 * Math.pow(xN, 2)) + .add(b2V3.clone().multiplyScalar(2 * xN)) + .add(b3V3.clone()); + return Math.sqrt(Math.pow(derV3.x, 2) + Math.pow(derV3.y, 2) + Math.pow(derV3.z, 2)); + } + return [fx, ds]; + } + + /** + * 获取曲线上某点的位置 + * @param posN_ min: 0, max: 1 + */ + point(posN_: number): cc.Vec3 | null { + let posN = posN_; + if (this._pointV3S.length < 2) { + return null; + } + + if (posN < 0 || posN > 1) { + posN = posN < 0 ? 0 : 1; + } + + // 首个和最后点直接返回 + if (posN === 0) { + return this._pointV3S[0]; + } else if (posN === 1) { + return this._pointV3S[this._pointV3S.length - 1]; + } + + let resultV3 = cc.v3(); + let indexN = this._pointV3S.length - 1; + this._pointV3S.forEach((v, kS) => { + if (!kS) { + resultV3.x += v.x * Math.pow(1 - posN, indexN - kS) * Math.pow(posN, kS); + resultV3.y += v.y * Math.pow(1 - posN, indexN - kS) * Math.pow(posN, kS); + resultV3.z += v.z * Math.pow(1 - posN, indexN - kS) * Math.pow(posN, kS); + } else { + resultV3.x += + (this._factorial(indexN) / this._factorial(kS) / this._factorial(indexN - kS)) * + v.x * + Math.pow(1 - posN, indexN - kS) * + Math.pow(posN, kS); + resultV3.y += + (this._factorial(indexN) / this._factorial(kS) / this._factorial(indexN - kS)) * + v.y * + Math.pow(1 - posN, indexN - kS) * + Math.pow(posN, kS); + resultV3.z += + (this._factorial(indexN) / this._factorial(kS) / this._factorial(indexN - kS)) * + v.z * + Math.pow(1 - posN, indexN - kS) * + Math.pow(posN, kS); + } + }); + return resultV3; + } + + /** 匀速点 */ + uniformPoint(posN_: number): cc.Vec3 | null { + let posN = posN_; + if (this._pointV3S.length < 2) { + return null; + } + + if (posN < 0 || posN > 1) { + posN = posN < 0 ? 0 : 1; + } + + // 首个和最后点直接返回 + if (posN === 0) { + return this._pointV3S[0]; + } else if (posN === 1) { + return this._pointV3S[this._pointV3S.length - 1]; + } + + // 平均距离 + let averDistN = posN * this._distanceNS[this._pointV3S.length - 2]; + let indexN = 0; + let beyondN = 0; + let percentN = 0; + for (let kN = 0; kN < this._pointV3S.length - 1; kN++) { + if (averDistN < this._distanceNS[kN]) { + let preDis = kN === 0 ? 0 : this._distanceNS[kN - 1]; + indexN = kN; + beyondN = averDistN - preDis; + percentN = beyondN / (this._distanceNS[kN] - preDis); + break; + } + } + // 牛顿切线法求根 + let aN = percentN; + let bN: number; + // 最多迭代6次 + for (let i = 0; i < 6; i++) { + let actualLen = this._gaussLegendre(this._funcFSS[indexN][1] as any, 0, aN); + bN = aN - (actualLen - beyondN) / this._funcFSS[indexN][1](aN); + if (Math.abs(aN - bN) < 0.0001) { + break; + } + aN = bN; + } + percentN = bN; + return this._funcFSS[indexN][0](percentN); + } +} + +export default BezierCurve; diff --git a/assets/BezierCurve.ts.meta b/assets/BezierCurve.ts.meta new file mode 100644 index 0000000..2b5030d --- /dev/null +++ b/assets/BezierCurve.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.22", + "importer": "typescript", + "imported": true, + "uuid": "c34af995-9c5c-4522-a007-1bc0d11fec95", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/BezierCurveAnimation.ts b/assets/BezierCurveAnimation.ts new file mode 100644 index 0000000..874ea06 --- /dev/null +++ b/assets/BezierCurveAnimation.ts @@ -0,0 +1,140 @@ +import { _decorator, Component, Node } from 'cc'; +import * as cc from 'cc'; +import { EDITOR } from 'cc/env'; +import BezierCurve from './BezierCurve'; +const { ccclass, property } = _decorator; + +/** 缓动枚举 */ +let easingEnum = {}; +{ + let tempN = 0; + for (let kS in cc.easing) { + easingEnum[kS] = tempN; + easingEnum[tempN] = kS; + tempN++; + } +} + +/** 缓动单元 */ +@ccclass('BezierCurveAnimationTweenUnit') +class BezierCurveAnimationTweenUnit { + /* --------------- 属性 --------------- */ + /** 自定义缓动曲线 */ + @property({ displayName: '自定义缓动曲线' }) + customCurveB = false; + + /** 缓动曲线 */ + @property({ + displayName: '缓动曲线', + type: cc.Enum(easingEnum), + visible: function (this: BezierCurveAnimationTweenUnit) { + return !this.customCurveB; + } + }) + easing = 0; + + /** 缓动控制点 */ + @property({ + displayName: '控制点', + type: [cc.Vec3], + visible: function (this: BezierCurveAnimationTweenUnit) { + return this.customCurveB; + } + }) + controlPointV3S: cc.Vec3[] = []; + + /** 时间(秒) */ + @property({ displayName: '时间(秒)' }) + timeSN = 0; +} + +/** 贝塞尔曲线通用动画组件 */ +@ccclass('BezierCurveAnimation') +export class BezierCurveAnimation extends Component { + /* --------------- 属性 --------------- */ + /** 缓动单元 */ + @property({ displayName: '缓动单元', type: [BezierCurveAnimationTweenUnit] }) + tweenUnitAs: BezierCurveAnimationTweenUnit[] = []; + + /** 缓动切换事件 */ + @property({ displayName: '缓动切换事件', tooltip: '(当前缓动下标_indexN)', type: cc.EventHandler }) + tweenSwitchEvent = new cc.EventHandler(); + + /** 更新事件 */ + @property({ displayName: '更新事件', tooltip: '(曲线Y_yN)', type: cc.EventHandler }) + updateEvent = new cc.EventHandler(); + + /** 结束事件 */ + @property({ displayName: '结束事件', type: cc.EventHandler }) + endEvent = new cc.EventHandler(); + /* --------------- private --------------- */ + /* ------------------------------- segmentation ------------------------------- */ + /** 开始缓动 */ + startTween(): cc.Tween { + /** 总时间(秒) */ + let totalTimeSN = this.tweenUnitAs.reduce((preValue, currValue) => preValue + currValue.timeSN, 0); + /** 时间占比 */ + let timeRatioNs: number[] = []; + { + let currN = 0; + this.tweenUnitAs.forEach((v, kN) => { + let ratioN = v.timeSN / totalTimeSN; + currN += ratioN; + timeRatioNs.push(currN); + }); + } + /** 曲线函数 */ + let curveFS = this.tweenUnitAs.map((v) => { + if (v.customCurveB) { + let curve = new BezierCurve(v.controlPointV3S); + return curve.point.bind(curve) as (kN: number) => number; + } else { + return cc.easing[easingEnum[v.easing]].bind(cc.easing) as (kN: number) => number; + } + }); + /** 上次缓动下标 */ + let lastTweenIndexN = 0; + /** 缓动对象 */ + let tweenTarget = { valueN: 0 }; + /** 缓动 */ + let tween = cc + .tween(tweenTarget) + .to( + totalTimeSN, + { + valueN: 1 + }, + { + onUpdate: (target: typeof tweenTarget, ratioN: number) => { + /** 当前缓动下标 */ + let tweenIndexN = timeRatioNs.findIndex((vN) => ratioN <= vN); + if (tweenIndexN === -1) { + return; + } + /** 上个时间占比 */ + let lastTimeRatioN = tweenIndexN ? timeRatioNs[tweenIndexN - 1] : 0; + /** 当前时间范围 */ + let timeRangeN = timeRatioNs[tweenIndexN] - lastTimeRatioN; + /** 曲线位置 */ + let posN = (ratioN - lastTimeRatioN) / timeRangeN; + /** 曲线位置 */ + let yN = curveFS[tweenIndexN](posN) * timeRangeN + lastTimeRatioN; + // 缓动切换事件触发 + if (lastTweenIndexN !== tweenIndexN) { + this.tweenSwitchEvent?.emit([lastTweenIndexN]); + } + // 更新事件触发 + this.updateEvent?.emit([yN]); + // 更新缓动下标 + lastTweenIndexN = tweenIndexN; + } + } + ) + .call(() => { + // 结束事件触发 + this.endEvent?.emit([]); + }) + .start(); + return tween; + } +} diff --git a/assets/BezierCurveAnimation.ts.meta b/assets/BezierCurveAnimation.ts.meta new file mode 100644 index 0000000..e01990e --- /dev/null +++ b/assets/BezierCurveAnimation.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.22", + "importer": "typescript", + "imported": true, + "uuid": "5f284aba-f716-4ed7-90d6-b6bca57731e5", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/RollingLottery.ts b/assets/RollingLottery.ts new file mode 100644 index 0000000..f25e574 --- /dev/null +++ b/assets/RollingLottery.ts @@ -0,0 +1,193 @@ +import { _decorator, Component, Node } from 'cc'; +import * as cc from 'cc'; +import { BezierCurveAnimation } from './BezierCurveAnimation'; +const { ccclass, property, requireComponent } = _decorator; + +/** 旋转抽奖方向 */ +export enum RollingLotteryDirection { + /** 竖 */ + VERTICAL, + /** 横 */ + HORIZONTAL +} + +/** 循环滚动抽奖 */ +@ccclass('RollingLottery') +@requireComponent(BezierCurveAnimation) +@requireComponent(cc.Layout) +export class RollingLottery extends Component { + /* --------------- 属性 --------------- */ + /** 滚动方向 */ + @property({ displayName: '滚动方向', type: cc.Enum(RollingLotteryDirection) }) + dire = RollingLotteryDirection.VERTICAL; + + /** 子节点刷新事件 */ + @property({ displayName: '子节点刷新事件', tooltip: '(子节点_node, 下标_indexN)', type: cc.EventHandler }) + itemUpdateEvent = new cc.EventHandler(); + /* --------------- private --------------- */ + /** 曲线组件 */ + private _curveComp: BezierCurveAnimation; + /** transform 组件 */ + private _uiTransform: cc.UITransform; + /** 周长 */ + private _perimeterN: number; + /** 当前距离 */ + private _currDistN = 0; + /** 总距离 */ + private _totalDistN: number; + /** 当前下标 */ + private _currIndexN: number; + /** 子节点大小 */ + private _ItemSize: cc.Size; + /** 运动状态 */ + private _scrollB = false; + /* --------------- 临时变量 --------------- */ + private _tempM4 = cc.mat4(); + private _temp2M4 = cc.mat4(); + /* ------------------------------- 生命周期 ------------------------------- */ + onLoad() { + this._initData(); + this._initView(); + this._initEvent(); + } + /* ------------------------------- 功能 ------------------------------- */ + /** 获取格子移动后距离 */ + private _getItemMovePos(currIndexN_: number, targetIndexN_: number): void { + /** 格子距离 */ + let boxDistN = this.dire === RollingLotteryDirection.HORIZONTAL ? this._ItemSize.width : this._ItemSize.height; + /** 移动距离 */ + let moveDistN = (targetIndexN_ - currIndexN_) * boxDistN; + /** 圈数 */ + let circleN = Math.floor(moveDistN / this._perimeterN); + /** 额外移动距离 */ + let extraMoveDistN = moveDistN - circleN * this._perimeterN; + } + + /** 获取在世界坐标系下的节点包围盒(不包含自身激活的子节点范围) */ + private _getBoundingBoxToWorld(node_: cc.Node): cc.Rect { + node_.getWorldMatrix(this._temp2M4); + cc.Mat4.fromRTS(this._tempM4, this.node.getRotation(), this.node.getPosition(), this.node.getScale()); + let width = this._uiTransform.contentSize.width; + let height = this._uiTransform.contentSize.height; + let rect = new cc.Rect( + -this._uiTransform.anchorPoint.x * width, + -this._uiTransform.anchorPoint.y * height, + width, + height + ); + cc.Mat4.multiply(this._temp2M4, this._temp2M4, this._tempM4); + rect.transformMat4(this._temp2M4); + return rect; + } + + /** 检测参数节点是否与当前节点碰撞 */ + private _checkCollision(node_: cc.Node): boolean { + let rect = this._getBoundingBoxToWorld(this.node); + let rect2 = this._getBoundingBoxToWorld(node_); + // 增加保险范围 + rect.width += rect.width * 0.5; + rect.height += rect.height * 0.5; + rect.x -= rect.width * 0.25; + rect.y -= rect.height * 0.25; + return rect.intersects(rect2); + } + + /** 更新运动距离 */ + private _updateMoveDist(indexN_: number): void { + /** 间隔格子 */ + let intervalN = indexN_ - this._currIndexN; + /** 格子距离 */ + let boxDistN = this.dire === RollingLotteryDirection.HORIZONTAL ? this._ItemSize.width : this._ItemSize.height; + /** 超出当前格子距离 */ + let overDistN = this._currDistN - boxDistN * this._currIndexN; + // 设置总距离 + this._totalDistN = intervalN * boxDistN - overDistN; + } + + /** 更新数据 */ + private _updateData(): void { + // 单圈长度 + this._perimeterN = 0; + this.node.children.forEach((v1) => { + this._perimeterN += v1.getComponent(cc.UITransform).height; + }); + // 重置距离 + this._currDistN = 0; + } + + /** 初始化数据 */ + private _initData(): void { + this._curveComp = this.node.getComponent(BezierCurveAnimation); + this._uiTransform = this.node.getComponent(cc.UITransform); + this._ItemSize = this.node.children[0].getComponent(cc.UITransform).contentSize.clone(); + + // 设置更新事件 + this._curveComp.updateEvent.component = cc.js.getClassName(this); + this._curveComp.updateEvent.handler = 'updateEvent'; + + // 设置结束事件 + this._curveComp.endEvent.component = cc.js.getClassName(this); + this._curveComp.endEvent.handler = 'updateEvent'; + + // 更新当前距离 + { + let distV3 = this.node.worldPosition.clone().subtract(this.node.children[0].worldPosition); + this._currDistN = this.dire === RollingLotteryDirection.HORIZONTAL ? distV3.x : distV3.y; + } + + this._updateData(); + } + + /** 初始化视图 */ + private _initView(): void { + this.scroll(0); + } + + /** 初始化事件 */ + private _initEvent(): void { + this.node.on(cc.Node.EventType.SIBLING_ORDER_CHANGED, this._nodeSiblingOrderChanged, this); + } + + /** + * 循环滚动 + * @param speedN_ 速度 + * @param timeSN_ 时间(秒),不填则一直滚动 + */ + loop(speedN_: number, timeSN_?: number): void {} + + /** 滚动到指定下标 */ + scroll(indexN_: number, timeSN_?: number): void { + this._scrollB = true; + this._updateMoveDist(indexN_); + + /** 移动距离 */ + let moveDistN = this._totalDistN - this._currDistN; + + // 直接跳转 + if (!timeSN_) { + /** 圈数 */ + let circleN = Math.floor(moveDistN / this._perimeterN); + /** 额外移动距离 */ + let extraMoveDistN = moveDistN - circleN * this._perimeterN; + } + } + /* ------------------------------- 自定义事件 ------------------------------- */ + tweenSwitchEvent(indexN_: number): void { + // cc.log('缓动切换', indexN_); + } + updateEvent(yN_: number): void { + // cc.log('缓动更新', yN_); + } + endEvent(): void { + // cc.log('缓动结束'); + } + + /** 子节点更新 */ + childUpdate(node_: cc.Node, indexN_: number): void { + node_.getComponentInChildren(cc.Label).string = indexN_ + ''; + } + /* ------------------------------- 节点事件 ------------------------------- */ + private _nodeSiblingOrderChanged(): void { + this._updateData(); + } +} diff --git a/assets/RollingLottery.ts.meta b/assets/RollingLottery.ts.meta new file mode 100644 index 0000000..a3f47fd --- /dev/null +++ b/assets/RollingLottery.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.22", + "importer": "typescript", + "imported": true, + "uuid": "b1f6263d-6e67-4833-9b0d-bd379c66031d", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/main.scene b/assets/main.scene new file mode 100644 index 0000000..df1e19a --- /dev/null +++ b/assets/main.scene @@ -0,0 +1,2421 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_name": "main", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 4 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "autoReleaseAssets": false, + "_globals": { + "__id__": 71 + }, + "_id": "4c7c011d-1dee-494d-b761-aa723a3a84c7" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -10, + "y": 10, + "z": 10 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": -0.27781593799591064, + "y": -0.36497166752815247, + "z": -0.11507512629032135, + "w": 0.8811195492744446 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": -35, + "y": -45, + "z": 0 + }, + "_id": "c9DMICJLFO5IeO07EPon7U" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_projection": 1, + "_priority": 0, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 10, + "_near": 1, + "_far": 1000, + "_color": { + "__type__": "cc.Color", + "r": 51, + "g": 51, + "b": 51, + "a": 255 + }, + "_depth": 1, + "_stencil": 0, + "_clearFlags": 7, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_aperture": 19, + "_shutter": 7, + "_iso": 0, + "_screenScale": 1, + "_visibility": 1822425087, + "_targetTexture": null, + "_id": "7dWQTpwS5LrIHnc1zAPUtf" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 5 + }, + { + "__id__": 7 + }, + { + "__id__": 11 + } + ], + "_active": true, + "_components": [ + { + "__id__": 68 + }, + { + "__id__": 69 + }, + { + "__id__": 70 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 480, + "y": 320, + "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": "82h3SyZ05MRY9AIHDH2mjL" + }, + { + "__type__": "cc.Node", + "_name": "Camera", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 1000 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "1f/nAWJapNwIoJpaZPPJ7c" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_projection": 0, + "_priority": 1073741824, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 320, + "_near": 1, + "_far": 2000, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": 1, + "_stencil": 0, + "_clearFlags": 6, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_aperture": 19, + "_shutter": 7, + "_iso": 0, + "_screenScale": 1, + "_visibility": 41943040, + "_targetTexture": null, + "_id": "7emvgUQFFAsaNLX1pVLfaZ" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 9 + }, + { + "__id__": 10 + } + ], + "_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": "90Nv8y39xH86HKgsgA37uD" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "1eowVgxFdLRZ9jqDrlAeR4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "__prefab": null, + "_visFlags": 0, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 87, + "g": 87, + "b": 87, + "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": "b5n6PJOZRG9IGf8iTayAqY" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_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": "62rGtodNJKgZiKicrXt0fJ" + }, + { + "__type__": "cc.Node", + "_name": "layout", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [ + { + "__id__": 12 + }, + { + "__id__": 21 + }, + { + "__id__": 30 + }, + { + "__id__": 39 + }, + { + "__id__": 48 + } + ], + "_active": true, + "_components": [ + { + "__id__": 57 + }, + { + "__id__": 58 + }, + { + "__id__": 64 + }, + { + "__id__": 66 + }, + { + "__id__": 67 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 99.36000000000001, + "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": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "9f2rmpHwJO9pb//IgG6cYk" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [ + { + "__id__": 13 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 19 + }, + { + "__id__": 20 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -50, + "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": "42HZx3oyNJSLCnkF1uwHLZ" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash", + "_objFlags": 0, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__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": "28d20C3T5NoJefW6MOgrMl" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "f39lo0anhGlaL/1YAnLe7k" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_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": "e9eaPu/xhIBqcc01zfUYNU" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 18 + } + ], + "_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": "d9Re+HRSpFabVMmP1xR5CY" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_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": "a7CEv4sEBC+7lkGVX+c0IB" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_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": "80+pN6bORN0rlKy5z4xbMb" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "57fn6JufpM4a0gZ9ZvW88v" + }, + { + "__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": 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": "cfvOCOJaJFNpnGQM94AeFX" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash-001", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [ + { + "__id__": 22 + }, + { + "__id__": 25 + } + ], + "_active": true, + "_components": [ + { + "__id__": 28 + }, + { + "__id__": 29 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -150, + "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": "6bRCT3D0hG+r+Cf6d09u3q" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 23 + }, + { + "__id__": 24 + } + ], + "_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": "7cOS7BczRP56SFaNyoTqoR" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "287CueYJFO7KCS+R19MVbK" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_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": "59VrRVM2lH2rLn5C/r6ZLJ" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 26 + }, + { + "__id__": 27 + } + ], + "_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": "43SLzlBlFJ0rZYi27LDDXe" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_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": "00ED3HVGJB/YlnzO+TaiUG" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_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": "b2bw5EC1xKtZP28ibp/K3h" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "30OYQayV9EpKvuvUqs8PyN" + }, + { + "__type__": "cc.Sprite", + "_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 + }, + "_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": "04HMRoh0FFi4LrR2l70F/A" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash-002", + "_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": -250, + "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": "7cGeyK9VdG17KKHPS/xt5l" + }, + { + "__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": "01FCJ8aKtE2q6fEdLOxGqJ" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__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": "c39ye6X7xPmbGmmp2VcC4G" + }, + { + "__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": "6cihIhAm5At7eAFAgZ8FIU" + }, + { + "__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": "6bBN0Rr61CjKIJ47nAVT7V" + }, + { + "__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": "ceKPgFCxdDQbjgGMNiPlIg" + }, + { + "__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": "d0YMk5bZ9NLJ4B3kCjT1Ha" + }, + { + "__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": "aejvMEYYJBqK79b99cwasJ" + }, + { + "__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": 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": "3dwnmAKRVL2qQfB/Uw6Nt3" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash-003", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [ + { + "__id__": 40 + }, + { + "__id__": 43 + } + ], + "_active": true, + "_components": [ + { + "__id__": 46 + }, + { + "__id__": 47 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -350, + "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": "d1+PIJzylEwqzwUbX7zUOl" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash", + "_objFlags": 0, + "_parent": { + "__id__": 39 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 41 + }, + { + "__id__": 42 + } + ], + "_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": "cec/bi6dtGVLua2x95w4yu" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 40 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "b76p3pyCNIzpyVL6k72Pj4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 40 + }, + "_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": "adz8UBLIFFH7f7aEhGjwcp" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "_parent": { + "__id__": 39 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 44 + }, + { + "__id__": 45 + } + ], + "_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": "3bjbSckJRDFYP/Lwahpl4A" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 43 + }, + "_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": "edPBFGJw1PJ6/vM9xRTMhu" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 43 + }, + "_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": "1aAM1t5QlCkrhwpogSYfI+" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 39 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "68wJpQo9lAdrWnY7ufsWqk" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 39 + }, + "_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": "a8L0McVxFPr6ehrB4rfLlV" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash-004", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [ + { + "__id__": 49 + }, + { + "__id__": 52 + } + ], + "_active": true, + "_components": [ + { + "__id__": 55 + }, + { + "__id__": 56 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -450, + "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": "f1dIBKK6BG07Wu8P7j7u9C" + }, + { + "__type__": "cc.Node", + "_name": "SpriteSplash", + "_objFlags": 0, + "_parent": { + "__id__": 48 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 50 + }, + { + "__id__": 51 + } + ], + "_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": "d1H2tBYVxNnpGFFjUML6zU" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 49 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "3fSsTjwfJKzYQ9N0V0G/Bv" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 49 + }, + "_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": "49xwUS9B1ESJ7ZKe/+afEE" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "_parent": { + "__id__": 48 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 53 + }, + { + "__id__": 54 + } + ], + "_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": "08+nV/zglKuIbVlpM7bD6B" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 52 + }, + "_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": "6ayVnWDaBPypqFoydSiQOn" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 52 + }, + "_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": "e1psflDN9OxJ2CPlv7uAa2" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 48 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "a9jNDV16hHNIVeDdIvBdq7" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 48 + }, + "_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": "daTJi3o/pCUYN9RJp9bsew" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 256.476 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_id": "9fs2LtAVpCp5TjQTZw4vIz" + }, + { + "__type__": "5f284q69xZO15DWtryldzHl", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": null, + "tweenUnitAs": [ + { + "__id__": 59 + }, + { + "__id__": 60 + } + ], + "tweenSwitchEvent": { + "__id__": 61 + }, + "updateEvent": { + "__id__": 62 + }, + "endEvent": { + "__id__": 63 + }, + "_id": "9c6f08OTNIPp0wjHNYQUiR" + }, + { + "__type__": "BezierCurveAnimationTweenUnit", + "customCurveB": false, + "easing": 12, + "controlPointV3S": [], + "timeSN": 1 + }, + { + "__type__": "BezierCurveAnimationTweenUnit", + "customCurveB": false, + "easing": 3, + "controlPointV3S": [], + "timeSN": 2 + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 11 + }, + "component": "", + "_componentId": "b1f62Y9bmdIM5sNvTecZgMd", + "handler": "tweenSwitchEvent", + "customEventData": "" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 11 + }, + "component": "", + "_componentId": "b1f62Y9bmdIM5sNvTecZgMd", + "handler": "updateEvent", + "customEventData": "" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 11 + }, + "component": "", + "_componentId": "b1f62Y9bmdIM5sNvTecZgMd", + "handler": "endEvent", + "customEventData": "" + }, + { + "__type__": "b1f62Y9bmdIM5sNvTecZgMd", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": null, + "dire": 0, + "itemUpdateEvent": { + "__id__": 65 + }, + "_id": "68bNGVa6ZIZo6AAJTDDcrJ" + }, + { + "__type__": "cc.ClickEvent", + "target": null, + "component": "", + "_componentId": "", + "handler": "", + "customEventData": "" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": false, + "__prefab": null, + "_resizeMode": 1, + "_layoutType": 2, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 0, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "feOoxIfVJPeKulp53PItCb" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": null, + "_visFlags": 0, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_type": 0, + "_inverted": false, + "_segments": 64, + "_spriteFrame": null, + "_alphaThreshold": 0.1, + "_id": "92UqxXjCdFPqPXjq+4LRy/" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "08y9hUKhhG3asHG4meXJzC" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": null, + "_cameraComponent": { + "__id__": 6 + }, + "_alignCanvasWithScreen": true, + "_id": "01PhzYO+1Ga5Ax8fKmN8ge" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_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": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "86y8GUj85EoaxJ3AmNeIZk" + }, + { + "__type__": "cc.SceneGlobals", + "ambient": { + "__id__": 72 + }, + "shadows": { + "__id__": 73 + }, + "_skybox": { + "__id__": 74 + }, + "fog": { + "__id__": 75 + } + }, + { + "__type__": "cc.AmbientInfo", + "_skyColor": { + "__type__": "cc.Color", + "r": 51, + "g": 128, + "b": 204, + "a": 1 + }, + "_skyIllum": 20000, + "_groundAlbedo": { + "__type__": "cc.Color", + "r": 51, + "g": 51, + "b": 51, + "a": 255 + } + }, + { + "__type__": "cc.ShadowsInfo", + "_type": 0, + "_enabled": false, + "_normal": { + "__type__": "cc.Vec3", + "x": 0, + "y": 1, + "z": 0 + }, + "_distance": 0, + "_shadowColor": { + "__type__": "cc.Color", + "r": 76, + "g": 76, + "b": 76, + "a": 255 + }, + "_fixedArea": false, + "_pcf": 0, + "_bias": 0.00001, + "_normalBias": 0, + "_near": 1, + "_far": 30, + "_shadowDistance": 100, + "_invisibleOcclusionRange": 200, + "_orthoSize": 5, + "_maxReceived": 4, + "_size": { + "__type__": "cc.Vec2", + "x": 512, + "y": 512 + }, + "_saturation": 0.75 + }, + { + "__type__": "cc.SkyboxInfo", + "_envmap": null, + "_isRGBE": false, + "_enabled": false, + "_useIBL": false + }, + { + "__type__": "cc.FogInfo", + "_type": 0, + "_fogColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "_enabled": false, + "_fogDensity": 0.3, + "_fogStart": 0.5, + "_fogEnd": 300, + "_fogAtten": 5, + "_fogTop": 1.5, + "_fogRange": 1.2 + } +] \ No newline at end of file diff --git a/assets/main.scene.meta b/assets/main.scene.meta new file mode 100644 index 0000000..9ae92f9 --- /dev/null +++ b/assets/main.scene.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.1.32", + "importer": "scene", + "imported": true, + "uuid": "4c7c011d-1dee-494d-b761-aa723a3a84c7", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..64f21aa --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "name": "mk_bezier_animation", + "type": "3d", + "uuid": "a40d3209-184c-4665-ab62-fdc2a899ca69", + "version": "3.3.2", + "creator": { + "version": "3.3.2" + } +} diff --git a/settings/v2/packages/cocos-service.json b/settings/v2/packages/cocos-service.json new file mode 100644 index 0000000..e84cca3 --- /dev/null +++ b/settings/v2/packages/cocos-service.json @@ -0,0 +1,22 @@ +{ + "game": { + "name": "未知游戏", + "app_id": "UNKNOW", + "c_id": "0" + }, + "appConfigMaps": [ + { + "app_id": "UNKNOW", + "config_id": "82a98c" + } + ], + "configs": [ + { + "app_id": "UNKNOW", + "config_id": "82a98c", + "config_name": "Default", + "config_remarks": "", + "services": [] + } + ] +} diff --git a/settings/v2/packages/device.json b/settings/v2/packages/device.json new file mode 100644 index 0000000..70e599e --- /dev/null +++ b/settings/v2/packages/device.json @@ -0,0 +1,3 @@ +{ + "__version__": "1.0.1" +} diff --git a/settings/v2/packages/engine.json b/settings/v2/packages/engine.json new file mode 100644 index 0000000..18438cb --- /dev/null +++ b/settings/v2/packages/engine.json @@ -0,0 +1,114 @@ +{ + "__version__": "1.0.5", + "modules": { + "cache": { + "base": { + "_value": true + }, + "graphcis": { + "_value": true + }, + "gfx-webgl": { + "_value": true + }, + "gfx-webgl2": { + "_value": false + }, + "3d": { + "_value": false + }, + "2d": { + "_value": true + }, + "ui": { + "_value": true + }, + "particle": { + "_value": false + }, + "physics": { + "_value": false, + "_option": "physics-ammo" + }, + "physics-ammo": { + "_value": false + }, + "physics-cannon": { + "_value": false + }, + "physics-physx": { + "_value": false + }, + "physics-builtin": { + "_value": false + }, + "physics-2d": { + "_value": true, + "_option": "physics-2d-box2d" + }, + "physics-2d-box2d": { + "_value": false + }, + "physics-2d-builtin": { + "_value": false + }, + "intersection-2d": { + "_value": true + }, + "primitive": { + "_value": false + }, + "profiler": { + "_value": true + }, + "particle-2d": { + "_value": true + }, + "audio": { + "_value": true + }, + "video": { + "_value": true + }, + "webview": { + "_value": true + }, + "tween": { + "_value": true + }, + "terrain": { + "_value": false + }, + "tiled-map": { + "_value": true + }, + "spine": { + "_value": true + }, + "dragon-bones": { + "_value": true + } + }, + "includeModules": [ + "base", + "gfx-webgl", + "2d", + "ui", + "physics-2d-box2d", + "intersection-2d", + "profiler", + "particle-2d", + "audio", + "video", + "webview", + "tween", + "tiled-map", + "spine", + "dragon-bones" + ], + "noDeprecatedFeatures": { + "value": false, + "version": "" + } + } +} diff --git a/settings/v2/packages/program.json b/settings/v2/packages/program.json new file mode 100644 index 0000000..4d87e97 --- /dev/null +++ b/settings/v2/packages/program.json @@ -0,0 +1,3 @@ +{ + "__version__": "1.0.0" +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..7dc649a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,9 @@ +{ + /* Base configuration. Do not edit this field. */ + "extends": "./temp/tsconfig.cocos.json", + + /* Add your custom configuration here. */ + "compilerOptions": { + "strict": false + } +}