Browse Source

第一版

greg 4 years ago
parent
commit
b9fb7136e1

+ 3 - 1
assets/d3d.meta

@@ -5,5 +5,7 @@
   "uuid": "212a6d42-65e7-4d3a-930b-b6a0b37ce3cc",
   "files": [],
   "subMetas": {},
-  "userData": {}
+  "userData": {
+    "isSubpackage": true
+  }
 }

File diff suppressed because it is too large
+ 397 - 164
assets/resources/ui/FightingUI.prefab


File diff suppressed because it is too large
+ 180 - 149
assets/resources/ui/PrepareUI.prefab


+ 2 - 1
assets/scripts/engines/models/DataModel.ts

@@ -103,10 +103,11 @@ export class DataModel extends EventDispatcher {
                         this.SetProperty(key,element);
                     }
                 }
+                this.isNewPlayer=false;
             } catch (error) {
                 console.log("读取本地数据失败")
+                this.isNewPlayer=true;
             }
-            this.isNewPlayer=false;
         }
         if(this.isNewPlayer){
             this.SetDefaultPropertys();

+ 20 - 2
assets/scripts/games/scenes/PreloadingScene.ts

@@ -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);
     }
 }

+ 1 - 1
assets/scripts/games/scenes/PrepareScene.ts

@@ -20,7 +20,7 @@ export class PrepareScene extends Component {
         
         this.LoadAssets();
     }
-
+    
     private LoadAssets():void{
         let urls:string[]=[];
         //武器

Some files were not shown because too many files changed in this diff