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