Commit 2b2c92e5 authored by 范雪寒's avatar 范雪寒

feat: 黑屏变透明

parent 0f68c0bc
...@@ -435,6 +435,7 @@ cc.Class({ ...@@ -435,6 +435,7 @@ cc.Class({
}, },
loadBundle(sceneName, version, bondleUrl) { loadBundle(sceneName, version, bondleUrl) {
this.showMask(); this.showMask();
this.showWaitingLetters();
cc.assetManager.loadBundle(bondleUrl, { version: version }, async (err, bundle) => { cc.assetManager.loadBundle(bondleUrl, { version: version }, async (err, bundle) => {
if (err) { if (err) {
return this.asyncDelayLog(err); return this.asyncDelayLog(err);
...@@ -464,7 +465,7 @@ cc.Class({ ...@@ -464,7 +465,7 @@ cc.Class({
mask.active = true; mask.active = true;
cc.tween(mask) cc.tween(mask)
.set({ opacity: 0 }) .set({ opacity: 0 })
.to(0.5, { opacity: 255 }) .to(0.5, { opacity: 0 })
.start(); .start();
}, },
...@@ -472,7 +473,7 @@ cc.Class({ ...@@ -472,7 +473,7 @@ cc.Class({
const mask = cc.find('middleLayer/mask'); const mask = cc.find('middleLayer/mask');
mask.stopAllActions(); mask.stopAllActions();
cc.tween(mask) cc.tween(mask)
.set({ opacity: 255 }) .set({ opacity: 0 })
.to(0.5, { opacity: 0 }) .to(0.5, { opacity: 0 })
.call(() => { .call(() => {
mask.active = false; mask.active = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment