feat: 增加其他场景切换效果

This commit is contained in:
ifengzp
2024-09-23 09:08:09 +08:00
parent 1e5bcbe4fc
commit 340f65287e
126 changed files with 7938 additions and 21 deletions

View File

@@ -1,7 +0,0 @@
{
"ver": "1.0.1",
"uuid": "d1c25e17-c4ab-49e9-914a-946b38dc5365",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -180,7 +180,7 @@
"array": [
0,
0,
769.0305585605815,
452.93128617926146,
0,
0,
0,
@@ -284,7 +284,7 @@
"_id": "29zXboiXFBKoIV4PQ2liTe"
},
{
"__type__": "d3f4aqDF35LMbT4FoeX+msm",
"__type__": "9a422OgmqtKVbOR0Q+NC+Bk",
"_name": "",
"_objFlags": 0,
"node": {
@@ -306,7 +306,7 @@
"material": {
"__uuid__": "a869ac13-ffed-4334-b5df-1251273f2b07"
},
"_id": "baVBIwAahNp5q/xqS/DqnM"
"_id": "d3mJxgwgVFOaVDy9/WXkqz"
},
{
"__type__": "cc.Node",
@@ -674,9 +674,9 @@
"__id__": 2
},
"component": "",
"_componentId": "d3f4aqDF35LMbT4FoeX+msm",
"_componentId": "9a422OgmqtKVbOR0Q+NC+Bk",
"handler": "switchSceneByTransition",
"customEventData": ""
"customEventData": "5"
},
{
"__type__": "cc.Sprite",

View File

@@ -25,9 +25,9 @@ export default class SwitchScene extends cc.Component {
this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
}
switchSceneByTransition() {
switchSceneByTransition(event, value) {
cc.director.emit('setBackBtnVisibility', false);
cc.director.emit('switchSceneByTransition');
cc.director.emit('switchSceneByTransition', value);
}
playTransitionAnimation() {
@@ -78,7 +78,6 @@ export default class SwitchScene extends cc.Component {
let newMaterial = cc.MaterialVariant.create(this.material, this.bgSprite);
newMaterial.setProperty('texture', this.spriteFrame1._texture);
newMaterial.setProperty('texture2', this.spriteFrame2._texture);
newMaterial.setProperty('screenSize', new Float32Array([cc.winSize.width, cc.winSize.height]));
newMaterial.setProperty('time', 0.25);
this.spriteFrame1._texture.setFlipY(true);

View File

@@ -1,6 +1,6 @@
{
"ver": "1.0.5",
"uuid": "d3f4aa83-177e-4b31-b4f8-168797fa6b26",
"uuid": "9a4223a0-9aab-4a55-b391-d10f8d0be064",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,