Commit 6c758790 authored by 李维's avatar 李维

修改加载页面的显示隐藏动画

parent 4d759dd3
......@@ -46626,7 +46626,7 @@
"_spriteFrame": {
"__uuid__": "8117c75d-0a4b-4e00-8337-908519edffff"
},
"_type": 0,
"_type": 1,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
......@@ -46713,7 +46713,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80.06,
"width": 57.81,
"height": 50.4
},
"_anchorPoint": {
......@@ -46765,8 +46765,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "12%",
"_N$string": "12%",
"_string": "0%",
"_N$string": "0%",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
......
......@@ -284,11 +284,10 @@ export default class NewClass extends middleLayerBase {
console.log('goldAnim: ', goldAnim);
await asyncPlayDragonBoneAnimation(goldAnim, 'newAnimation', 1, null);
disappearAnim(goldAnim, 1);
disappearAnim(finishLayer, 1, () => {
finishLayer.active = false;
});
goldAnim.active = false;
finishLayer.active = false;
finishLayer.removeAllChildren()
cb&&cb();
}
......
......@@ -203,11 +203,12 @@ export abstract class middleLayerBase extends cc.Component {
this.showPreloadWaiting();
cc.audioEngine.stopAll();
this.setLoadingProgressBar(0);
cc.assetManager.loadBundle(bondleUrl, { version: version }, async (err, bundle) => {
bundle.loadScene(sceneName, null, (finish, total, item) => {
this.setLoadingProgressBar(Math.floor(finish / total * 100));
}, (err, scene) => {
this.setLoadingProgressBar(0);
this.courseOpenTimeStamp = Date.now();
cc.director.runScene(scene, null, () => {
......
......@@ -148,24 +148,28 @@ export function getSpriteFrimeByUrl(url, cb) {
export function appearAnim(node, time=1, callback=null) {
node.active = true;
node.opacity = 0
cc.tween(node)
.to(time, {opacity: 255}, {easing: "cubicIn"})
.call(() => {
callback && callback();
})
.start();
node.opacity = 255;
callback && callback()
// cc.tween(node)
// .to(time, {opacity: 255}, {easing: "cubicIn"})
// .call(() => {
// callback && callback();
// })
// .start();
}
export function disappearAnim(node, time=1, callback=null) {
node.active = true;
node.opacity = 255
cc.tween(node)
.to(time, {opacity: 0}, {easing: "cubicOut"})
.call(() => {
callback && callback();
})
.start();
node.opacity = 255;
node.active = false;
callback && callback()
// 禁用渐变动画 防止视频模板产生残影
// cc.tween(node)
// .to(time, {opacity: 0}, {easing: "cubicOut"})
// .call(() => {
// callback && callback();
// })
// .start();
}
export function getSprNode(resName) {
......
......@@ -28,8 +28,8 @@
"rawHeight": 102,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderLeft": 66,
"borderRight": 66,
"subMetas": {}
}
}
......
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