mirror of
https://github.com/ifengzp/cocos-awesome.git
synced 2025-10-09 08:36:03 +00:00
feat: 增加其他场景切换效果
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "d1c25e17-c4ab-49e9-914a-946b38dc5365",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
@@ -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",
|
||||
|
@@ -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);
|
@@ -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,
|
Reference in New Issue
Block a user