Procházet zdrojové kódy

结算添加钻石奖励

greg před 4 roky
rodič
revize
f513578d70

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 390 - 112
assets/resources/ui/GameOverUI.prefab


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 244 - 128
assets/resources/ui/ShopUI.prefab


+ 26 - 1
assets/scripts/games/ui/gameovers/GameOverMediator.ts

@@ -3,6 +3,7 @@ import { GUIManager } from '../../../engines/gui/GUIManager';
 import { GUIMediator } from '../../../engines/gui/GUIMediator';
 import { NoticeManager } from '../../../engines/notices/NoticeManager';
 import { SceneManager } from '../../../engines/scenes/SceneManager';
+import StringUtils from '../../../engines/utils/StringUtils';
 import { LiangLiangSDK } from '../../../libs/liangliangSDK';
 import { PlatformManager } from '../../../Platform/PlatformManager';
 import { WeChatPlatform } from '../../../Platform/WeChat/WeChatPlatform';
@@ -17,11 +18,28 @@ export class GameOverMediator extends GUIMediator {
     @property(Node)
     WinGroup: Node = null;
 
+
+    @property({
+        type: Node
+    })
+    WinAwardNode: Node = null;
+
     @property({
         type: LabelComponent
     })
     WinAwardLabel: LabelComponent = null;
 
+
+    @property({
+        type: Node
+    })
+    DiamondAwardNode: Node = null;
+
+    @property({
+        type: LabelComponent
+    })
+    DiamondAwardLabel: LabelComponent = null;
+
     @property(Node)
     DefeatedGroup: Node = null;
 
@@ -50,7 +68,14 @@ export class GameOverMediator extends GUIMediator {
             let levelConfig: any = GameConfigManager.GetLevelConfig(GameModel.single.currentLevel - 1);
             //关卡基础奖励
             this.award = levelConfig.awards + levelConfig.killAward * GameModel.single.killCount;
-            this.WinAwardLabel.string = this.award.toString();
+            //金币奖励
+            this.WinAwardLabel.string ="X"+StringUtils.numberUtilsEn(this.award,0);
+            //钻石奖励
+            if(levelConfig.diamondRewards>0){
+                this.DiamondAwardLabel.string="X"+StringUtils.numberUtilsEn(levelConfig.diamondRewards,0);
+            }else{
+                this.DiamondAwardLabel.string="";
+            }
             let weChat = PlatformManager.impl as WeChatPlatform;
             if(weChat instanceof WeChatPlatform){
                 weChat.successBranchAnalytics(String(GameModel.single.currentLevel));

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů