greg 4 éve
szülő
commit
7728c72325

+ 4 - 5
assets/scripts/games/models/GameModel.ts

@@ -54,11 +54,11 @@ export class GameModel extends DataModel{
         for (let index = 0; index < 12; index++) {
             weaponCell=new WeaponCell();
             weaponCell.cellId=index;
-            weaponCell.weaponId=10101;
+            weaponCell.weaponId=index==0?10101:-1;
             weaponCell.lastOutputTime=0;
             this.__weaponCells.push(weaponCell);
         }
-
+        
         //保存到本地
         this.SaveToLoacl();
     }
@@ -86,8 +86,7 @@ export class GameModel extends DataModel{
             return;
         }
         this.lastTime=currentTime;
-
-        let earningsIntervarS:number=(this.earningsInterval/1000);
+        
         let fullEarnings:number=0;
         this.__weaponCells.forEach(weaponCell => {
             if(weaponCell.weaponId>=0){
@@ -107,7 +106,7 @@ export class GameModel extends DataModel{
         }
         if(fullEarnings>0){
             console.log("产出金币:"+fullEarnings);
-            this.gold+=fullEarnings*earningsIntervarS;
+            this.gold+=fullEarnings;
         }
         this.fullEarnings=fullEarnings;
 

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

@@ -41,7 +41,7 @@ export class PreloadingScene extends Component {
         GameModel.single.userId=LiangLiangSDK.userID;
         this.LoadConfigs();
     }
-    
+
     private LoadSubPackage():void{
         console.log("加载分包");
         LoadingView.single.UpdateLabel("加载分包");

+ 1 - 1
assets/scripts/games/ui/prepares/WeaponCellScript.ts

@@ -105,7 +105,7 @@ export class WeaponCellScript extends Component {
             this.weaponConfig=GameConfigManager.GetWeaponConfig(this.weaponCell.weaponId);
             //收益
             this.earningsLabel.node.active=true;
-            this.earningsLabel.string=Math.floor(this.weaponConfig.earnings*(GameModel.single.earningsInterval/1000)).toString();
+            this.earningsLabel.string=Math.floor(this.weaponConfig.earnings).toString();
             //等级
             this.labelGroup.active=true;
             if(GameConfigManager.WeaponIsMaxLevel(this.weaponCell.weaponId)){