diff --git a/assets/SceneGame.fire b/assets/SceneGame.fire index aa838fa..da6e324 100644 --- a/assets/SceneGame.fire +++ b/assets/SceneGame.fire @@ -62,7 +62,7 @@ }, { "__type__": "cc.Node", - "_name": "Canvas", + "_name": "SceneGame", "_objFlags": 0, "_parent": { "__id__": 1 @@ -78,16 +78,13 @@ "__id__": 8 }, { - "__id__": 12 + "__id__": 11 } ], "_active": true, "_components": [ { "__id__": 15 - }, - { - "__id__": 16 } ], "_prefab": null, @@ -140,7 +137,7 @@ }, { "__type__": "cc.Node", - "_name": "Main Camera", + "_name": "Camera", "_objFlags": 0, "_parent": { "__id__": 2 @@ -238,7 +235,7 @@ }, { "__type__": "cc.Node", - "_name": "background", + "_name": "Background", "_objFlags": 0, "_parent": { "__id__": 2 @@ -362,7 +359,7 @@ }, { "__type__": "cc.Node", - "_name": "title", + "_name": "Ball", "_objFlags": 0, "_parent": { "__id__": 2 @@ -375,152 +372,6 @@ }, { "__id__": 10 - }, - { - "__id__": 11 - } - ], - "_prefab": null, - "_opacity": 255, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 868.27, - "height": 188.8 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_trs": { - "__type__": "TypedArray", - "ctor": "Float64Array", - "array": [ - 0, - 785.6, - 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": "31f1bH7V69Ajr1iXhluMpTB" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 8 - }, - "_enabled": true, - "_materials": [ - { - "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" - } - ], - "_srcBlendFactor": 770, - "_dstBlendFactor": 771, - "_string": "给场景根节点挂上SceneAdapter\n就可以自动适配屏幕尺寸", - "_N$string": "给场景根节点挂上SceneAdapter\n就可以自动适配屏幕尺寸", - "_fontSize": 60, - "_lineHeight": 80, - "_enableWrapText": true, - "_N$file": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_batchAsBitmap": false, - "_styleFlags": 0, - "_underlineHeight": 0, - "_N$horizontalAlign": 0, - "_N$verticalAlign": 1, - "_N$fontFamily": "Arial", - "_N$overflow": 0, - "_N$cacheMode": 0, - "_id": "66thcHuG5Eir+Qyt6fdF15" - }, - { - "__type__": "cc.LabelOutline", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 8 - }, - "_enabled": true, - "_color": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_width": 4, - "_id": "a8HiFt9pBAEK25pfIPlINu" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 8 - }, - "_enabled": true, - "alignMode": 1, - "_target": null, - "_alignFlags": 1, - "_left": 0, - "_right": 0, - "_top": 80, - "_bottom": 0, - "_verticalCenter": 0, - "_horizontalCenter": 0, - "_isAbsLeft": true, - "_isAbsRight": true, - "_isAbsTop": true, - "_isAbsBottom": true, - "_isAbsHorizontalCenter": true, - "_isAbsVerticalCenter": true, - "_originalWidth": 0, - "_originalHeight": 0, - "_id": "90OgtuTF5IHKM7kXftU4Aw" - }, - { - "__type__": "cc.Node", - "_name": "Ball", - "_objFlags": 0, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 13 - }, - { - "__id__": 14 } ], "_prefab": null, @@ -576,7 +427,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 12 + "__id__": 8 }, "_enabled": true, "_materials": [ @@ -608,7 +459,7 @@ "_name": "", "_objFlags": 0, "node": { - "__id__": 12 + "__id__": 8 }, "_enabled": true, "alignMode": 1, @@ -630,6 +481,152 @@ "_originalHeight": 0, "_id": "deTRVuGE1MxpQx3RkM1BUz" }, + { + "__type__": "cc.Node", + "_name": "Title", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + }, + { + "__id__": 13 + }, + { + "__id__": 14 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 868.27, + "height": 188.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 785.6, + 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": "31f1bH7V69Ajr1iXhluMpTB" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "给场景根节点挂上SceneAdapter\n就可以自动适配屏幕尺寸", + "_N$string": "给场景根节点挂上SceneAdapter\n就可以自动适配屏幕尺寸", + "_fontSize": 60, + "_lineHeight": 80, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "66thcHuG5Eir+Qyt6fdF15" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_width": 4, + "_id": "a8HiFt9pBAEK25pfIPlINu" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 1, + "_left": 0, + "_right": 0, + "_top": 80, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "90OgtuTF5IHKM7kXftU4Aw" + }, { "__type__": "cc.Canvas", "_name": "", @@ -646,15 +643,5 @@ "_fitWidth": true, "_fitHeight": false, "_id": "6d1ebIvmZJPqKflif+HTsU" - }, - { - "__type__": "e1b90/rohdEk4SdmmEZANaD", - "_name": "", - "_objFlags": 0, - "node": { - "__id__": 2 - }, - "_enabled": true, - "_id": "0en81kQqBKYo6kXO1ykNRX" } ] \ No newline at end of file diff --git a/assets/Script/SceneAdapter.ts b/assets/Script/SceneAdapter.ts index 995be94..217be3c 100644 --- a/assets/Script/SceneAdapter.ts +++ b/assets/Script/SceneAdapter.ts @@ -21,5 +21,8 @@ export default class SceneAdapter extends cc.Component { node.scale = cc.winSize.width / node.width; } } + if (!cc.sys.isMobile && !node.getComponent(cc.Mask)) { + node.addComponent(cc.Mask); + } } } diff --git a/assets/Texture/白图.png b/assets/Texture/白图.png new file mode 100644 index 0000000..fa6376e Binary files /dev/null and b/assets/Texture/白图.png differ diff --git a/assets/Texture/白图.png.meta b/assets/Texture/白图.png.meta new file mode 100644 index 0000000..e5a23ea --- /dev/null +++ b/assets/Texture/白图.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "97364ef8-068d-4d5a-ae82-ab3241db27e5", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 2, + "height": 2, + "platformSettings": {}, + "subMetas": { + "白图": { + "ver": "1.0.6", + "uuid": "7aa032d0-85d6-4fcb-87a4-2f89173bfb8c", + "importer": "sprite-frame", + "rawTextureUuid": "97364ef8-068d-4d5a-ae82-ab3241db27e5", + "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