Commit 5529bfa7 authored by zjz1994's avatar zjz1994

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into 草地

# Conflicts:
#	egret/resource/default.res.json
合并loading,调整引导
parents c38b861d fd03dba3
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
background-color: #000; background-color: #000;
background-size: 100%; background-size: 100%;
background-position: center; background-position: center;
background-image: url("https://yun.duiba.com.cn/db_games/activity/game/0327/startscenebg.jpg"); background-image: url("https://yun.duiba.com.cn/db_games/activity/game/1588905039/resource/assets/startscenebg.jpg");
/* background-image: url("https://yun.duiba.com.cn/db_games/activity/game/0327/startscenebg.jpg"); */
/* background-image: url("https://yun.duiba.com.cn/db_games/activity/game/1565600901/resource/assets/startScene/startscenebg.jpg"); */ /* background-image: url("https://yun.duiba.com.cn/db_games/activity/game/1565600901/resource/assets/startScene/startscenebg.jpg"); */
padding: 0; padding: 0;
border: 0; border: 0;
......
{ {
"groups": [ "groups": [
{ {
"keys": "startscenebg_jpg,mask3_png,mask2_png,mask_png,loadingbg_png,头顶树丛_png", "keys": "mask3_png,mask2_png,mask_png,loadingbg_png,头顶树丛_png,startscenebg_png",
"name": "start" "name": "start"
}, },
{ {
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
"name": "helpGroup" "name": "helpGroup"
}, },
{ {
"keys": "virprizebg_png,lightdi_png,wormhole_png,ele41_png", "keys": "virprizebg_png,lightdi_png,wormhole_png,startscenebg_jpg",
"name": "preload" "name": "preload"
} }
], ],
...@@ -301,11 +301,6 @@ ...@@ -301,11 +301,6 @@
"type": "image", "type": "image",
"name": "dog_png" "name": "dog_png"
}, },
{
"url": "assets/startScene/startscenebg.jpg",
"type": "image",
"name": "startscenebg_jpg"
},
{ {
"url": "assets/nprize/再来一次.png", "url": "assets/nprize/再来一次.png",
"type": "image", "type": "image",
...@@ -5398,14 +5393,19 @@ ...@@ -5398,14 +5393,19 @@
"name": "kuang_png" "name": "kuang_png"
}, },
{ {
"name": "wormhole_png", "url": "assets/mainScene/wormhole.png",
"type": "image",
"name": "wormhole_png"
},
{
"url": "assets/startScene/startscenebg.png",
"type": "image", "type": "image",
"url": "assets/mainScene/wormhole.png" "name": "startscenebg_png"
}, },
{ {
"name": "ele41_png", "name": "startscenebg_jpg",
"type": "image", "type": "image",
"url": "assets/mainScene/ele41.png" "url": "assets/startscenebg.jpg"
} }
] ]
} }
\ No newline at end of file
...@@ -544,8 +544,8 @@ export default class MainScene extends Scene { ...@@ -544,8 +544,8 @@ export default class MainScene extends Scene {
//重置基础元素类型及特效 //重置基础元素类型及特效
this.initBaseElement(); this.initBaseElement();
//设置栏置顶 //设置栏置顶
this.addChild(this["settingAll"]) // this.addChild(this["settingAll"])
this.addChild(this['redrainbg']); // this.addChild(this['redrainbg']);
this['redrainbg'].visible = false; this['redrainbg'].visible = false;
this.settingGroup.visible = false; this.settingGroup.visible = false;
this.addLoading(); this.addLoading();
...@@ -909,6 +909,7 @@ export default class MainScene extends Scene { ...@@ -909,6 +909,7 @@ export default class MainScene extends Scene {
//分数进度条,托管 //分数进度条,托管
this.scoreProgress = new ScoreProgress(this.starProgress, this.curScoreNum, this.chapterData.starScores); this.scoreProgress = new ScoreProgress(this.starProgress, this.curScoreNum, this.chapterData.starScores);
//分数置0 //分数置0
this.score = 0; this.score = 0;
//地图生成 //地图生成
...@@ -5658,6 +5659,9 @@ export default class MainScene extends Scene { ...@@ -5658,6 +5659,9 @@ export default class MainScene extends Scene {
Pool.recover(RecoverName.LATTICE,ilattice); Pool.recover(RecoverName.LATTICE,ilattice);
} }
} }
if(this.scoreProgress){
this.scoreProgress.removeStarProgress();
}
} }
recoverMapast(lat:Lattice){ recoverMapast(lat:Lattice){
if(lat.ice&&lat.ice.parent){ if(lat.ice&&lat.ice.parent){
......
...@@ -11,6 +11,7 @@ export class ScoreProgress { ...@@ -11,6 +11,7 @@ export class ScoreProgress {
*/ */
starScores: number[]; starScores: number[];
mask:egret.Shape;
star1: eui.Image; star1: eui.Image;
star2: eui.Image; star2: eui.Image;
star3: eui.Image; star3: eui.Image;
...@@ -97,29 +98,46 @@ export class ScoreProgress { ...@@ -97,29 +98,46 @@ export class ScoreProgress {
this.allScore = 640 / 563 * this.starScores[2]; this.allScore = 640 / 563 * this.starScores[2];
//加遮罩,加到starProgress的父级中 //加遮罩,加到starProgress的父级中
var p = starProgress.parent; var p = starProgress.parent;
var mask = new egret.Shape(); var pchildidx = p.getChildIndex(starProgress);
this.mask = new egret.Shape();
// window['aaa'] = mask; // window['aaa'] = mask;
mask.graphics.beginFill(0xff0000, 1); this.mask.graphics.beginFill(0xff0000, 1);
mask.graphics.drawRoundRect(138, 151.5, 0, 41, 50); this.mask.graphics.drawRoundRect(138, 151.5, 0, 41, 50);
mask.graphics.endFill(); this.mask.graphics.endFill();
this.starProgress.mask = mask; this.starProgress.mask = this.mask;
p.addChild(mask); p.addChildAt(this.mask,pchildidx+1);
//星星1 lightedStar_png //星星1 lightedStar_png
var textureStar = RES.getRes("unlightedStar_png"); var textureStar = RES.getRes("unlightedStar_png");
this.star1 = new eui.Image(textureStar); // width (27 * 2) this.star1 = new eui.Image(textureStar); // width (27 * 2)
this.star1.x = 383; // 410 this.star1.x = 383; // 410
this.star1.y = 153.5; // 201 this.star1.y = 153.5; // 201
p.addChild(this.star1); p.addChildAt(this.star1,pchildidx+2);
this.star2 = new eui.Image(textureStar); this.star2 = new eui.Image(textureStar);
this.star2.x = 469; // 496 this.star2.x = 469; // 496
this.star2.y = 153.5; this.star2.y = 153.5;
p.addChild(this.star2); p.addChildAt(this.star2,pchildidx+3);
this.star3 = new eui.Image(textureStar); this.star3 = new eui.Image(textureStar);
this.star3.x = 556; // 583 this.star3.x = 556; // 583
this.star3.y = 153.5; this.star3.y = 153.5;
p.addChild(this.star3); p.addChildAt(this.star3,pchildidx+4);
}
removeStarProgress(){
var p = this.starProgress.parent;
if(this.mask.parent){
this.mask.parent.removeChild(this.mask);
this.starProgress.mask = null;
}
if(this.star1.parent){
this.star1.parent.removeChild(this.star1);
}
if(this.star2.parent){
this.star2.parent.removeChild(this.star2);
}
if(this.star3.parent){
this.star3.parent.removeChild(this.star3);
}
} }
} }
\ No newline at end of file
...@@ -65,7 +65,7 @@ export default class StartScene extends Scene { ...@@ -65,7 +65,7 @@ export default class StartScene extends Scene {
await Promise.all([ await Promise.all([
loadSvga(getResPath() + 'resource/assets/svgas/loading_progress.svga', this['container3']), loadSvga(getResPath() + 'resource/assets/svgas/loading_progress.svga', this['container3']),
loadSvga(getResPath() + 'resource/assets/svgas/loading_animals.svga', this['container2']), loadSvga(getResPath() + 'resource/assets/svgas/loading_animals.svga', this['container2']),
loadSvga(getResPath() + 'resource/assets/svgas/loading_title.svga', this['container1']), // loadSvga(getResPath() + 'resource/assets/svgas/loading_title.svga', this['container1']),
]); ]);
} }
......
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