diff --git a/assets/Scene/Coin_fly_to_wallet/Coin_fly_to_wallet.fire b/assets/Scene/Coin_fly_to_wallet/Coin_fly_to_wallet.fire index f4a3bb6..6ca07de 100644 --- a/assets/Scene/Coin_fly_to_wallet/Coin_fly_to_wallet.fire +++ b/assets/Scene/Coin_fly_to_wallet/Coin_fly_to_wallet.fire @@ -82,18 +82,21 @@ }, { "__id__": 18 + }, + { + "__id__": 26 } ], "_active": true, "_components": [ { - "__id__": 26 + "__id__": 31 }, { - "__id__": 27 + "__id__": 32 }, { - "__id__": 28 + "__id__": 33 } ], "_prefab": null, @@ -183,7 +186,7 @@ "array": [ 0, 0, - 452.93128617926146, + 443.4050067376326, 0, 0, 0, @@ -618,7 +621,7 @@ "_N$verticalAlign": 1, "_N$fontFamily": "Arial", "_N$overflow": 0, - "_N$cacheMode": 0, + "_N$cacheMode": 1, "_id": "6bbczas2JAU7UazJkCwTTi" }, { @@ -873,7 +876,7 @@ "_N$verticalAlign": 1, "_N$fontFamily": "Arial", "_N$overflow": 0, - "_N$cacheMode": 0, + "_N$cacheMode": 1, "_id": "83cCaBpPxFW65Tz3TleSQe" }, { @@ -1260,6 +1263,217 @@ "handler": "playAnim", "customEventData": "" }, + { + "__type__": "cc.Node", + "_name": "back", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 27 + }, + { + "__id__": 28 + }, + { + "__id__": 29 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 153, + "b": 40, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 180 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -603, + 307, + 0, + 0, + 0, + 0, + 1, + 0.4, + 0.4, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "d43LpbJbpEHYvYDn0sRXrQ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 26 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "714299b3-6ffd-4ba5-a166-296176854549" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "b6YNh/03pP1L3TMThZLzqH" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 26 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 9, + "_left": 32, + "_right": 0, + "_top": 32, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "91xaq7InpJNZkGZEWUuQvF" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 26 + }, + "_enabled": true, + "_normalMaterial": { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + }, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [ + { + "__id__": 30 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": null, + "_id": "561kUZytdBqZOCaHSX7016" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "e54affUF7NGeZytNFcwLhOd", + "handler": "backToHome", + "customEventData": "" + }, { "__type__": "cc.Canvas", "_name": "", diff --git a/assets/Scene/Coin_fly_to_wallet/Coin_fly_to_wallet.ts b/assets/Scene/Coin_fly_to_wallet/Coin_fly_to_wallet.ts index 2faf2ff..888546d 100644 --- a/assets/Scene/Coin_fly_to_wallet/Coin_fly_to_wallet.ts +++ b/assets/Scene/Coin_fly_to_wallet/Coin_fly_to_wallet.ts @@ -90,4 +90,8 @@ export default class Coin_fly_to_wallet extends cc.Component { } return points; } + + backToHome() { + cc.director.loadScene('Home'); + } } diff --git a/assets/Scene/Home.fire b/assets/Scene/Home.fire deleted file mode 100755 index baea0f6..0000000 --- a/assets/Scene/Home.fire +++ /dev/null @@ -1,287 +0,0 @@ -[ - { - "__type__": "cc.SceneAsset", - "_name": "", - "_objFlags": 0, - "_native": "", - "scene": { - "__id__": 1 - } - }, - { - "__type__": "cc.Scene", - "_objFlags": 0, - "_parent": null, - "_children": [ - { - "__id__": 2 - } - ], - "_active": true, - "_components": [], - "_prefab": null, - "_opacity": 255, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 0, - "height": 0 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_trs": { - "__type__": "TypedArray", - "ctor": "Float64Array", - "array": [ - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1 - ] - }, - "_is3DNode": true, - "_groupIndex": 0, - "groupIndex": 0, - "autoReleaseAssets": false, - "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49" - }, - { - "__type__": "cc.Node", - "_name": "Canvas", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [ - { - "__id__": 3 - } - ], - "_active": true, - "_components": [ - { - "__id__": 5 - }, - { - "__id__": 6 - }, - { - "__id__": 7 - } - ], - "_prefab": null, - "_opacity": 255, - "_color": { - "__type__": "cc.Color", - "r": 252, - "g": 252, - "b": 252, - "a": 255 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 1334, - "height": 750 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_trs": { - "__type__": "TypedArray", - "ctor": "Float64Array", - "array": [ - 667, - 375, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1 - ] - }, - "_eulerAngles": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_skewX": 0, - "_skewY": 0, - "_is3DNode": false, - "_groupIndex": 0, - "groupIndex": 0, - "_id": "a286bbGknJLZpRpxROV6M94" - }, - { - "__type__": "cc.Node", - "_name": "Main Camera", - "_objFlags": 0, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 4 - } - ], - "_prefab": null, - "_opacity": 255, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 0, - "height": 0 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_trs": { - "__type__": "TypedArray", - "ctor": "Float64Array", - "array": [ - 0, - 0, - 452.93128617926146, - 0, - 0, - 0, - 1, - 1, - 1, - 1 - ] - }, - "_eulerAngles": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_skewX": 0, - "_skewY": 0, - "_is3DNode": false, - "_groupIndex": 0, - "groupIndex": 0, - "_id": "5asNwYHHZD1rkaP+0fDn4b" - }, - { - "__type__": "cc.Camera", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 3 - }, - "_enabled": true, - "_cullingMask": 4294967295, - "_clearFlags": 7, - "_backgroundColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_depth": -1, - "_zoomRatio": 1, - "_targetTexture": null, - "_fov": 60, - "_orthoSize": 10, - "_nearClip": 1, - "_farClip": 4096, - "_ortho": true, - "_rect": { - "__type__": "cc.Rect", - "x": 0, - "y": 0, - "width": 1, - "height": 1 - }, - "_renderStages": 1, - "_alignWithScreen": true, - "_id": "b99yu4HWREH4Qoiccp2gXV" - }, - { - "__type__": "cc.Canvas", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 2 - }, - "_enabled": true, - "_designResolution": { - "__type__": "cc.Size", - "width": 1334, - "height": 750 - }, - "_fitWidth": false, - "_fitHeight": true, - "_id": "40zd8HWWlDfoW8KOeIfAd2" - }, - { - "__type__": "e1b90/rohdEk4SdmmEZANaD", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 2 - }, - "_enabled": true, - "_id": "10XBeOwdlMjY6IKW4gHw0V" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 2 - }, - "_enabled": true, - "alignMode": 1, - "_target": null, - "_alignFlags": 45, - "_left": 0, - "_right": 0, - "_top": 0, - "_bottom": 0, - "_verticalCenter": 0, - "_horizontalCenter": 0, - "_isAbsLeft": true, - "_isAbsRight": true, - "_isAbsTop": true, - "_isAbsBottom": true, - "_isAbsHorizontalCenter": true, - "_isAbsVerticalCenter": true, - "_originalWidth": 0, - "_originalHeight": 0, - "_id": "78gApOlVZPNo6zKoTsIRiq" - } -] \ No newline at end of file diff --git a/assets/Scene/Home.meta b/assets/Scene/Home.meta new file mode 100644 index 0000000..ba9f6ed --- /dev/null +++ b/assets/Scene/Home.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.0.1", + "uuid": "c1dd20f1-3da8-4754-a7a8-bc1fbc91cc8a", + "isSubpackage": false, + "subpackageName": "", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Home/Home.fire b/assets/Scene/Home/Home.fire new file mode 100755 index 0000000..3376f76 --- /dev/null +++ b/assets/Scene/Home/Home.fire @@ -0,0 +1,1012 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": false, + "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + }, + { + "__id__": 8 + } + ], + "_active": true, + "_components": [ + { + "__id__": 22 + }, + { + "__id__": 23 + }, + { + "__id__": 24 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 252, + "b": 252, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 667, + 375, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a286bbGknJLZpRpxROV6M94" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 443.4050067376326, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5asNwYHHZD1rkaP+0fDn4b" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "b99yu4HWREH4Qoiccp2gXV" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + }, + { + "__id__": 7 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 27, + "g": 38, + "b": 46, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "63nS6WC49G1rCQ4X+4Isdc" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "0f531716-c3f6-47e8-be65-4248dfca78d8" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "45xwmyJhFERrqNops8469+" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 2, + "_originalHeight": 2, + "_id": "d7qqNCu/pPJrQ4wXi4qonT" + }, + { + "__type__": "cc.Node", + "_name": "scrollview", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 9 + }, + { + "__id__": 15 + } + ], + "_active": true, + "_components": [ + { + "__id__": 20 + }, + { + "__id__": 13 + }, + { + "__id__": 21 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 91, + "g": 152, + "b": 155, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 800, + "height": 600 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "30bhBLmzhAnpAmsXS0dQVd" + }, + { + "__type__": "cc.Node", + "_name": "scrollBar", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [ + { + "__id__": 10 + } + ], + "_active": true, + "_components": [ + { + "__id__": 12 + }, + { + "__id__": 18 + }, + { + "__id__": 19 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 600 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 400, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "303ZahgeJC87OFNk5RpSqr" + }, + { + "__type__": "cc.Node", + "_name": "bar", + "_objFlags": 0, + "_parent": { + "__id__": 9 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 10, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "05O8YKCNVMgZDAaVXw/mTx" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5c3bb932-6c3c-468f-88a9-c8c61d458641" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "d4IzK/lThDZKXUXrpPAY6d" + }, + { + "__type__": "cc.Scrollbar", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_scrollView": { + "__id__": 13 + }, + "_touching": false, + "_opacity": 255, + "enableAutoHide": true, + "autoHideTime": 1, + "_N$handle": { + "__id__": 11 + }, + "_N$direction": 1, + "_id": "b8lCZUknlIIJDig5DO+g6p" + }, + { + "__type__": "cc.ScrollView", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "horizontal": false, + "vertical": true, + "inertia": true, + "brake": 0.75, + "elastic": true, + "bounceDuration": 0.23, + "scrollEvents": [], + "cancelInnerEvents": true, + "_N$content": { + "__id__": 14 + }, + "content": { + "__id__": 14 + }, + "_N$horizontalScrollBar": null, + "_N$verticalScrollBar": { + "__id__": 12 + }, + "_id": "47dPO6Bd5D0YCp9IW6FJG7" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 800, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 300, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "18quKcXo5CramSuXLY4CST" + }, + { + "__type__": "cc.Node", + "_name": "view", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [ + { + "__id__": 14 + } + ], + "_active": true, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 800, + "height": 600 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "65zeOBvuNP/7UWceB8jIBi" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 0, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "28tOvArNpBeqj40MPS7NZi" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 14 + }, + "_enabled": true, + "_layoutSize": { + "__type__": "cc.Size", + "width": 800, + "height": 0 + }, + "_resize": 1, + "_N$layoutType": 2, + "_N$padding": 0, + "_N$cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_N$startAxis": 0, + "_N$paddingLeft": 0, + "_N$paddingRight": 0, + "_N$paddingTop": 20, + "_N$paddingBottom": 20, + "_N$spacingX": 0, + "_N$spacingY": 20, + "_N$verticalDirection": 1, + "_N$horizontalDirection": 0, + "_N$affectedByScale": false, + "_id": "beWDCQSMNOCa5QhAU0rcmU" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 37, + "_left": 350.07654921020657, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 237, + "_id": "99QVVt39BJLaQDzkJaxevk" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5fe5dcaa-b513-4dc5-a166-573627b3a159" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "a2KVIXb6lFMqDCT+OA+W3G" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "deBOTETUZDvKimcdPZu01c" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 18, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "4dfeszqQhHFJ2XKq0g+0is" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_fitWidth": false, + "_fitHeight": true, + "_id": "40zd8HWWlDfoW8KOeIfAd2" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "78gApOlVZPNo6zKoTsIRiq" + }, + { + "__type__": "e1b90/rohdEk4SdmmEZANaD", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "scrollContent": { + "__id__": 14 + }, + "scrollItemPrefab": { + "__uuid__": "3c27b0d3-bf66-47a2-b6a8-09ca24132944" + }, + "_id": "b6rKGs6AhPW6YpRPz4nSN6" + } +] \ No newline at end of file diff --git a/assets/Scene/Home.fire.meta b/assets/Scene/Home/Home.fire.meta similarity index 100% rename from assets/Scene/Home.fire.meta rename to assets/Scene/Home/Home.fire.meta diff --git a/assets/Scene/Home/Home.ts b/assets/Scene/Home/Home.ts new file mode 100644 index 0000000..f1d1759 --- /dev/null +++ b/assets/Scene/Home/Home.ts @@ -0,0 +1,39 @@ +const {ccclass, property} = cc._decorator; +enum sceneList { + "Infinite_bg_scroll" = "背景无限滚动", + "Joystick" = "遥控杆", + "Coin_fly_to_wallet" = "金币落袋" +} + +@ccclass +export default class Home extends cc.Component { + @property(cc.Node) + scrollContent: cc.Node = null; + @property(cc.Prefab) + scrollItemPrefab: cc.Prefab = null; + + onLoad() { + this.initScrollItem(); + } + + initScrollItem() { + for (let key in sceneList) { + let scrollItem = cc.instantiate(this.scrollItemPrefab); + + scrollItem.getChildByName("label").getComponent(cc.Label).string = sceneList[key]; + scrollItem.on(cc.Node.EventType.TOUCH_END, () => { + cc.tween(scrollItem) + .to(0.1, { scale: 1.05 }) + .to(0.1, { scale: 1 }) + .start(); + this.loadScene(key); + }, this); + + this.scrollContent.addChild(scrollItem); + } + } + + loadScene(key) { + cc.director.loadScene(key); + } +} diff --git a/assets/Script/Home.ts.meta b/assets/Scene/Home/Home.ts.meta similarity index 100% rename from assets/Script/Home.ts.meta rename to assets/Scene/Home/Home.ts.meta diff --git a/assets/Scene/Home/ScrollItemPrefab.prefab b/assets/Scene/Home/ScrollItemPrefab.prefab new file mode 100644 index 0000000..80235ad --- /dev/null +++ b/assets/Scene/Home/ScrollItemPrefab.prefab @@ -0,0 +1,230 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "item", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 6 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 600, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -50, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "label", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 42.84 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_useOriginalSize": false, + "_string": "", + "_N$string": "", + "_fontSize": 34, + "_lineHeight": 34, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "3c27b0d3-bf66-47a2-b6a8-09ca24132944" + }, + "fileId": "5fsPWB4+dB6ofv9Y3zSWuP", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "847da4e2-76e3-4ff9-9314-713438721842" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "3c27b0d3-bf66-47a2-b6a8-09ca24132944" + }, + "fileId": "42ek6+2rFCX6JVYDIZhLy9", + "sync": false + } +] \ No newline at end of file diff --git a/assets/Scene/Home/ScrollItemPrefab.prefab.meta b/assets/Scene/Home/ScrollItemPrefab.prefab.meta new file mode 100644 index 0000000..ed8a030 --- /dev/null +++ b/assets/Scene/Home/ScrollItemPrefab.prefab.meta @@ -0,0 +1,8 @@ +{ + "ver": "1.2.6", + "uuid": "3c27b0d3-bf66-47a2-b6a8-09ca24132944", + "optimizationPolicy": "AUTO", + "asyncLoadAssets": false, + "readonly": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Infinite_bg_scroll/Infinite_bg_scroll.fire b/assets/Scene/Infinite_bg_scroll/Infinite_bg_scroll.fire index 9aef75a..9973eb6 100644 --- a/assets/Scene/Infinite_bg_scroll/Infinite_bg_scroll.fire +++ b/assets/Scene/Infinite_bg_scroll/Infinite_bg_scroll.fire @@ -79,18 +79,21 @@ }, { "__id__": 17 + }, + { + "__id__": 21 } ], "_active": true, "_components": [ { - "__id__": 21 + "__id__": 26 }, { - "__id__": 22 + "__id__": 27 }, { - "__id__": 23 + "__id__": 28 } ], "_prefab": null, @@ -180,7 +183,7 @@ "array": [ 0, 0, - 452.93128617926146, + 443.4050067376326, 0, 0, 0, @@ -889,6 +892,217 @@ "_originalHeight": 0, "_id": "adPsMOv+RCV71hnLv17WyO" }, + { + "__type__": "cc.Node", + "_name": "back", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + }, + { + "__id__": 23 + }, + { + "__id__": 25 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 153, + "b": 40, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 180 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -603, + 307, + 0, + 0, + 0, + 0, + 1, + 0.4, + 0.4, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "86f6s/HCxOQ6VrJc8vemso" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "714299b3-6ffd-4ba5-a166-296176854549" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "4dAryXjoJKaJzvwvrhVEhF" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_normalMaterial": { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + }, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [ + { + "__id__": 24 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": null, + "_id": "bd4IWeYKdNQLHLq8GprTxL" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "58a09IoQgtOp59qWxU/tUY+", + "handler": "backToHome", + "customEventData": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 9, + "_left": 32, + "_right": 0, + "_top": 32, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "07jtcBXohLW6fdpG3FAM0o" + }, { "__type__": "cc.Canvas", "_name": "", diff --git a/assets/Scene/Infinite_bg_scroll/Infinite_bg_scroll.ts b/assets/Scene/Infinite_bg_scroll/Infinite_bg_scroll.ts index ec84bff..edf18d6 100644 --- a/assets/Scene/Infinite_bg_scroll/Infinite_bg_scroll.ts +++ b/assets/Scene/Infinite_bg_scroll/Infinite_bg_scroll.ts @@ -1,21 +1,25 @@ -const {ccclass, property} = cc._decorator; +const { ccclass, property } = cc._decorator; @ccclass export default class Infinite_bg_scroll extends cc.Component { - @property(cc.Node) - bg1: cc.Node = null; - @property(cc.Node) - bg2: cc.Node = null; + @property(cc.Node) + bg1: cc.Node = null; + @property(cc.Node) + bg2: cc.Node = null; - speed: number = 500; - update(dt) { - const temp = dt * this.speed; - if (this.bg2.x - temp <= 0) { - this.bg1.x = this.bg2.x; - this.bg2.x = this.bg1.x + this.bg1.width; - } - - this.bg1.x -= temp; - this.bg2.x -= temp; + speed: number = 500; + update(dt) { + const temp = dt * this.speed; + if (this.bg2.x - temp <= 0) { + this.bg1.x = this.bg2.x; + this.bg2.x = this.bg1.x + this.bg1.width; } + + this.bg1.x -= temp; + this.bg2.x -= temp; + } + + backToHome() { + cc.director.loadScene('Home'); + } } diff --git a/assets/Scene/Joystick.meta b/assets/Scene/Joystick.meta new file mode 100644 index 0000000..665a0e5 --- /dev/null +++ b/assets/Scene/Joystick.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.0.1", + "uuid": "34276e3a-c43f-46cc-ac2f-d177e917e508", + "isSubpackage": false, + "subpackageName": "", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Joystick/Joystick.fire b/assets/Scene/Joystick/Joystick.fire new file mode 100644 index 0000000..d436737 --- /dev/null +++ b/assets/Scene/Joystick/Joystick.fire @@ -0,0 +1,959 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": false, + "_id": "ed5f8ae9-0324-4c45-9f5c-00d7004a6386" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + }, + { + "__id__": 8 + }, + { + "__id__": 10 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 21 + }, + { + "__id__": 22 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 667, + 375, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 443.4050067376326, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + }, + { + "__id__": 7 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 27, + "g": 38, + "b": 46, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "86P2a3S7BAtpwc+yRXLwN8" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "70c8ed66-07e4-42ef-81f5-a3d3ecf55960" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "99wQPBVCZFt4dIT+/2pSzE" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 2, + "_originalHeight": 2, + "_id": "24AL1SFntMBIn5wafNUzb2" + }, + { + "__type__": "cc.Node", + "_name": "star", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5cPCOXj79LKIPdeHAGezoX" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a4637c7b-9210-47e8-ac88-71fd21356eab" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "fcVe6gyuhM74kUeVC0iSxq" + }, + { + "__type__": "cc.Node", + "_name": "joystick", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 11 + } + ], + "_active": true, + "_components": [ + { + "__id__": 13 + }, + { + "__id__": 14 + }, + { + "__id__": 15 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 190, + "height": 191 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 488.08400000000006, + -270.88, + 0, + 0, + 0, + 0, + 1, + 0.6, + 0.6, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "37wfMXb0lKS6eqjFoR8Nmq" + }, + { + "__type__": "cc.Node", + "_name": "control_dot", + "_objFlags": 0, + "_parent": { + "__id__": 10 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 130, + "height": 130 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "4d4pB5nthDhJ6ssFXE0Rsk" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "97c8ffb4-482f-4ee2-bd89-ed0270fc426c" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "e8NdxTpdVPGaafVeAX7+k0" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "3388066c-0517-4037-a004-5bfcf4f35390" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "4ebcMC53BCpIHXEZf4ZNCZ" + }, + { + "__type__": "ea7dbuck+9ApJnQTq/C4vpv", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "controlDot": { + "__id__": 11 + }, + "joystick": { + "__id__": 10 + }, + "movableStar": { + "__id__": 8 + }, + "_id": "9dPRIWPp5CfLVTO1YtxnWq" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 36, + "_left": 0, + "_right": 121.916, + "_top": 0, + "_bottom": 46.81999999999999, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "a7UA7z1GdOLpJ6QjJ2fdEI" + }, + { + "__type__": "cc.Node", + "_name": "back", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 18 + }, + { + "__id__": 19 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 153, + "b": 40, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 180 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -603, + 307, + 0, + 0, + 0, + 0, + 1, + 0.4, + 0.4, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "73y+C9V1hOZYIGA0QFSYO5" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "714299b3-6ffd-4ba5-a166-296176854549" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "93aOWl48RIwI8jbBfT+yJ2" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 9, + "_left": 32, + "_right": 0, + "_top": 32, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "1fNKsixQtPhox/BnQlUVQu" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "_normalMaterial": { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + }, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [ + { + "__id__": 20 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": null, + "_id": "33Hg2eaMBHNZXL9xdowM07" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 10 + }, + "component": "", + "_componentId": "ea7dbuck+9ApJnQTq/C4vpv", + "handler": "backToHome", + "customEventData": "" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_fitWidth": false, + "_fitHeight": true, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + } +] \ No newline at end of file diff --git a/assets/Scene/Joystick/Joystick.fire.meta b/assets/Scene/Joystick/Joystick.fire.meta new file mode 100644 index 0000000..93a5f95 --- /dev/null +++ b/assets/Scene/Joystick/Joystick.fire.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.2.6", + "uuid": "ed5f8ae9-0324-4c45-9f5c-00d7004a6386", + "asyncLoadAssets": false, + "autoReleaseAssets": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Joystick/Joystick.ts b/assets/Scene/Joystick/Joystick.ts new file mode 100644 index 0000000..eed9e94 --- /dev/null +++ b/assets/Scene/Joystick/Joystick.ts @@ -0,0 +1,66 @@ +const { ccclass, property } = cc._decorator; + +@ccclass +export default class Roller extends cc.Component { + @property({ type: cc.Node, tooltip: '操控杆的控制点' }) + controlDot: cc.Node = null; + @property({ type: cc.Node, tooltip: '操控杆' }) + joystick: cc.Node = null; + @property(cc.Node) + movableStar: cc.Node = null; + + movableFlag: boolean = false; + radian: number = 0; + speed: number = 150; + onLoad() { + this.initTouchEvent(); + } + + backToHome() { + cc.director.loadScene("Home"); + } + + initTouchEvent() { + this.node.on(cc.Node.EventType.TOUCH_START, this.touchStartEvent, this); + this.node.on(cc.Node.EventType.TOUCH_MOVE, this.touchMoveEvent, this); + this.node.on(cc.Node.EventType.TOUCH_END, this.touchEndEvent, this); + this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.touchEndEvent, this); + } + + touchStartEvent(event) { + let touchPos = this.node.convertToNodeSpaceAR(event.getLocation()); + const distance = touchPos.len(); + const radius = this.node.width / 2 - this.controlDot.width / 2; + + // 以x轴正方向为基准,计算偏移量 + this.radian = cc.v2(1, 0).signAngle(touchPos); + const offsetX = Math.cos(this.radian) * radius; + const offsetY = Math.sin(this.radian) * radius; + this.controlDot.setPosition(radius > distance ? touchPos : cc.v2(offsetX, offsetY)); + + this.movableFlag = true; + } + + touchMoveEvent(event) { + let touchPos: cc.Vec2 = this.node.convertToNodeSpaceAR(event.getLocation()); + const distance = touchPos.len(); + const radius = this.node.width / 2 - this.controlDot.width / 2; + + this.radian = cc.v2(1, 0).signAngle(touchPos); + const offsetX = Math.cos(this.radian) * radius; + const offsetY = Math.sin(this.radian) * radius; + + this.controlDot.setPosition(radius > distance ? touchPos : cc.v2(offsetX, offsetY)); + } + + touchEndEvent() { + this.movableFlag = false; + this.controlDot.setPosition(cc.v2(0, 0)); + } + + update(dt) { + if (!this.movableFlag) return; + this.movableStar.x += Math.cos(this.radian) * dt * this.speed; + this.movableStar.y += Math.sin(this.radian) * dt * this.speed; + } +} diff --git a/assets/Scene/Joystick/Joystick.ts.meta b/assets/Scene/Joystick/Joystick.ts.meta new file mode 100644 index 0000000..9aba7c8 --- /dev/null +++ b/assets/Scene/Joystick/Joystick.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.0.5", + "uuid": "ea7dbb9c-93ef-40a4-99d0-4eafc2e2fa6f", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Joystick/Texture.meta b/assets/Scene/Joystick/Texture.meta new file mode 100644 index 0000000..0bb4486 --- /dev/null +++ b/assets/Scene/Joystick/Texture.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.0.1", + "uuid": "e7fe025a-c2d1-495f-b24b-61dbdd0c820a", + "isSubpackage": false, + "subpackageName": "", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Joystick/Texture/dot.png b/assets/Scene/Joystick/Texture/dot.png new file mode 100644 index 0000000..f6a74a1 Binary files /dev/null and b/assets/Scene/Joystick/Texture/dot.png differ diff --git a/assets/Scene/Joystick/Texture/dot.png.meta b/assets/Scene/Joystick/Texture/dot.png.meta new file mode 100644 index 0000000..a20a470 --- /dev/null +++ b/assets/Scene/Joystick/Texture/dot.png.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "eec2275b-56fa-4361-9e95-e4d45eb0bbb0", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 130, + "height": 130, + "platformSettings": {}, + "subMetas": { + "dot": { + "ver": "1.0.4", + "uuid": "97c8ffb4-482f-4ee2-bd89-ed0270fc426c", + "rawTextureUuid": "eec2275b-56fa-4361-9e95-e4d45eb0bbb0", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 130, + "height": 130, + "rawWidth": 130, + "rawHeight": 130, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Joystick/Texture/joystick.png b/assets/Scene/Joystick/Texture/joystick.png new file mode 100644 index 0000000..099c857 Binary files /dev/null and b/assets/Scene/Joystick/Texture/joystick.png differ diff --git a/assets/Scene/Joystick/Texture/joystick.png.meta b/assets/Scene/Joystick/Texture/joystick.png.meta new file mode 100644 index 0000000..05b9d8e --- /dev/null +++ b/assets/Scene/Joystick/Texture/joystick.png.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "40ee4e08-4c23-45e5-965b-abe45cf3e599", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 190, + "height": 191, + "platformSettings": {}, + "subMetas": { + "joystick": { + "ver": "1.0.4", + "uuid": "3388066c-0517-4037-a004-5bfcf4f35390", + "rawTextureUuid": "40ee4e08-4c23-45e5-965b-abe45cf3e599", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 190, + "height": 191, + "rawWidth": 190, + "rawHeight": 191, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Joystick/Texture/singleColor.png b/assets/Scene/Joystick/Texture/singleColor.png new file mode 100644 index 0000000..fa6376e Binary files /dev/null and b/assets/Scene/Joystick/Texture/singleColor.png differ diff --git a/assets/Scene/Joystick/Texture/singleColor.png.meta b/assets/Scene/Joystick/Texture/singleColor.png.meta new file mode 100644 index 0000000..f36476e --- /dev/null +++ b/assets/Scene/Joystick/Texture/singleColor.png.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "0b157175-c507-4d3d-9128-1cb4d45451f1", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 2, + "height": 2, + "platformSettings": {}, + "subMetas": { + "singleColor": { + "ver": "1.0.4", + "uuid": "70c8ed66-07e4-42ef-81f5-a3d3ecf55960", + "rawTextureUuid": "0b157175-c507-4d3d-9128-1cb4d45451f1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 2, + "height": 2, + "rawWidth": 2, + "rawHeight": 2, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Texture/star.png b/assets/Scene/Joystick/Texture/star.png similarity index 100% rename from assets/Texture/star.png rename to assets/Scene/Joystick/Texture/star.png diff --git a/assets/Texture/star.png.meta b/assets/Scene/Joystick/Texture/star.png.meta similarity index 100% rename from assets/Texture/star.png.meta rename to assets/Scene/Joystick/Texture/star.png.meta diff --git a/assets/Script.meta b/assets/Script.meta deleted file mode 100755 index 7259168..0000000 --- a/assets/Script.meta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "ver": "1.0.1", - "uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934", - "isGroup": false, - "subMetas": {} -} \ No newline at end of file diff --git a/assets/Script/Home.ts b/assets/Script/Home.ts deleted file mode 100644 index 0673b72..0000000 --- a/assets/Script/Home.ts +++ /dev/null @@ -1,6 +0,0 @@ -const {ccclass, property} = cc._decorator; - -@ccclass -export default class Home extends cc.Component { - -} diff --git a/assets/Texture/back.png b/assets/Texture/back.png new file mode 100644 index 0000000..8c9fb2f Binary files /dev/null and b/assets/Texture/back.png differ diff --git a/assets/Texture/back.png.meta b/assets/Texture/back.png.meta new file mode 100644 index 0000000..5aa2df3 --- /dev/null +++ b/assets/Texture/back.png.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "e39bafdb-a71e-4fd7-8450-1fa436d9c50a", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 200, + "height": 200, + "platformSettings": {}, + "subMetas": { + "back": { + "ver": "1.0.4", + "uuid": "714299b3-6ffd-4ba5-a166-296176854549", + "rawTextureUuid": "e39bafdb-a71e-4fd7-8450-1fa436d9c50a", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 3, + "offsetY": 3, + "trimX": 23, + "trimY": 7, + "width": 160, + "height": 180, + "rawWidth": 200, + "rawHeight": 200, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Texture/btn.png b/assets/Texture/btn.png new file mode 100644 index 0000000..7297b38 Binary files /dev/null and b/assets/Texture/btn.png differ diff --git a/assets/Texture/btn.png.meta b/assets/Texture/btn.png.meta new file mode 100644 index 0000000..1ff9e39 --- /dev/null +++ b/assets/Texture/btn.png.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "2451b5cb-c23f-44c9-99c7-49da350ca9b1", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 345, + "height": 132, + "platformSettings": {}, + "subMetas": { + "btn": { + "ver": "1.0.4", + "uuid": "847da4e2-76e3-4ff9-9314-713438721842", + "rawTextureUuid": "2451b5cb-c23f-44c9-99c7-49da350ca9b1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0.5, + "trimX": 0, + "trimY": 0, + "width": 345, + "height": 131, + "rawWidth": 345, + "rawHeight": 132, + "borderTop": 61.5, + "borderBottom": 59.5, + "borderLeft": 114, + "borderRight": 127, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Texture/singleColor.png b/assets/Texture/singleColor.png new file mode 100644 index 0000000..fa6376e Binary files /dev/null and b/assets/Texture/singleColor.png differ diff --git a/assets/Texture/singleColor.png.meta b/assets/Texture/singleColor.png.meta new file mode 100644 index 0000000..d2f32f4 --- /dev/null +++ b/assets/Texture/singleColor.png.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "8e1ba190-72f0-4014-9bd1-03fd704b1ae2", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 2, + "height": 2, + "platformSettings": {}, + "subMetas": { + "singleColor": { + "ver": "1.0.4", + "uuid": "0f531716-c3f6-47e8-be65-4248dfca78d8", + "rawTextureUuid": "8e1ba190-72f0-4014-9bd1-03fd704b1ae2", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 2, + "height": 2, + "rawWidth": 2, + "rawHeight": 2, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/settings/builder.json b/settings/builder.json index 09f915c..b2dbd4e 100755 --- a/settings/builder.json +++ b/settings/builder.json @@ -9,5 +9,35 @@ "packageName": "org.cocos2d.helloworld", "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", "title": "hello_world", - "webOrientation": "auto" -} \ No newline at end of file + "webOrientation": "landscape", + "includeSDKBox": false, + "inlineSpriteFrames": true, + "inlineSpriteFrames_native": true, + "mergeStartScene": false, + "optimizeHotUpdate": false, + "md5Cache": true, + "encryptJs": true, + "xxteaKey": "836ed475-2f76-41", + "zipCompressJs": true, + "fb-instant-games": {}, + "android": { + "packageName": "org.cocos2d.helloworld" + }, + "ios": { + "packageName": "org.cocos2d.helloworld" + }, + "mac": { + "packageName": "org.cocos2d.helloworld" + }, + "win32": {}, + "android-instant": { + "REMOTE_SERVER_ROOT": "", + "host": "", + "packageName": "org.cocos2d.helloworld", + "pathPattern": "", + "recordPath": "", + "scheme": "https", + "skipRecord": false + }, + "appBundle": false +} diff --git a/settings/project.json b/settings/project.json index a53b837..2ad4142 100755 --- a/settings/project.json +++ b/settings/project.json @@ -23,7 +23,7 @@ "height": 640, "width": 960 }, - "last-module-event-record-time": 0, + "last-module-event-record-time": 1585747006376, "assets-sort-type": "name", "facebook": { "appID": "", @@ -34,5 +34,6 @@ "live": { "enable": false } - } + }, + "start-scene": "current" }