From f8a2a40a357273f63e76490c52da524ab9defb4b Mon Sep 17 00:00:00 2001 From: "DESKTOP-J7I1C4E\\a9350" Date: Fri, 8 Mar 2024 15:54:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=B8=83=E5=B1=80=20?= =?UTF-8?q?=E5=88=9D=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/GlobalScript/Animation/BaseSprite.ts | 37 - assets/GlobalScript/Common/BaseButton.ts | 62 ++ assets/GlobalScript/Common/BaseSpriteByNpk.ts | 28 + assets/Prefab.meta | 9 + assets/Prefab/Present.prefab | 312 ++++++ assets/Prefab/Present.prefab.meta | 13 + assets/Script.meta | 9 + assets/Script/StartGameButton.ts | 54 + assets/Script/StartGameButton.ts.meta | 9 + assets/Script/StartGameRoot.ts | 17 + assets/Script/StartGameRoot.ts.meta | 9 + assets/scene/main.scene | 949 +++++++++++++++++- 12 files changed, 1457 insertions(+), 51 deletions(-) delete mode 100644 assets/GlobalScript/Animation/BaseSprite.ts create mode 100644 assets/GlobalScript/Common/BaseButton.ts create mode 100644 assets/GlobalScript/Common/BaseSpriteByNpk.ts create mode 100644 assets/Prefab.meta create mode 100644 assets/Prefab/Present.prefab create mode 100644 assets/Prefab/Present.prefab.meta create mode 100644 assets/Script.meta create mode 100644 assets/Script/StartGameButton.ts create mode 100644 assets/Script/StartGameButton.ts.meta create mode 100644 assets/Script/StartGameRoot.ts create mode 100644 assets/Script/StartGameRoot.ts.meta diff --git a/assets/GlobalScript/Animation/BaseSprite.ts b/assets/GlobalScript/Animation/BaseSprite.ts deleted file mode 100644 index 7c70ccb..0000000 --- a/assets/GlobalScript/Animation/BaseSprite.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { _decorator, Component, Node, Animation, Sprite, resources, SpriteFrame, CCString, CCInteger, Vec2 } from 'cc'; -import { MyAnimation } from './MyAnimation'; - -const { ccclass, property, requireComponent, executeInEditMode } = _decorator; - -@ccclass('BaseSprite') -@executeInEditMode -@requireComponent(Sprite)//依赖组件 精灵 -export default class BaseSprite extends MyAnimation { - - AnimationFrameCount: number = 1; - - @property({ type: CCString, displayName: '默认img路径', tooltip: "img路径" }) - DefaultImgPath: string = ""; - - ImgPath: string[] = ["", ""]; - - @property({ type: CCInteger, displayName: 'img编号', tooltip: "img编号" }) - GImgIndex = 0; - ImgIndex: number[] = [0, 1]; - - FrameDelay: Array = [0, 9999999999]; - - @property({ type: [CCInteger], displayName: '是否显示', tooltip: "1为显示 0为不显示" }) - PlayState = 0; - - onGImgIndexChanged() { - this.ImgIndex[0] = this.GImgIndex; - } - - start() { - this.onGImgIndexChanged(); - super.start(); - } -} - - diff --git a/assets/GlobalScript/Common/BaseButton.ts b/assets/GlobalScript/Common/BaseButton.ts new file mode 100644 index 0000000..34f7f4c --- /dev/null +++ b/assets/GlobalScript/Common/BaseButton.ts @@ -0,0 +1,62 @@ +// import { _decorator, Button, Component, EventMouse, Node, NodeEventType } from 'cc'; + +// const { ccclass, property } = _decorator; + +// @ccclass('BaseButton') +// export class BaseButton extends Component { + + +// //加载基础img +// Init(){ + +// } + + +// start() { +// this.Init(); +// this.node.on(Node.EventType.MOUSE_ENTER,this.mouseEnter,this); +// this.node.on(Node.EventType.MOUSE_LEAVE,this.mouseLeave,this); +// this.node.on(Node.EventType.MOUSE_UP,this.mouseUp,this); +// } + + +// mouseEnter(){ + +// const baseSprite = this.node.getComponent(BaseSprite); +// // baseSprite.GImgIndex = 2; +// // baseSprite.onGImgIndexChanged(); +// baseSprite.ImgIndex = [2,1]; + +// console.log('mouseEnter'); +// console.log('GImgIndex =' + baseSprite.GImgIndex); +// console.log(baseSprite); +// } + +// mouseLeave(){ + +// const baseSprite = this.node.getComponent(BaseSprite); +// // baseSprite.GImgIndex = 1; +// // baseSprite.onGImgIndexChanged(); +// baseSprite.ImgIndex = [1,1]; +// console.log('mouseLeave'); +// console.log('GImgIndex =' + baseSprite.GImgIndex); +// console.log(baseSprite); +// } + +// mouseUp(evetn: EventMouse){ +// if (evetn.getButton() == EventMouse.BUTTON_LEFT){ +// console.log('mouseUpLeft'); +// } + +// } + +// update(deltaTime: number) { + +// } + + + + +// } + + diff --git a/assets/GlobalScript/Common/BaseSpriteByNpk.ts b/assets/GlobalScript/Common/BaseSpriteByNpk.ts new file mode 100644 index 0000000..2b34fc8 --- /dev/null +++ b/assets/GlobalScript/Common/BaseSpriteByNpk.ts @@ -0,0 +1,28 @@ +import { _decorator, Component, Node, Animation, Sprite, resources, SpriteFrame, CCString, CCInteger, Vec2 } from 'cc'; + + +const { ccclass, property, requireComponent, executeInEditMode } = _decorator; + +@ccclass('BaseSpriteByNpk') +@executeInEditMode +@requireComponent(Sprite)//依赖组件 精灵 +export default class BaseSpriteByNpk extends Component { + + + @property({ type: CCString, displayName: 'img路径', tooltip: "img路径" }) + Path: string = ""; + + @property({ type: CCInteger, displayName: 'img编号', tooltip: "img编号" }) + ImgIndex = 0; + + start() { + + + } + + update(dt: number): void { + + } +} + + diff --git a/assets/Prefab.meta b/assets/Prefab.meta new file mode 100644 index 0000000..5604621 --- /dev/null +++ b/assets/Prefab.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "eaa1d08a-5e6f-4341-9f6a-8e27ed47b322", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Prefab/Present.prefab b/assets/Prefab/Present.prefab new file mode 100644 index 0000000..39a861e --- /dev/null +++ b/assets/Prefab/Present.prefab @@ -0,0 +1,312 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Present", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "Present", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 10 + }, + { + "__id__": 12 + } + ], + "_prefab": { + "__id__": 14 + }, + "_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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Present", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "aaL9wscpRMHJWY91pMRzIH" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "57520716-48c8-4a19-8acf-41c9f8777fb0@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a0XZDk+45J/K9kzpQ5IPPm" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "4bjGWkBElEr4BC16fDhe3Q", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "55UWXxjklAW4PediZ2wPj/" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 11 + }, + "_type": 0, + "_inverted": false, + "_segments": 64, + "_alphaThreshold": 0.1, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "be/874Wo5NBqs4VTuq2F30" + }, + { + "__type__": "cc.Graphics", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 13 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_lineWidth": 1, + "_strokeColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_lineJoin": 2, + "_lineCap": 0, + "_fillColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 0 + }, + "_miterLimit": 10, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "fbR4Tn7D1AD5Uiybsxn/Oq" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "78Ap+aUshFV4IYTsoXI+uF", + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/Prefab/Present.prefab.meta b/assets/Prefab/Present.prefab.meta new file mode 100644 index 0000000..43fefaa --- /dev/null +++ b/assets/Prefab/Present.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "aa2989f4-5378-4297-a889-49a957c3b47b", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Present" + } +} diff --git a/assets/Script.meta b/assets/Script.meta new file mode 100644 index 0000000..66e92df --- /dev/null +++ b/assets/Script.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "c48db437-e006-4733-98c9-041b5842c734", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Script/StartGameButton.ts b/assets/Script/StartGameButton.ts new file mode 100644 index 0000000..4e58831 --- /dev/null +++ b/assets/Script/StartGameButton.ts @@ -0,0 +1,54 @@ +// import { _decorator, Button, Component, EventMouse, Node, NodeEventType } from 'cc'; +// const { ccclass, property } = _decorator; + +// @ccclass('BaseButton') +// export class BaseButton extends Component { + + +// start() { +// this.node.on(Node.EventType.MOUSE_ENTER,this.mouseEnter,this); +// this.node.on(Node.EventType.MOUSE_LEAVE,this.mouseLeave,this); +// this.node.on(Node.EventType.MOUSE_UP,this.mouseUp,this); +// } + + +// mouseEnter(){ + +// const baseSprite = this.node.getComponent(BaseSprite); +// // baseSprite.GImgIndex = 2; +// // baseSprite.onGImgIndexChanged(); +// baseSprite.ImgIndex = [2,1]; + +// console.log('mouseEnter'); +// console.log('GImgIndex =' + baseSprite.GImgIndex); +// console.log(baseSprite); +// } + +// mouseLeave(){ + +// const baseSprite = this.node.getComponent(BaseSprite); +// // baseSprite.GImgIndex = 1; +// // baseSprite.onGImgIndexChanged(); +// baseSprite.ImgIndex = [1,1]; +// console.log('mouseLeave'); +// console.log('GImgIndex =' + baseSprite.GImgIndex); +// console.log(baseSprite); +// } + +// mouseUp(evetn: EventMouse){ +// if (evetn.getButton() == EventMouse.BUTTON_LEFT){ +// console.log('mouseUpLeft'); +// } + +// } + +// update(deltaTime: number) { + +// } + + + + +// } + + diff --git a/assets/Script/StartGameButton.ts.meta b/assets/Script/StartGameButton.ts.meta new file mode 100644 index 0000000..270a11c --- /dev/null +++ b/assets/Script/StartGameButton.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "45dea0b1-384d-43f7-a8ac-a58814cf17a3", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Script/StartGameRoot.ts b/assets/Script/StartGameRoot.ts new file mode 100644 index 0000000..7e9d6bd --- /dev/null +++ b/assets/Script/StartGameRoot.ts @@ -0,0 +1,17 @@ +import { _decorator, Component, Node } from 'cc'; +const { ccclass, property } = _decorator; + +@ccclass('StartGameRoot') +export class StartGameRoot extends Component { + + + start() { + + } + + update(deltaTime: number) { + + } +} + + diff --git a/assets/Script/StartGameRoot.ts.meta b/assets/Script/StartGameRoot.ts.meta new file mode 100644 index 0000000..46dab9c --- /dev/null +++ b/assets/Script/StartGameRoot.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "37227f6a-00a4-4840-a07e-025b6be2f27c", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scene/main.scene b/assets/scene/main.scene index 830bc94..68f12b7 100644 --- a/assets/scene/main.scene +++ b/assets/scene/main.scene @@ -23,7 +23,7 @@ "_active": true, "_components": [], "_prefab": { - "__id__": 17 + "__id__": 44 }, "_lpos": { "__type__": "cc.Vec3", @@ -54,7 +54,7 @@ }, "autoReleaseAssets": false, "_globals": { - "__id__": 18 + "__id__": 45 }, "_id": "f713b5ea-a70f-486c-8260-0338f089a5b8" }, @@ -77,13 +77,13 @@ "_active": true, "_components": [ { - "__id__": 14 + "__id__": 41 }, { - "__id__": 15 + "__id__": 42 }, { - "__id__": 16 + "__id__": 43 } ], "_prefab": null, @@ -175,7 +175,7 @@ "_priority": 0, "_fov": 45, "_fovAxis": 0, - "_orthoHeight": 346.1673212882954, + "_orthoHeight": 345.04285714285714, "_near": 0, "_far": 1000, "_color": { @@ -218,6 +218,9 @@ "_children": [ { "__id__": 6 + }, + { + "__id__": 14 } ], "_active": true, @@ -505,6 +508,924 @@ "PlayState": 1, "_id": "a27U1G+TROF7ArDt28B3wZ" }, + { + "__type__": "cc.Node", + "_name": "StartGameRoot", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 15 + }, + { + "__id__": 21 + }, + { + "__id__": 25 + }, + { + "__id__": 31 + }, + { + "__id__": 34 + } + ], + "_active": true, + "_components": [ + { + "__id__": 39 + }, + { + "__id__": 40 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 533, + "y": 300, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "f89kwtvehImpCyWHzLrUpY" + }, + { + "__type__": "cc.Node", + "_name": "Title", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 14 + }, + "_children": [ + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 20 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 20, + "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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "18ueNYG+lITaLZWxT+R644" + }, + { + "__type__": "cc.Node", + "_name": "Title", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 18 + }, + { + "__id__": 19 + } + ], + "_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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "28K4yFpddAmbUpUXjmh4HZ" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "94vaWEPfpEyJ+qrtGz+C9l" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 0, + "_fillType": 0, + "_sizeMode": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "d9lFDxtxVLOKXOFI5Fn6if" + }, + { + "__type__": "da8cbJJkjxC+qVdpm9/+8LT", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": null, + "AnimationPath": "ani/title_loop.ani", + "_id": "33Ib3vVfZP3rfCYcAgYksz" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 15 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "49zJMMiY1J0qiuLWIpaGxK" + }, + { + "__type__": "cc.Node", + "_name": "ButtonBackground", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + }, + { + "__id__": 23 + }, + { + "__id__": 24 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -533.5, + "y": 300, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "8b4cxvgzVH34lu9mSeCGB+" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "62vWifkQlPLqE4mwINAXM/" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 0, + "_fillType": 0, + "_sizeMode": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "e0/ZwnGkVL7bbmU6H8jnIX" + }, + { + "__type__": "9258d3QVRBC/L8BCziIBXzT", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": null, + "DefaultImgPath": "sprite/interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "GImgIndex": 24, + "PlayState": 1, + "_id": "b5PH4Yj91JwaoGNitfqvGl" + }, + { + "__type__": "cc.Node", + "_name": "StartGameButton", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 26 + }, + { + "__id__": 27 + }, + { + "__id__": 28 + }, + { + "__id__": 29 + }, + { + "__id__": 30 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -92, + "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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "68JO9KgzZBzaglXLAy5Qu4" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "2cFRkfzuxDZ7IwRpHkN6SQ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 1, + "_fillType": 0, + "_sizeMode": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "c2pCm9pjRJJ7j/VPe74xxb" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": null, + "clickEvents": [], + "_interactable": true, + "_transition": 2, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": null, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": { + "__id__": 25 + }, + "_id": "82Ln0THAtKkY7+6CUtpLEd" + }, + { + "__type__": "9258d3QVRBC/L8BCziIBXzT", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": null, + "DefaultImgPath": "sprite/interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "GImgIndex": 1, + "PlayState": 1, + "_id": "00SU+NlYFFmYyaZ+L3YaAE" + }, + { + "__type__": "45deaCxOE1D96ispYgUzxej", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": null, + "_id": "843jjChttPUY5MJ5eIrMuv" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 32 + }, + { + "__id__": 33 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -120, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "4dmkWjfxJDrJ4uMbYUahiW" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 31 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 14.254856981549944, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "e7bo4jd1dOUZ3rMF46qaNe" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 31 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 117, + "g": 177, + "b": 198, + "a": 255 + }, + "_string": "∞", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 28.8659793814433, + "_fontSize": 20, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "d1PqgzwiFGcJQNEBcO7YKd" + }, + { + "__type__": "cc.Node", + "_name": "PresentButton", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 35 + }, + { + "__id__": 36 + }, + { + "__id__": 37 + }, + { + "__id__": 38 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 490, + "y": 290, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "0d2fKL04ZMELzEUNGe6deW" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "82TanjcC9Lx6RtC+hnXvh/" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 0, + "_fillType": 0, + "_sizeMode": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "04PBUHNcJMwr+FmGsd0fhr" + }, + { + "__type__": "9258d3QVRBC/L8BCziIBXzT", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": null, + "DefaultImgPath": "sprite/interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "GImgIndex": 9, + "PlayState": 1, + "_id": "20sg3uXg1KhoLjZboOhqxz" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": null, + "clickEvents": [], + "_interactable": true, + "_transition": 0, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": null, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": null, + "_id": "cce2csLLhBI7Vy15ey0Flw" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 14 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "8b9Ekz0rhKQKKtAvJQ9mnJ" + }, + { + "__type__": "372279qAKRIQKB+Altr4vJ8", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 14 + }, + "_enabled": true, + "__prefab": null, + "_id": "1f5g72f3ZHyooqaoqTrMZZ" + }, { "__type__": "cc.UITransform", "_name": "", @@ -584,28 +1505,28 @@ { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 19 + "__id__": 46 }, "shadows": { - "__id__": 20 + "__id__": 47 }, "_skybox": { - "__id__": 21 + "__id__": 48 }, "fog": { - "__id__": 22 + "__id__": 49 }, "octree": { - "__id__": 23 + "__id__": 50 }, "skin": { - "__id__": 24 + "__id__": 51 }, "lightProbeInfo": { - "__id__": 25 + "__id__": 52 }, "postSettings": { - "__id__": 26 + "__id__": 53 }, "bakedWithStationaryMainLight": false, "bakedWithHighpLightmap": false From d6d05bfccbb53f21b731b5bce24a57eb6b289aba Mon Sep 17 00:00:00 2001 From: "DESKTOP-J7I1C4E\\a9350" Date: Fri, 8 Mar 2024 18:29:39 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=A6=96=E9=A1=B5=20=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E6=B8=B8=E6=88=8F=20=E5=92=8C=20=E6=B8=B8=E6=88=8F=E4=BB=8B?= =?UTF-8?q?=E7=BB=8D=20=E7=95=8C=E9=9D=A2=E5=88=9D=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/GlobalScript/Common/BaseButton.ts | 62 ---- assets/GlobalScript/Common/BaseSpriteByNpk.ts | 28 -- .../CommonComponent/ButtonDown.ts | 36 +++ .../CommonComponent/ButtonDown.ts.meta} | 2 +- assets/Prefab/Present.prefab | 293 ++++++++++++++++-- assets/Prefab/Present.prefab.meta | 2 +- assets/Script/Pressent.ts | 23 ++ assets/Script/Pressent.ts.meta | 9 + assets/Script/StartGameButton.ts | 54 ---- assets/Script/StartGameRoot.ts | 11 +- assets/scene/main.scene | 107 ++++--- 11 files changed, 408 insertions(+), 219 deletions(-) delete mode 100644 assets/GlobalScript/Common/BaseButton.ts delete mode 100644 assets/GlobalScript/Common/BaseSpriteByNpk.ts create mode 100644 assets/GlobalScript/CommonComponent/ButtonDown.ts rename assets/{Script/StartGameButton.ts.meta => GlobalScript/CommonComponent/ButtonDown.ts.meta} (70%) create mode 100644 assets/Script/Pressent.ts create mode 100644 assets/Script/Pressent.ts.meta delete mode 100644 assets/Script/StartGameButton.ts diff --git a/assets/GlobalScript/Common/BaseButton.ts b/assets/GlobalScript/Common/BaseButton.ts deleted file mode 100644 index 34f7f4c..0000000 --- a/assets/GlobalScript/Common/BaseButton.ts +++ /dev/null @@ -1,62 +0,0 @@ -// import { _decorator, Button, Component, EventMouse, Node, NodeEventType } from 'cc'; - -// const { ccclass, property } = _decorator; - -// @ccclass('BaseButton') -// export class BaseButton extends Component { - - -// //加载基础img -// Init(){ - -// } - - -// start() { -// this.Init(); -// this.node.on(Node.EventType.MOUSE_ENTER,this.mouseEnter,this); -// this.node.on(Node.EventType.MOUSE_LEAVE,this.mouseLeave,this); -// this.node.on(Node.EventType.MOUSE_UP,this.mouseUp,this); -// } - - -// mouseEnter(){ - -// const baseSprite = this.node.getComponent(BaseSprite); -// // baseSprite.GImgIndex = 2; -// // baseSprite.onGImgIndexChanged(); -// baseSprite.ImgIndex = [2,1]; - -// console.log('mouseEnter'); -// console.log('GImgIndex =' + baseSprite.GImgIndex); -// console.log(baseSprite); -// } - -// mouseLeave(){ - -// const baseSprite = this.node.getComponent(BaseSprite); -// // baseSprite.GImgIndex = 1; -// // baseSprite.onGImgIndexChanged(); -// baseSprite.ImgIndex = [1,1]; -// console.log('mouseLeave'); -// console.log('GImgIndex =' + baseSprite.GImgIndex); -// console.log(baseSprite); -// } - -// mouseUp(evetn: EventMouse){ -// if (evetn.getButton() == EventMouse.BUTTON_LEFT){ -// console.log('mouseUpLeft'); -// } - -// } - -// update(deltaTime: number) { - -// } - - - - -// } - - diff --git a/assets/GlobalScript/Common/BaseSpriteByNpk.ts b/assets/GlobalScript/Common/BaseSpriteByNpk.ts deleted file mode 100644 index 2b34fc8..0000000 --- a/assets/GlobalScript/Common/BaseSpriteByNpk.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { _decorator, Component, Node, Animation, Sprite, resources, SpriteFrame, CCString, CCInteger, Vec2 } from 'cc'; - - -const { ccclass, property, requireComponent, executeInEditMode } = _decorator; - -@ccclass('BaseSpriteByNpk') -@executeInEditMode -@requireComponent(Sprite)//依赖组件 精灵 -export default class BaseSpriteByNpk extends Component { - - - @property({ type: CCString, displayName: 'img路径', tooltip: "img路径" }) - Path: string = ""; - - @property({ type: CCInteger, displayName: 'img编号', tooltip: "img编号" }) - ImgIndex = 0; - - start() { - - - } - - update(dt: number): void { - - } -} - - diff --git a/assets/GlobalScript/CommonComponent/ButtonDown.ts b/assets/GlobalScript/CommonComponent/ButtonDown.ts new file mode 100644 index 0000000..8c9385f --- /dev/null +++ b/assets/GlobalScript/CommonComponent/ButtonDown.ts @@ -0,0 +1,36 @@ +import { _decorator, Component, Node } from 'cc'; +const { ccclass, property } = _decorator; + +/// 按钮按下效果 在按下时 向下移动一个坐标 +@ccclass('ButtonDown') +export class ButtonDown extends Component { + start() { + this.node.on(Node.EventType.TOUCH_START,this.onTouchStart,this); + this.node.on(Node.EventType.TOUCH_END,this.onTouchEnd,this); + this.node.on(Node.EventType.TOUCH_CANCEL,this.onTouchCancel,this); + } + + onTouchStart(event:Event){ + const pos = this.node.getPosition(); + pos.y -= 1; + this.node.setPosition(pos); + } + + onTouchEnd(event:Event){ + const pos = this.node.getPosition(); + pos.y += 1; + this.node.setPosition(pos); + } + + onTouchCancel(event:Event){ + const pos = this.node.getPosition(); + pos.y += 1; + this.node.setPosition(pos); + } + + update(deltaTime: number) { + + } +} + + diff --git a/assets/Script/StartGameButton.ts.meta b/assets/GlobalScript/CommonComponent/ButtonDown.ts.meta similarity index 70% rename from assets/Script/StartGameButton.ts.meta rename to assets/GlobalScript/CommonComponent/ButtonDown.ts.meta index 270a11c..15f4a7a 100644 --- a/assets/Script/StartGameButton.ts.meta +++ b/assets/GlobalScript/CommonComponent/ButtonDown.ts.meta @@ -2,7 +2,7 @@ "ver": "4.0.23", "importer": "typescript", "imported": true, - "uuid": "45dea0b1-384d-43f7-a8ac-a58814cf17a3", + "uuid": "22f739e6-e4fa-4527-8015-095c71c24f3a", "files": [], "subMetas": {}, "userData": {} diff --git a/assets/Prefab/Present.prefab b/assets/Prefab/Present.prefab index 39a861e..4622e53 100644 --- a/assets/Prefab/Present.prefab +++ b/assets/Prefab/Present.prefab @@ -20,22 +20,31 @@ "_children": [ { "__id__": 2 + }, + { + "__id__": 10 } ], "_active": true, "_components": [ { - "__id__": 8 + "__id__": 20 }, { - "__id__": 10 + "__id__": 22 }, { - "__id__": 12 + "__id__": 24 + }, + { + "__id__": 26 + }, + { + "__id__": 28 } ], "_prefab": { - "__id__": 14 + "__id__": 30 }, "_lpos": { "__type__": "cc.Vec3", @@ -68,7 +77,7 @@ }, { "__type__": "cc.Node", - "_name": "Present", + "_name": "Sprite", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -82,10 +91,13 @@ }, { "__id__": 5 + }, + { + "__id__": 7 } ], "_prefab": { - "__id__": 7 + "__id__": 9 }, "_lpos": { "__type__": "cc.Vec3", @@ -142,7 +154,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "aaL9wscpRMHJWY91pMRzIH" + "fileId": "5eWu0X+FVNgI5z0WVe7YQ6" }, { "__type__": "cc.Sprite", @@ -166,10 +178,7 @@ "b": 255, "a": 255 }, - "_spriteFrame": { - "__uuid__": "57520716-48c8-4a19-8acf-41c9f8777fb0@f9941", - "__expectedType__": "cc.SpriteFrame" - }, + "_spriteFrame": null, "_type": 0, "_fillType": 0, "_sizeMode": 1, @@ -187,7 +196,27 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "a0XZDk+45J/K9kzpQ5IPPm" + "fileId": "fc0twlF1lOR4HK7BeyC25p" + }, + { + "__type__": "a80463xbJJM5qU8FUhHK84e", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 8 + }, + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "ImgIndex": 25, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e8MHts9wpBCLjui8vsEugz" }, { "__type__": "cc.PrefabInfo", @@ -197,7 +226,187 @@ "asset": { "__id__": 0 }, - "fileId": "4bjGWkBElEr4BC16fDhe3Q", + "fileId": "6f3bSlwHhGTrCoRP/4nXYb", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "CancelButton", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 13 + }, + { + "__id__": 15 + }, + { + "__id__": 17 + } + ], + "_prefab": { + "__id__": 19 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 380, + "y": 258, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9ct7fqJXZPW72loHtkPyZI" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "50krRdvUxGV5JwIT29GeY2" + }, + { + "__type__": "227e93p2mxEV5zjvG1ofJkL", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": { + "__id__": 16 + }, + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/01_ingame.img", + "NormalImgIndex": 39, + "HoverImgIndex": 40, + "PressImgIndex": 41, + "DisableImgIndex": 42, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "616ESzd7tK6azbhkiSn+wZ" + }, + { + "__type__": "22f73nm5PpFJ4AVCVxxwk86", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "68tS2o/ulDzLCwmZLhFu2o" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "19a5NWpspNOq0ziWf+VKn3", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -212,12 +421,12 @@ }, "_enabled": true, "__prefab": { - "__id__": 9 + "__id__": 21 }, "_contentSize": { "__type__": "cc.Size", - "width": 100, - "height": 100 + "width": 1067, + "height": 600 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -228,7 +437,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "55UWXxjklAW4PediZ2wPj/" + "fileId": "84kljvQdpCXpvHHsZcsIfi" }, { "__type__": "cc.Mask", @@ -240,7 +449,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 11 + "__id__": 23 }, "_type": 0, "_inverted": false, @@ -250,7 +459,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "be/874Wo5NBqs4VTuq2F30" + "fileId": "d18TIUsPZJNor4depBAoLj" }, { "__type__": "cc.Graphics", @@ -262,7 +471,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 13 + "__id__": 25 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -296,7 +505,46 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "fbR4Tn7D1AD5Uiybsxn/Oq" + "fileId": "abKlZKzBBOOIS0f81wPKoZ" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 27 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8eYsyz39JAFoU0NowSG2Us" + }, + { + "__type__": "fa300wCdRFJV5rVpFd/PxUk", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 29 + }, + "cancel": { + "__id__": 10 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "cf7mnl4l9L/7pkHBxOV4kG" }, { "__type__": "cc.PrefabInfo", @@ -306,7 +554,8 @@ "asset": { "__id__": 0 }, - "fileId": "78Ap+aUshFV4IYTsoXI+uF", + "fileId": "45U0bsLzxF75ClciJzcbfs", + "instance": null, "targetOverrides": null } ] \ No newline at end of file diff --git a/assets/Prefab/Present.prefab.meta b/assets/Prefab/Present.prefab.meta index 43fefaa..a50d000 100644 --- a/assets/Prefab/Present.prefab.meta +++ b/assets/Prefab/Present.prefab.meta @@ -2,7 +2,7 @@ "ver": "1.1.50", "importer": "prefab", "imported": true, - "uuid": "aa2989f4-5378-4297-a889-49a957c3b47b", + "uuid": "345ab5d0-8a20-42ec-a630-62a235d82b34", "files": [ ".json" ], diff --git a/assets/Script/Pressent.ts b/assets/Script/Pressent.ts new file mode 100644 index 0000000..e6aee29 --- /dev/null +++ b/assets/Script/Pressent.ts @@ -0,0 +1,23 @@ +import { _decorator, Component, Node } from 'cc'; +const { ccclass, property } = _decorator; + +@ccclass('Pressent') +export class Pressent extends Component { + + @property(Node) cancel: Node; + + start() { + this.cancel.on(Node.EventType.TOUCH_END,this.touchEnd,this); + } + + touchEnd(event:Event){ + /// 销毁节点 + this.node.destroy(); + } + + update(deltaTime: number) { + + } +} + + diff --git a/assets/Script/Pressent.ts.meta b/assets/Script/Pressent.ts.meta new file mode 100644 index 0000000..3f8f7d7 --- /dev/null +++ b/assets/Script/Pressent.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "fa300c02-7511-4957-9ad5-a4577f3f1524", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Script/StartGameButton.ts b/assets/Script/StartGameButton.ts deleted file mode 100644 index 4e58831..0000000 --- a/assets/Script/StartGameButton.ts +++ /dev/null @@ -1,54 +0,0 @@ -// import { _decorator, Button, Component, EventMouse, Node, NodeEventType } from 'cc'; -// const { ccclass, property } = _decorator; - -// @ccclass('BaseButton') -// export class BaseButton extends Component { - - -// start() { -// this.node.on(Node.EventType.MOUSE_ENTER,this.mouseEnter,this); -// this.node.on(Node.EventType.MOUSE_LEAVE,this.mouseLeave,this); -// this.node.on(Node.EventType.MOUSE_UP,this.mouseUp,this); -// } - - -// mouseEnter(){ - -// const baseSprite = this.node.getComponent(BaseSprite); -// // baseSprite.GImgIndex = 2; -// // baseSprite.onGImgIndexChanged(); -// baseSprite.ImgIndex = [2,1]; - -// console.log('mouseEnter'); -// console.log('GImgIndex =' + baseSprite.GImgIndex); -// console.log(baseSprite); -// } - -// mouseLeave(){ - -// const baseSprite = this.node.getComponent(BaseSprite); -// // baseSprite.GImgIndex = 1; -// // baseSprite.onGImgIndexChanged(); -// baseSprite.ImgIndex = [1,1]; -// console.log('mouseLeave'); -// console.log('GImgIndex =' + baseSprite.GImgIndex); -// console.log(baseSprite); -// } - -// mouseUp(evetn: EventMouse){ -// if (evetn.getButton() == EventMouse.BUTTON_LEFT){ -// console.log('mouseUpLeft'); -// } - -// } - -// update(deltaTime: number) { - -// } - - - - -// } - - diff --git a/assets/Script/StartGameRoot.ts b/assets/Script/StartGameRoot.ts index 7e9d6bd..bafd4a0 100644 --- a/assets/Script/StartGameRoot.ts +++ b/assets/Script/StartGameRoot.ts @@ -1,12 +1,21 @@ -import { _decorator, Component, Node } from 'cc'; +import { _decorator, Button, Component, EventTouch, instantiate, Node, Prefab } from 'cc'; const { ccclass, property } = _decorator; @ccclass('StartGameRoot') export class StartGameRoot extends Component { + @property(Node) PressenButton: Node; + + @property(Prefab) pressenPrefab: Prefab; start() { + this.PressenButton.on(Node.EventType.TOUCH_END,this.onTouchEnd,this); + } + onTouchEnd(event:Event){ + const pressent = instantiate(this.pressenPrefab); + this.node.addChild(pressent); + pressent.setPosition(0,0); } update(deltaTime: number) { diff --git a/assets/scene/main.scene b/assets/scene/main.scene index 68f12b7..0ee39ee 100644 --- a/assets/scene/main.scene +++ b/assets/scene/main.scene @@ -494,7 +494,7 @@ "_id": "0apjnJJkpLlKFaw0omFEuX" }, { - "__type__": "9258d3QVRBC/L8BCziIBXzT", + "__type__": "a80463xbJJM5qU8FUhHK84e", "_name": "", "_objFlags": 0, "__editorExtras__": {}, @@ -503,10 +503,9 @@ }, "_enabled": true, "__prefab": null, - "DefaultImgPath": "sprite/interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", - "GImgIndex": 0, - "PlayState": 1, - "_id": "a27U1G+TROF7ArDt28B3wZ" + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "ImgIndex": 0, + "_id": "fc2gTwXM1Lq68bZxSz8rQ1" }, { "__type__": "cc.Node", @@ -875,7 +874,7 @@ "_id": "e0/ZwnGkVL7bbmU6H8jnIX" }, { - "__type__": "9258d3QVRBC/L8BCziIBXzT", + "__type__": "a80463xbJJM5qU8FUhHK84e", "_name": "", "_objFlags": 0, "__editorExtras__": {}, @@ -884,10 +883,9 @@ }, "_enabled": true, "__prefab": null, - "DefaultImgPath": "sprite/interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", - "GImgIndex": 24, - "PlayState": 1, - "_id": "b5PH4Yj91JwaoGNitfqvGl" + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "ImgIndex": 24, + "_id": "ebKIgu9tNPe72cFsv4G2ss" }, { "__type__": "cc.Node", @@ -1004,6 +1002,23 @@ "_atlas": null, "_id": "c2pCm9pjRJJ7j/VPe74xxb" }, + { + "__type__": "227e93p2mxEV5zjvG1ofJkL", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": null, + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "NormalImgIndex": 1, + "HoverImgIndex": 2, + "PressImgIndex": 3, + "DisableImgIndex": 4, + "_id": "5fU90+EeRH7b08boyAjpt6" + }, { "__type__": "cc.Button", "_name": "", @@ -1016,12 +1031,12 @@ "__prefab": null, "clickEvents": [], "_interactable": true, - "_transition": 2, + "_transition": 0, "_normalColor": { "__type__": "cc.Color", - "r": 214, - "g": 214, - "b": 214, + "r": 255, + "g": 255, + "b": 255, "a": 255 }, "_hoverColor": { @@ -1051,13 +1066,11 @@ "_disabledSprite": null, "_duration": 0.1, "_zoomScale": 1.2, - "_target": { - "__id__": 25 - }, - "_id": "82Ln0THAtKkY7+6CUtpLEd" + "_target": null, + "_id": "a5tzyh02NEYJ1QdJN7y0gl" }, { - "__type__": "9258d3QVRBC/L8BCziIBXzT", + "__type__": "22f73nm5PpFJ4AVCVxxwk86", "_name": "", "_objFlags": 0, "__editorExtras__": {}, @@ -1066,22 +1079,7 @@ }, "_enabled": true, "__prefab": null, - "DefaultImgPath": "sprite/interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", - "GImgIndex": 1, - "PlayState": 1, - "_id": "00SU+NlYFFmYyaZ+L3YaAE" - }, - { - "__type__": "45deaCxOE1D96ispYgUzxej", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 25 - }, - "_enabled": true, - "__prefab": null, - "_id": "843jjChttPUY5MJ5eIrMuv" + "_id": "d7zWDrkEJBW4iaN5aFUryg" }, { "__type__": "cc.Node", @@ -1327,21 +1325,6 @@ "_atlas": null, "_id": "04PBUHNcJMwr+FmGsd0fhr" }, - { - "__type__": "9258d3QVRBC/L8BCziIBXzT", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 34 - }, - "_enabled": true, - "__prefab": null, - "DefaultImgPath": "sprite/interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", - "GImgIndex": 9, - "PlayState": 1, - "_id": "20sg3uXg1KhoLjZboOhqxz" - }, { "__type__": "cc.Button", "_name": "", @@ -1392,6 +1375,23 @@ "_target": null, "_id": "cce2csLLhBI7Vy15ey0Flw" }, + { + "__type__": "227e93p2mxEV5zjvG1ofJkL", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": null, + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "NormalImgIndex": 9, + "HoverImgIndex": 10, + "PressImgIndex": 11, + "DisableImgIndex": 12, + "_id": "d7tUYiuShOA4bxi1CaYfUR" + }, { "__type__": "cc.UITransform", "_name": "", @@ -1424,6 +1424,13 @@ }, "_enabled": true, "__prefab": null, + "PressenButton": { + "__id__": 34 + }, + "pressenPrefab": { + "__uuid__": "345ab5d0-8a20-42ec-a630-62a235d82b34", + "__expectedType__": "cc.Prefab" + }, "_id": "1f5g72f3ZHyooqaoqTrMZZ" }, { From edba3e9514ab2cf1f4695f397418c73d69755913 Mon Sep 17 00:00:00 2001 From: "DESKTOP-J7I1C4E\\a9350" Date: Fri, 8 Mar 2024 20:10:27 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8C=89=E9=92=AE=20=E6=8C=89=E4=B8=8B?= =?UTF-8?q?=E6=95=88=E6=9E=9C=20=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommonComponent/BaseSpriteFrame.ts | 1 - .../CommonComponent/ButtonDown.ts | 36 ---- .../CommonComponent/ButtonDown.ts.meta | 9 - assets/Prefab/Present.prefab | 45 ++--- assets/scene/main.scene | 166 ++++++------------ 5 files changed, 61 insertions(+), 196 deletions(-) delete mode 100644 assets/GlobalScript/CommonComponent/ButtonDown.ts delete mode 100644 assets/GlobalScript/CommonComponent/ButtonDown.ts.meta diff --git a/assets/GlobalScript/CommonComponent/BaseSpriteFrame.ts b/assets/GlobalScript/CommonComponent/BaseSpriteFrame.ts index a8dea36..10f8389 100644 --- a/assets/GlobalScript/CommonComponent/BaseSpriteFrame.ts +++ b/assets/GlobalScript/CommonComponent/BaseSpriteFrame.ts @@ -29,7 +29,6 @@ export class BaseSpriteFrame { tex.updateImage(); this._SpriteFrame.texture = tex; this._SpriteFrame.offset = v2(Png.Xpos, -Png.Ypos); - console.log(this._SpriteFrame.offset); this.CallBackFunc(this._SpriteFrame); this.InitState = true; diff --git a/assets/GlobalScript/CommonComponent/ButtonDown.ts b/assets/GlobalScript/CommonComponent/ButtonDown.ts deleted file mode 100644 index 8c9385f..0000000 --- a/assets/GlobalScript/CommonComponent/ButtonDown.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { _decorator, Component, Node } from 'cc'; -const { ccclass, property } = _decorator; - -/// 按钮按下效果 在按下时 向下移动一个坐标 -@ccclass('ButtonDown') -export class ButtonDown extends Component { - start() { - this.node.on(Node.EventType.TOUCH_START,this.onTouchStart,this); - this.node.on(Node.EventType.TOUCH_END,this.onTouchEnd,this); - this.node.on(Node.EventType.TOUCH_CANCEL,this.onTouchCancel,this); - } - - onTouchStart(event:Event){ - const pos = this.node.getPosition(); - pos.y -= 1; - this.node.setPosition(pos); - } - - onTouchEnd(event:Event){ - const pos = this.node.getPosition(); - pos.y += 1; - this.node.setPosition(pos); - } - - onTouchCancel(event:Event){ - const pos = this.node.getPosition(); - pos.y += 1; - this.node.setPosition(pos); - } - - update(deltaTime: number) { - - } -} - - diff --git a/assets/GlobalScript/CommonComponent/ButtonDown.ts.meta b/assets/GlobalScript/CommonComponent/ButtonDown.ts.meta deleted file mode 100644 index 15f4a7a..0000000 --- a/assets/GlobalScript/CommonComponent/ButtonDown.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.23", - "importer": "typescript", - "imported": true, - "uuid": "22f739e6-e4fa-4527-8015-095c71c24f3a", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/Prefab/Present.prefab b/assets/Prefab/Present.prefab index 4622e53..3a09e66 100644 --- a/assets/Prefab/Present.prefab +++ b/assets/Prefab/Present.prefab @@ -27,6 +27,9 @@ ], "_active": true, "_components": [ + { + "__id__": 18 + }, { "__id__": 20 }, @@ -38,13 +41,10 @@ }, { "__id__": 26 - }, - { - "__id__": 28 } ], "_prefab": { - "__id__": 30 + "__id__": 28 }, "_lpos": { "__type__": "cc.Vec3", @@ -250,18 +250,15 @@ }, { "__id__": 15 - }, - { - "__id__": 17 } ], "_prefab": { - "__id__": 19 + "__id__": 17 }, "_lpos": { "__type__": "cc.Vec3", - "x": 380, - "y": 258, + "x": 368, + "y": 270, "z": 0 }, "_lrot": { @@ -380,24 +377,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "616ESzd7tK6azbhkiSn+wZ" }, - { - "__type__": "22f73nm5PpFJ4AVCVxxwk86", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 10 - }, - "_enabled": true, - "__prefab": { - "__id__": 18 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "68tS2o/ulDzLCwmZLhFu2o" - }, { "__type__": "cc.PrefabInfo", "root": { @@ -421,7 +400,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 21 + "__id__": 19 }, "_contentSize": { "__type__": "cc.Size", @@ -449,7 +428,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 23 + "__id__": 21 }, "_type": 0, "_inverted": false, @@ -471,7 +450,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 25 + "__id__": 23 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -517,7 +496,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 27 + "__id__": 25 }, "_id": "" }, @@ -535,7 +514,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 29 + "__id__": 27 }, "cancel": { "__id__": 10 diff --git a/assets/scene/main.scene b/assets/scene/main.scene index 0ee39ee..049ce02 100644 --- a/assets/scene/main.scene +++ b/assets/scene/main.scene @@ -23,7 +23,7 @@ "_active": true, "_components": [], "_prefab": { - "__id__": 44 + "__id__": 42 }, "_lpos": { "__type__": "cc.Vec3", @@ -54,7 +54,7 @@ }, "autoReleaseAssets": false, "_globals": { - "__id__": 45 + "__id__": 43 }, "_id": "f713b5ea-a70f-486c-8260-0338f089a5b8" }, @@ -76,14 +76,14 @@ ], "_active": true, "_components": [ + { + "__id__": 39 + }, + { + "__id__": 40 + }, { "__id__": 41 - }, - { - "__id__": 42 - }, - { - "__id__": 43 } ], "_prefab": null, @@ -175,7 +175,7 @@ "_priority": 0, "_fov": 45, "_fovAxis": 0, - "_orthoHeight": 345.04285714285714, + "_orthoHeight": 434.12254901960785, "_near": 0, "_far": 1000, "_color": { @@ -526,19 +526,19 @@ "__id__": 25 }, { - "__id__": 31 + "__id__": 29 }, { - "__id__": 34 + "__id__": 32 } ], "_active": true, "_components": [ { - "__id__": 39 + "__id__": 37 }, { - "__id__": 40 + "__id__": 38 } ], "_prefab": null, @@ -906,12 +906,6 @@ }, { "__id__": 28 - }, - { - "__id__": 29 - }, - { - "__id__": 30 } ], "_prefab": null, @@ -942,7 +936,7 @@ "y": 0, "z": 0 }, - "_id": "68JO9KgzZBzaglXLAy5Qu4" + "_id": "67FmNdJkVATpCcbIwgHp2G" }, { "__type__": "cc.UITransform", @@ -957,14 +951,14 @@ "_contentSize": { "__type__": "cc.Size", "width": 40, - "height": 40 + "height": 36 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0, - "y": 1 + "x": 0.5, + "y": 0.5 }, - "_id": "2cFRkfzuxDZ7IwRpHkN6SQ" + "_id": "a3xOLpvKhNkJRcFhv1C1qQ" }, { "__type__": "cc.Sprite", @@ -987,9 +981,9 @@ "a": 255 }, "_spriteFrame": null, - "_type": 1, + "_type": 0, "_fillType": 0, - "_sizeMode": 2, + "_sizeMode": 1, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, @@ -997,10 +991,10 @@ }, "_fillStart": 0, "_fillRange": 0, - "_isTrimmedMode": false, + "_isTrimmedMode": true, "_useGrayscale": false, "_atlas": null, - "_id": "c2pCm9pjRJJ7j/VPe74xxb" + "_id": "b3Rsdbc51AMpgis1SnRQUd" }, { "__type__": "227e93p2mxEV5zjvG1ofJkL", @@ -1017,69 +1011,7 @@ "HoverImgIndex": 2, "PressImgIndex": 3, "DisableImgIndex": 4, - "_id": "5fU90+EeRH7b08boyAjpt6" - }, - { - "__type__": "cc.Button", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 25 - }, - "_enabled": true, - "__prefab": null, - "clickEvents": [], - "_interactable": true, - "_transition": 0, - "_normalColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_hoverColor": { - "__type__": "cc.Color", - "r": 211, - "g": 211, - "b": 211, - "a": 255 - }, - "_pressedColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_disabledColor": { - "__type__": "cc.Color", - "r": 124, - "g": 124, - "b": 124, - "a": 255 - }, - "_normalSprite": null, - "_hoverSprite": null, - "_pressedSprite": null, - "_disabledSprite": null, - "_duration": 0.1, - "_zoomScale": 1.2, - "_target": null, - "_id": "a5tzyh02NEYJ1QdJN7y0gl" - }, - { - "__type__": "22f73nm5PpFJ4AVCVxxwk86", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 25 - }, - "_enabled": true, - "__prefab": null, - "_id": "d7zWDrkEJBW4iaN5aFUryg" + "_id": "33Uwxk18RJ25Jq8tLo2avm" }, { "__type__": "cc.Node", @@ -1093,10 +1025,10 @@ "_active": true, "_components": [ { - "__id__": 32 + "__id__": 30 }, { - "__id__": 33 + "__id__": 31 } ], "_prefab": null, @@ -1135,14 +1067,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 31 + "__id__": 29 }, "_enabled": true, "__prefab": null, "_contentSize": { "__type__": "cc.Size", - "width": 14.254856981549944, - "height": 50.4 + "width": 14.256042929256663, + "height": 50.400000000000006 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1157,7 +1089,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 31 + "__id__": 29 }, "_enabled": true, "__prefab": null, @@ -1174,7 +1106,7 @@ "_string": "∞", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 28.8659793814433, + "_actualFontSize": 22.94283036551078, "_fontSize": 20, "_fontFamily": "Arial", "_lineHeight": 40, @@ -1224,17 +1156,17 @@ "_children": [], "_active": true, "_components": [ + { + "__id__": 33 + }, + { + "__id__": 34 + }, { "__id__": 35 }, { "__id__": 36 - }, - { - "__id__": 37 - }, - { - "__id__": 38 } ], "_prefab": null, @@ -1273,7 +1205,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 32 }, "_enabled": true, "__prefab": null, @@ -1295,7 +1227,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 32 }, "_enabled": true, "__prefab": null, @@ -1331,7 +1263,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 32 }, "_enabled": true, "__prefab": null, @@ -1381,7 +1313,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 32 }, "_enabled": true, "__prefab": null, @@ -1425,7 +1357,7 @@ "_enabled": true, "__prefab": null, "PressenButton": { - "__id__": 34 + "__id__": 32 }, "pressenPrefab": { "__uuid__": "345ab5d0-8a20-42ec-a630-62a235d82b34", @@ -1512,28 +1444,28 @@ { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 46 + "__id__": 44 }, "shadows": { - "__id__": 47 + "__id__": 45 }, "_skybox": { - "__id__": 48 + "__id__": 46 }, "fog": { - "__id__": 49 + "__id__": 47 }, "octree": { - "__id__": 50 + "__id__": 48 }, "skin": { - "__id__": 51 + "__id__": 49 }, "lightProbeInfo": { - "__id__": 52 + "__id__": 50 }, "postSettings": { - "__id__": 53 + "__id__": 51 }, "bakedWithStationaryMainLight": false, "bakedWithHighpLightmap": false From c0da02c955430744518141feefff9a622f9d6cf4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-J7I1C4E\\a9350" Date: Sat, 9 Mar 2024 13:17:48 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=A2=84=E5=8A=A0=E8=BD=BD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Script/StartGameRoot.ts | 19 +- assets/Script/UIRoot.ts | 21 + assets/Script/UIRoot.ts.meta | 9 + assets/{ => resources}/Prefab.meta | 0 assets/resources/Prefab/Gamer.prefab | 259 ++++ assets/resources/Prefab/Gamer.prefab.meta | 13 + assets/{ => resources}/Prefab/Present.prefab | 0 .../Prefab/Present.prefab.meta | 0 assets/resources/Prefab/StartGameRoot.prefab | 1089 +++++++++++++++++ .../Prefab/StartGameRoot.prefab.meta | 13 + assets/resources/Prefab/UI.prefab | 220 ++++ assets/resources/Prefab/UI.prefab.meta | 13 + assets/resources/loding/LodingLogic.ts | 16 +- assets/scene/main.scene | 1028 ++-------------- settings/v2/packages/information.json | 6 +- 15 files changed, 1771 insertions(+), 935 deletions(-) create mode 100644 assets/Script/UIRoot.ts create mode 100644 assets/Script/UIRoot.ts.meta rename assets/{ => resources}/Prefab.meta (100%) create mode 100644 assets/resources/Prefab/Gamer.prefab create mode 100644 assets/resources/Prefab/Gamer.prefab.meta rename assets/{ => resources}/Prefab/Present.prefab (100%) rename assets/{ => resources}/Prefab/Present.prefab.meta (100%) create mode 100644 assets/resources/Prefab/StartGameRoot.prefab create mode 100644 assets/resources/Prefab/StartGameRoot.prefab.meta create mode 100644 assets/resources/Prefab/UI.prefab create mode 100644 assets/resources/Prefab/UI.prefab.meta diff --git a/assets/Script/StartGameRoot.ts b/assets/Script/StartGameRoot.ts index bafd4a0..355578f 100644 --- a/assets/Script/StartGameRoot.ts +++ b/assets/Script/StartGameRoot.ts @@ -4,20 +4,35 @@ const { ccclass, property } = _decorator; @ccclass('StartGameRoot') export class StartGameRoot extends Component { + /// 玩法介绍按钮 @property(Node) PressenButton: Node; + /// 玩法介绍UI预制件 @property(Prefab) pressenPrefab: Prefab; + + //// 开始游戏按钮 + @property(Node) StartButton: Node; + + /// UI层预制件 + @property(Prefab) UIPrefab: Prefab; start() { - this.PressenButton.on(Node.EventType.TOUCH_END,this.onTouchEnd,this); + this.PressenButton.on(Node.EventType.TOUCH_END,this.pressenOnTouchEnd,this); + this.StartButton.on(Node.EventType.TOUCH_END,this.startOnTouchEnd,this); } - onTouchEnd(event:Event){ + pressenOnTouchEnd(event:Event){ const pressent = instantiate(this.pressenPrefab); this.node.addChild(pressent); pressent.setPosition(0,0); } + startOnTouchEnd(event:Event){ + this.node.destroy(); + const ui = instantiate(this.UIPrefab); + this.node.parent.addChild(ui); + } + update(deltaTime: number) { } diff --git a/assets/Script/UIRoot.ts b/assets/Script/UIRoot.ts new file mode 100644 index 0000000..4dd76e4 --- /dev/null +++ b/assets/Script/UIRoot.ts @@ -0,0 +1,21 @@ +import { _decorator, assetManager, Component, instantiate, Node, Prefab } from 'cc'; +const { ccclass, property } = _decorator; + +@ccclass('UIRoot') +export class UIRoot extends Component { + + @property({ type: Prefab, displayName: 'Ani帧数', tooltip: "Ani总共有多少帧" }) + startGameRootPrefab:Prefab; + + start() { + + this.node.addChild(instantiate(this.startGameRootPrefab)); + + } + + update(deltaTime: number) { + + } +} + + diff --git a/assets/Script/UIRoot.ts.meta b/assets/Script/UIRoot.ts.meta new file mode 100644 index 0000000..340128d --- /dev/null +++ b/assets/Script/UIRoot.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "a578cd6a-ad34-4875-a305-844b629bc2cc", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Prefab.meta b/assets/resources/Prefab.meta similarity index 100% rename from assets/Prefab.meta rename to assets/resources/Prefab.meta diff --git a/assets/resources/Prefab/Gamer.prefab b/assets/resources/Prefab/Gamer.prefab new file mode 100644 index 0000000..71177f1 --- /dev/null +++ b/assets/resources/Prefab/Gamer.prefab @@ -0,0 +1,259 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Gamer", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "Gamer", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 6 + }, + { + "__id__": 8 + }, + { + "__id__": 10 + } + ], + "_prefab": { + "__id__": 12 + }, + "_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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Role", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 5 + }, + "_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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6206qxk1NFE5QmAvH3zvq1" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "65epnVCaxNSIGMknmNdcpA", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c6XJpShO1IiISvt/47nt+K" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f1HLPxYllBtLhId3RcwwDZ" + }, + { + "__type__": "a80463xbJJM5qU8FUhHK84e", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 11 + }, + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/01_ingame.img", + "ImgIndex": 32, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5fuqRs6VlLV6IWVYCnfh42" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "4dIR0b3MJAHIpU7ERJwTWq", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/Prefab/Gamer.prefab.meta b/assets/resources/Prefab/Gamer.prefab.meta new file mode 100644 index 0000000..07cea83 --- /dev/null +++ b/assets/resources/Prefab/Gamer.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "7fb32db3-b3d6-44f1-abaa-f6063c24e07f", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Gamer" + } +} diff --git a/assets/Prefab/Present.prefab b/assets/resources/Prefab/Present.prefab similarity index 100% rename from assets/Prefab/Present.prefab rename to assets/resources/Prefab/Present.prefab diff --git a/assets/Prefab/Present.prefab.meta b/assets/resources/Prefab/Present.prefab.meta similarity index 100% rename from assets/Prefab/Present.prefab.meta rename to assets/resources/Prefab/Present.prefab.meta diff --git a/assets/resources/Prefab/StartGameRoot.prefab b/assets/resources/Prefab/StartGameRoot.prefab new file mode 100644 index 0000000..39249d8 --- /dev/null +++ b/assets/resources/Prefab/StartGameRoot.prefab @@ -0,0 +1,1089 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "StartGameRoot", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "StartGameRoot", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 14 + }, + { + "__id__": 22 + }, + { + "__id__": 30 + }, + { + "__id__": 36 + } + ], + "_active": true, + "_components": [ + { + "__id__": 46 + }, + { + "__id__": 48 + } + ], + "_prefab": { + "__id__": 50 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 533, + "y": 300, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Title", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 11 + } + ], + "_prefab": { + "__id__": 13 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 20, + "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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Title", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + }, + { + "__id__": 6 + }, + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4b7zXYUbVFCKiUvlqG6Xkj" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 0, + "_fillType": 0, + "_sizeMode": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c9L+J6+IpJiaPEbnkwKhxh" + }, + { + "__type__": "da8cbJJkjxC+qVdpm9/+8LT", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "AnimationPath": "ani/title_loop.ani", + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d8SsF4Z7pJ1Ku+9DCoVKY2" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "58dRZmg1RIzIQ/JjXCMjLb", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "67+SF4Mm5LEY/k/kRhSTJo" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "92f25kJE5E6rb4QTrO32tQ", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "ButtonBackground", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 15 + }, + { + "__id__": 17 + }, + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 21 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -533.5, + "y": 300, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 14 + }, + "_enabled": true, + "__prefab": { + "__id__": 16 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "27HRy0H3ZES6VAw8oloMpb" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 14 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 0, + "_fillType": 0, + "_sizeMode": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5aIkzw2JVGqa3Y27Rv+VGM" + }, + { + "__type__": "a80463xbJJM5qU8FUhHK84e", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 14 + }, + "_enabled": true, + "__prefab": { + "__id__": 20 + }, + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "ImgIndex": 24, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b0OjGY2kFG4KUpuJkpKPhR" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "17vx4kYtBMg4J2fpobMe8G", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "StartGameButton", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 23 + }, + { + "__id__": 25 + }, + { + "__id__": 27 + } + ], + "_prefab": { + "__id__": 29 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -92, + "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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": { + "__id__": 24 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "68BnemGTBJ6K9eG1zGhKKs" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "99Ln0ecDZLBrXFZ6dy00S4" + }, + { + "__type__": "227e93p2mxEV5zjvG1ofJkL", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "NormalImgIndex": 1, + "HoverImgIndex": 2, + "PressImgIndex": 3, + "DisableImgIndex": 4, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2d0UjiHQ5LRoVvC3ggrknN" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "dcrwm22l1Oyr2rsnec6l0/", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 31 + }, + { + "__id__": 33 + } + ], + "_prefab": { + "__id__": 35 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -120, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 30 + }, + "_enabled": true, + "__prefab": { + "__id__": 32 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 14.256042929256663, + "height": 50.400000000000006 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3fyeVVhNtFo6e6hgw6t2fo" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 30 + }, + "_enabled": true, + "__prefab": { + "__id__": 34 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 117, + "g": 177, + "b": 198, + "a": 255 + }, + "_string": "∞", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 22.94283036551078, + "_fontSize": 20, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "61GyvjPMlKjJqnzQW0PtzF" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "2f6hu4StlD4IM8x989mfFH", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "PresentButton", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 37 + }, + { + "__id__": 39 + }, + { + "__id__": 41 + }, + { + "__id__": 43 + } + ], + "_prefab": { + "__id__": 45 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 490, + "y": 290, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": { + "__id__": 38 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "33WHrc4kpNKLGPw2U2MmiP" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": { + "__id__": 40 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": null, + "_type": 0, + "_fillType": 0, + "_sizeMode": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "02hfz+qaFM4ZkZSTKka3be" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": { + "__id__": 42 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 0, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": null, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "1eWsE8vphE0ayHPVnOMHuW" + }, + { + "__type__": "227e93p2mxEV5zjvG1ofJkL", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": { + "__id__": 44 + }, + "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", + "NormalImgIndex": 9, + "HoverImgIndex": 10, + "PressImgIndex": 11, + "DisableImgIndex": 12, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c48NK4bcZKV7QO24vcULGI" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "e1TTa84cNFfbFaiwa7Pa1s", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 47 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "13IgOXo1NA/J2rsnSco2kR" + }, + { + "__type__": "372279qAKRIQKB+Altr4vJ8", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 49 + }, + "PressenButton": { + "__id__": 36 + }, + "pressenPrefab": { + "__uuid__": "345ab5d0-8a20-42ec-a630-62a235d82b34", + "__expectedType__": "cc.Prefab" + }, + "StartButton": { + "__id__": 22 + }, + "UIPrefab": { + "__uuid__": "b5b15b0a-c30d-4b95-aee9-b2798a9ad12d", + "__expectedType__": "cc.Prefab" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "63lEGK1UtK9awDvbf3Ov7z" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f89kwtvehImpCyWHzLrUpY", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/Prefab/StartGameRoot.prefab.meta b/assets/resources/Prefab/StartGameRoot.prefab.meta new file mode 100644 index 0000000..d0342ff --- /dev/null +++ b/assets/resources/Prefab/StartGameRoot.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "500c80cc-b47e-4a2d-98c7-4f6ce6113811", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "StartGameRoot" + } +} diff --git a/assets/resources/Prefab/UI.prefab b/assets/resources/Prefab/UI.prefab new file mode 100644 index 0000000..b3b44ea --- /dev/null +++ b/assets/resources/Prefab/UI.prefab @@ -0,0 +1,220 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "UI", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "UI", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 10 + } + ], + "_prefab": { + "__id__": 12 + }, + "_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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 3 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "7fb32db3-b3d6-44f1-abaa-f6063c24e07f", + "__expectedType__": "cc.Prefab" + }, + "fileId": "4dIR0b3MJAHIpU7ERJwTWq", + "instance": { + "__id__": 4 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "d7vgkaVD5OmapjIefZvdyK", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 5 + }, + { + "__id__": 7 + }, + { + "__id__": 8 + }, + { + "__id__": 9 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_name" + ], + "value": "Gamer" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "4dIR0b3MJAHIpU7ERJwTWq" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 266.766, + "y": 240.999, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 6 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 11 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ebXzZerpNCrpui6J6cpIgs" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "54XqsHof9Fxrxjq1dsKg2i", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": [ + { + "__id__": 2 + } + ] + } +] \ No newline at end of file diff --git a/assets/resources/Prefab/UI.prefab.meta b/assets/resources/Prefab/UI.prefab.meta new file mode 100644 index 0000000..da52f01 --- /dev/null +++ b/assets/resources/Prefab/UI.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "b5b15b0a-c30d-4b95-aee9-b2798a9ad12d", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "UI" + } +} diff --git a/assets/resources/loding/LodingLogic.ts b/assets/resources/loding/LodingLogic.ts index 4431aef..24cf2cf 100644 --- a/assets/resources/loding/LodingLogic.ts +++ b/assets/resources/loding/LodingLogic.ts @@ -1,7 +1,10 @@ -import { _decorator, Component, director, Node } from 'cc'; +import { _decorator, Component, director, instantiate, Node, Prefab, resources, Scene } from 'cc'; import { GlobalAudio } from '../../GlobalScript/GlobalAudio/GlobalAudio'; import { ImagePack } from '../../GlobalScript/ImagePack/ImagePack'; import { GameScript } from '../../GlobalScript/GameScript/GameScript'; +import { UIRoot } from '../../Script/UIRoot'; + + const { ccclass, property } = _decorator; @@ -18,6 +21,8 @@ export class LodingLogic extends Component { NpkManage: boolean = false; //Pvf管理器初始化状态 PvfManage: boolean = false; + + start() { //初始化音频Map GlobalAudio.getInstance().Init(() => { @@ -31,6 +36,7 @@ export class LodingLogic extends Component { GameScript.getInstance().Init(() => { this.PvfManage = true; }); + } CheckInitState() { @@ -40,18 +46,24 @@ export class LodingLogic extends Component { else return true; } + + update(deltaTime: number) { if (this.CheckInitState() && !this.InitFlag && this.LogoFlag) { this.scheduleOnce(function () { // director.loadScene("LoginGame"); - director.loadScene("main"); + + director.preloadScene("main",()=>{ + director.loadScene("main"); + }); }, 0); this.InitFlag = true; } else { //每帧调用 GameScript.getInstance().Update(); + } } } diff --git a/assets/scene/main.scene b/assets/scene/main.scene index 049ce02..41661d6 100644 --- a/assets/scene/main.scene +++ b/assets/scene/main.scene @@ -23,7 +23,7 @@ "_active": true, "_components": [], "_prefab": { - "__id__": 42 + "__id__": 18 }, "_lpos": { "__type__": "cc.Vec3", @@ -54,7 +54,7 @@ }, "autoReleaseAssets": false, "_globals": { - "__id__": 43 + "__id__": 19 }, "_id": "f713b5ea-a70f-486c-8260-0338f089a5b8" }, @@ -77,13 +77,13 @@ "_active": true, "_components": [ { - "__id__": 39 + "__id__": 15 }, { - "__id__": 40 + "__id__": 16 }, { - "__id__": 41 + "__id__": 17 } ], "_prefab": null, @@ -220,7 +220,10 @@ "__id__": 6 }, { - "__id__": 14 + "__id__": 10 + }, + { + "__id__": 13 } ], "_active": true, @@ -257,27 +260,23 @@ }, { "__type__": "cc.Node", - "_name": "SpriteSplash", + "_name": "BoardRoot", "_objFlags": 0, "__editorExtras__": {}, "_parent": { "__id__": 5 }, - "_children": [ - { - "__id__": 7 - } - ], + "_children": [], "_active": true, "_components": [ { - "__id__": 11 + "__id__": 7 }, { - "__id__": 12 + "__id__": 8 }, { - "__id__": 13 + "__id__": 9 } ], "_prefab": null, @@ -310,128 +309,6 @@ }, "_id": "f3uurI1edKpb/AsUQZyW7c" }, - { - "__type__": "cc.Node", - "_name": "Test", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 6 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 8 - }, - { - "__id__": 9 - }, - { - "__id__": 10 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 136.281, - "y": -394.99999999999994, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "58nLsryTdISqQKID5Hb4CI" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 7 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "e3PWU61UNEv7dpgCI4tyOQ" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 7 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": null, - "_type": 0, - "_fillType": 0, - "_sizeMode": 1, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "2fzSKdC4tJv4cl+tDLmGI9" - }, - { - "__type__": "da8cbJJkjxC+qVdpm9/+8LT", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 7 - }, - "_enabled": true, - "__prefab": null, - "AnimationPath": "ani/001_1x2.ani", - "_id": "86S/B40YdJLqyx40ueYpvW" - }, { "__type__": "cc.UITransform", "_name": "", @@ -509,136 +386,20 @@ }, { "__type__": "cc.Node", - "_name": "StartGameRoot", + "_name": "UIRoot", "_objFlags": 0, "__editorExtras__": {}, "_parent": { "__id__": 5 }, - "_children": [ - { - "__id__": 15 - }, - { - "__id__": 21 - }, - { - "__id__": 25 - }, - { - "__id__": 29 - }, - { - "__id__": 32 - } - ], - "_active": true, - "_components": [ - { - "__id__": 37 - }, - { - "__id__": 38 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 533, - "y": 300, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "f89kwtvehImpCyWHzLrUpY" - }, - { - "__type__": "cc.Node", - "_name": "Title", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 14 - }, - "_children": [ - { - "__id__": 16 - } - ], - "_active": true, - "_components": [ - { - "__id__": 20 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 20, - "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 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "18ueNYG+lITaLZWxT+R644" - }, - { - "__type__": "cc.Node", - "_name": "Title", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 15 - }, "_children": [], "_active": true, "_components": [ { - "__id__": 17 + "__id__": 11 }, { - "__id__": 18 - }, - { - "__id__": 19 + "__id__": 12 } ], "_prefab": null, @@ -669,7 +430,7 @@ "y": 0, "z": 0 }, - "_id": "28K4yFpddAmbUpUXjmh4HZ" + "_id": "b70q1cqLNPiaJjOCmvNnRI" }, { "__type__": "cc.UITransform", @@ -677,78 +438,7 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 16 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 40, - "height": 40 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 1 - }, - "_id": "94vaWEPfpEyJ+qrtGz+C9l" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 16 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": null, - "_type": 0, - "_fillType": 0, - "_sizeMode": 2, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": false, - "_useGrayscale": false, - "_atlas": null, - "_id": "d9lFDxtxVLOKXOFI5Fn6if" - }, - { - "__type__": "da8cbJJkjxC+qVdpm9/+8LT", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 16 - }, - "_enabled": true, - "__prefab": null, - "AnimationPath": "ani/title_loop.ani", - "_id": "33Ib3vVfZP3rfCYcAgYksz" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 15 + "__id__": 10 }, "_enabled": true, "__prefab": null, @@ -762,608 +452,90 @@ "x": 0.5, "y": 0.5 }, - "_id": "49zJMMiY1J0qiuLWIpaGxK" + "_id": "6cbBeNcXdJr6bJDAOt5tLP" }, { - "__type__": "cc.Node", - "_name": "ButtonBackground", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 14 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 22 - }, - { - "__id__": 23 - }, - { - "__id__": 24 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": -533.5, - "y": 300, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "8b4cxvgzVH34lu9mSeCGB+" - }, - { - "__type__": "cc.UITransform", + "__type__": "a578c1qrTRIdaMFhEtim8LM", "_name": "", "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 21 + "__id__": 10 }, "_enabled": true, "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 40, - "height": 40 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 1 - }, - "_id": "62vWifkQlPLqE4mwINAXM/" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 21 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": null, - "_type": 0, - "_fillType": 0, - "_sizeMode": 2, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": false, - "_useGrayscale": false, - "_atlas": null, - "_id": "e0/ZwnGkVL7bbmU6H8jnIX" - }, - { - "__type__": "a80463xbJJM5qU8FUhHK84e", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 21 - }, - "_enabled": true, - "__prefab": null, - "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", - "ImgIndex": 24, - "_id": "ebKIgu9tNPe72cFsv4G2ss" - }, - { - "__type__": "cc.Node", - "_name": "StartGameButton", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 14 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 26 - }, - { - "__id__": 27 - }, - { - "__id__": 28 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": -92, - "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 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "67FmNdJkVATpCcbIwgHp2G" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 25 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 40, - "height": 36 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "a3xOLpvKhNkJRcFhv1C1qQ" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 25 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": null, - "_type": 0, - "_fillType": 0, - "_sizeMode": 1, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": false, - "_atlas": null, - "_id": "b3Rsdbc51AMpgis1SnRQUd" - }, - { - "__type__": "227e93p2mxEV5zjvG1ofJkL", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 25 - }, - "_enabled": true, - "__prefab": null, - "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", - "NormalImgIndex": 1, - "HoverImgIndex": 2, - "PressImgIndex": 3, - "DisableImgIndex": 4, - "_id": "33Uwxk18RJ25Jq8tLo2avm" - }, - { - "__type__": "cc.Node", - "_name": "Label", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 14 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 30 - }, - { - "__id__": 31 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": -120, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "4dmkWjfxJDrJ4uMbYUahiW" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 29 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 14.256042929256663, - "height": 50.400000000000006 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "e7bo4jd1dOUZ3rMF46qaNe" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 29 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 117, - "g": 177, - "b": 198, - "a": 255 - }, - "_string": "∞", - "_horizontalAlign": 1, - "_verticalAlign": 1, - "_actualFontSize": 22.94283036551078, - "_fontSize": 20, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 0, - "_enableWrapText": true, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "d1PqgzwiFGcJQNEBcO7YKd" - }, - { - "__type__": "cc.Node", - "_name": "PresentButton", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 14 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 33 - }, - { - "__id__": 34 - }, - { - "__id__": 35 - }, - { - "__id__": 36 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 490, - "y": 290, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "0d2fKL04ZMELzEUNGe6deW" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 32 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 40, - "height": 40 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 1 - }, - "_id": "82TanjcC9Lx6RtC+hnXvh/" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 32 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": null, - "_type": 0, - "_fillType": 0, - "_sizeMode": 2, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": false, - "_useGrayscale": false, - "_atlas": null, - "_id": "04PBUHNcJMwr+FmGsd0fhr" - }, - { - "__type__": "cc.Button", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 32 - }, - "_enabled": true, - "__prefab": null, - "clickEvents": [], - "_interactable": true, - "_transition": 0, - "_normalColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_hoverColor": { - "__type__": "cc.Color", - "r": 211, - "g": 211, - "b": 211, - "a": 255 - }, - "_pressedColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_disabledColor": { - "__type__": "cc.Color", - "r": 124, - "g": 124, - "b": 124, - "a": 255 - }, - "_normalSprite": null, - "_hoverSprite": null, - "_pressedSprite": null, - "_disabledSprite": null, - "_duration": 0.1, - "_zoomScale": 1.2, - "_target": null, - "_id": "cce2csLLhBI7Vy15ey0Flw" - }, - { - "__type__": "227e93p2mxEV5zjvG1ofJkL", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 32 - }, - "_enabled": true, - "__prefab": null, - "ImgPath": "interface2/event/chn_event_2020/200922_dnf_marble/00_main.img", - "NormalImgIndex": 9, - "HoverImgIndex": 10, - "PressImgIndex": 11, - "DisableImgIndex": 12, - "_id": "d7tUYiuShOA4bxi1CaYfUR" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 14 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 100, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "8b9Ekz0rhKQKKtAvJQ9mnJ" - }, - { - "__type__": "372279qAKRIQKB+Altr4vJ8", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 14 - }, - "_enabled": true, - "__prefab": null, - "PressenButton": { - "__id__": 32 - }, - "pressenPrefab": { - "__uuid__": "345ab5d0-8a20-42ec-a630-62a235d82b34", + "startGameRootPrefab": { + "__uuid__": "500c80cc-b47e-4a2d-98c7-4f6ce6113811", "__expectedType__": "cc.Prefab" }, - "_id": "1f5g72f3ZHyooqaoqTrMZZ" + "_id": "6clS3n6E1O3Ir6YO9pV5rA" + }, + { + "__type__": "cc.Node", + "_name": "DialogRoot", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_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 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "d8/VyHU6hLfKN4/JXsnt1M" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 13 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "28/iYuYk1JyqaQ0l2uDYPY" }, { "__type__": "cc.UITransform", @@ -1444,28 +616,28 @@ { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 44 + "__id__": 20 }, "shadows": { - "__id__": 45 + "__id__": 21 }, "_skybox": { - "__id__": 46 + "__id__": 22 }, "fog": { - "__id__": 47 + "__id__": 23 }, "octree": { - "__id__": 48 + "__id__": 24 }, "skin": { - "__id__": 49 + "__id__": 25 }, "lightProbeInfo": { - "__id__": 50 + "__id__": 26 }, "postSettings": { - "__id__": 51 + "__id__": 27 }, "bakedWithStationaryMainLight": false, "bakedWithHighpLightmap": false diff --git a/settings/v2/packages/information.json b/settings/v2/packages/information.json index 22d4a15..2d81fe5 100644 --- a/settings/v2/packages/information.json +++ b/settings/v2/packages/information.json @@ -7,7 +7,7 @@ "enable": true, "customSplash": { "complete": true, - "form": "https://creator-api.cocos.com/api/form/show?sid=9ca4a815f78c9bcd01d30320bbf2f99b" + "form": "https://creator-api.cocos.com/api/form/show?sid=713f3d658f5b15c1ab406d720b890938" } }, "removeSplash": { @@ -15,8 +15,8 @@ "label": "removeSplash", "enable": true, "removeSplash": { - "complete": false, - "form": "https://creator-api.cocos.com/api/form/show?sid=9ca4a815f78c9bcd01d30320bbf2f99b" + "complete": true, + "form": "https://creator-api.cocos.com/api/form/show?sid=713f3d658f5b15c1ab406d720b890938" } } }