|
@@ -14,7 +14,7 @@ export class launch_view extends Component {
|
|
|
start() {
|
|
|
this.progress.getComponent(ProgressBar).progress = 0;
|
|
|
// this.Interval_id=setInterval(this.setupLoading.bind(this),200);
|
|
|
- this.schedule(this.setupLoading,0.1)
|
|
|
+ this.schedule(this.setupLoading,0.05)
|
|
|
}
|
|
|
|
|
|
setupLoading(){
|
|
@@ -130,17 +130,20 @@ export class launch_view extends Component {
|
|
|
let all = 0;
|
|
|
const element = gameManager.get_play_list_item_by_categoryid(config.PLAY_TYPE.MEI_NV_ZHAO_XI_JIE);
|
|
|
let item = gameManager.get_cur_level_by_categoryid(element.id);
|
|
|
- let key = `${element.id}_${item.level}`;
|
|
|
- let str = StorageManager.instance.getGlobalData(key);
|
|
|
- if(str===""||str===undefined||str===null){
|
|
|
- all++;
|
|
|
- gameManager.loadLevelImg(element.id,item.level,()=>{
|
|
|
- this.isStop = false;
|
|
|
- })
|
|
|
- }
|
|
|
- if(all===0){
|
|
|
+ // let key = `${element.id}_${item.level}`;
|
|
|
+ // let str = StorageManager.instance.getGlobalData(key);
|
|
|
+ // if(str===""||str===undefined||str===null){
|
|
|
+ // all++;
|
|
|
+ // gameManager.loadLevelImg(element.id,item.level,()=>{
|
|
|
+ // this.isStop = false;
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if(all===0){
|
|
|
+ // this.isStop = false;
|
|
|
+ // }
|
|
|
+ gameManager.loadLevelImg(element.id,item.level,()=>{
|
|
|
this.isStop = false;
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
if(progress_number==50){
|
|
@@ -148,17 +151,20 @@ export class launch_view extends Component {
|
|
|
let all = 0;
|
|
|
const element = gameManager.get_play_list_item_by_categoryid(config.PLAY_TYPE.HAN_ZI_ZHAO_BU_TONG);
|
|
|
let item = gameManager.get_cur_level_by_categoryid(element.id);
|
|
|
- let key = `${element.id}_${item.level}`;
|
|
|
- let str = StorageManager.instance.getGlobalData(key);
|
|
|
- if(str===""||str===undefined||str===null){
|
|
|
- all++;
|
|
|
- gameManager.loadLevelImg(element.id,item.level,()=>{
|
|
|
- this.isStop = false;
|
|
|
- })
|
|
|
- }
|
|
|
- if(all===0){
|
|
|
+ // let key = `${element.id}_${item.level}`;
|
|
|
+ // let str = StorageManager.instance.getGlobalData(key);
|
|
|
+ // if(str===""||str===undefined||str===null){
|
|
|
+ // all++;
|
|
|
+ // gameManager.loadLevelImg(element.id,item.level,()=>{
|
|
|
+ // this.isStop = false;
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if(all===0){
|
|
|
+ // this.isStop = false;
|
|
|
+ // }
|
|
|
+ gameManager.loadLevelImg(element.id,item.level,()=>{
|
|
|
this.isStop = false;
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
if(progress_number==60){
|
|
@@ -166,33 +172,38 @@ export class launch_view extends Component {
|
|
|
let all = 0;
|
|
|
const element = gameManager.get_play_list_item_by_categoryid(config.PLAY_TYPE.YI_QI_ZHAO_CHA);
|
|
|
let item = gameManager.get_cur_level_by_categoryid(element.id);
|
|
|
- let key = `${element.id}_${item.level}`;
|
|
|
- let str = StorageManager.instance.getGlobalData(key);
|
|
|
- if(str===""||str===undefined||str===null){
|
|
|
- all++;
|
|
|
- gameManager.loadLevelImg(element.id,item.level,()=>{
|
|
|
- this.isStop = false;
|
|
|
- })
|
|
|
- }
|
|
|
- if(all===0){
|
|
|
+ // let key = `${element.id}_${item.level}`;
|
|
|
+ // let str = StorageManager.instance.getGlobalData(key);
|
|
|
+ // if(str===""||str===undefined||str===null){
|
|
|
+ // all++;
|
|
|
+ // gameManager.loadLevelImg(element.id,item.level,()=>{
|
|
|
+ // this.isStop = false;
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if(all===0){
|
|
|
+ // this.isStop = false;
|
|
|
+ // }
|
|
|
+ gameManager.loadLevelImg(element.id,item.level,()=>{
|
|
|
this.isStop = false;
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
|
|
|
if(progress_number==70){
|
|
|
this.isStop = true;
|
|
|
- let temp_count = 0;
|
|
|
let call = ()=>{
|
|
|
- temp_count++;
|
|
|
- if(temp_count>=4){
|
|
|
- this.isStop = false;
|
|
|
- }
|
|
|
+ this.isStop = false;
|
|
|
}
|
|
|
gameManager.loadSysMusic(call);
|
|
|
- gameManager.loadPlayMusicByCategoryId(config.PLAY_TYPE.MEI_NV_ZHAO_XI_JIE,call);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(progress_number==75){
|
|
|
+ this.isStop = true;
|
|
|
+ let call = ()=>{
|
|
|
+ this.isStop = false;
|
|
|
+ }
|
|
|
gameManager.loadPlayMusicByCategoryId(config.PLAY_TYPE.YI_QI_ZHAO_CHA,call);
|
|
|
- gameManager.loadPlayMusicByCategoryId(config.PLAY_TYPE.HAN_ZI_ZHAO_BU_TONG,call);
|
|
|
}
|
|
|
|
|
|
if(progress_number==80){
|
|
@@ -207,13 +218,39 @@ export class launch_view extends Component {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ if(progress_number==85){
|
|
|
+ this.isStop = true;
|
|
|
+ let call = ()=>{
|
|
|
+ this.isStop = false;
|
|
|
+ }
|
|
|
+ gameManager.loadPlayMusicByCategoryId(config.PLAY_TYPE.MEI_NV_ZHAO_XI_JIE,call);
|
|
|
+
|
|
|
+ }
|
|
|
+ if(progress_number==85){
|
|
|
+ this.isStop = true;
|
|
|
+ let call = ()=>{
|
|
|
+ this.isStop = false;
|
|
|
+ }
|
|
|
+ gameManager.loadPlayMusicByCategoryId(config.PLAY_TYPE.HAN_ZI_ZHAO_BU_TONG,call);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(progress_number==90){
|
|
|
+ this.isStop = true;
|
|
|
+ let call = ()=>{
|
|
|
+ this.isStop = false;
|
|
|
+ }
|
|
|
+ gameManager.loadPlayMusicByCategoryId(config.PLAY_TYPE.YI_QI_ZHAO_CHA,call);
|
|
|
+
|
|
|
+ }
|
|
|
if(progress_number>=100){
|
|
|
this.finishLoading();
|
|
|
this.unschedule(this.setupLoading)
|
|
|
progress_number = 100;
|
|
|
}
|
|
|
this.lab_progress.getComponent(Label).string = `加载中 ${progress_number} %...`;
|
|
|
- this.progress.getComponent(ProgressBar).progress += 0.05;
|
|
|
+ this.progress.getComponent(ProgressBar).progress += 0.025;
|
|
|
|
|
|
}
|
|
|
|