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