|
@@ -40,7 +40,25 @@ export class PreloadingScene extends Component {
|
|
|
GameModel.single.gameName="gregGame";
|
|
|
GameModel.single.userId="guest";
|
|
|
|
|
|
- this.LoadConfigs();
|
|
|
+ if(window["wx"]){
|
|
|
+ this.LoadSubPackage();
|
|
|
+ }else{
|
|
|
+ this.LoadConfigs();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private LoadSubPackage():void{
|
|
|
+ loader.downloader.loadSubpackage('d3d', (err: any) => {
|
|
|
+ if (err) {
|
|
|
+ return console.error("loadSubpackage Error:"+err);
|
|
|
+ }
|
|
|
+ loader.downloader.loadSubpackage('ui', (err: any) => {
|
|
|
+ if (err) {
|
|
|
+ return console.error("loadSubpackage Error:"+err);
|
|
|
+ }
|
|
|
+ this.LoadConfigs();
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
LoadConfigs():void{
|
|
@@ -82,6 +100,6 @@ export class PreloadingScene extends Component {
|
|
|
update (deltaTime: number) {
|
|
|
this.time+=deltaTime;
|
|
|
this.time=this.time%2;
|
|
|
- LoadingView.single.UpdateProgress(this.time/2);
|
|
|
+ LoadingView.single.UpdateProgress(this.time/3);
|
|
|
}
|
|
|
}
|