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

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

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