소스 검색

Merge branch 'master' of http://120.92.132.192:23541/TDGame/TDGameClient3D

xujialiang 4 년 전
부모
커밋
876a9380c4
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      assets/scripts/games/ui/prepares/WeaponCellListView.ts

+ 7 - 2
assets/scripts/games/ui/prepares/WeaponCellListView.ts

@@ -1,8 +1,9 @@
-import { _decorator, Component, Node, EventTouch, LayoutComponent, Vec2, Rect, Size, Vec3, loader, instantiate } from 'cc';
+import { _decorator, Component, Node, EventTouch, LayoutComponent, Vec2, Rect, Size, Vec3, loader, instantiate, assert } from 'cc';
 import { BaseView } from '../../../engines/gui/BaseView';
 import { GUIManager } from '../../../engines/gui/GUIManager';
 import { GUIMediator } from '../../../engines/gui/GUIMediator';
 import { DataModelEventType } from '../../../engines/models/DataModelEventType';
+import { NoticeManager } from '../../../engines/notices/NoticeManager';
 import GameConfigManager from '../../models/GameConfigManager';
 import { GameModel } from '../../models/GameModel';
 import { GamePropertys } from '../../models/GamePropertys';
@@ -216,7 +217,11 @@ export class WeaponCellListView extends BaseView{
                         if(value<0.5){
                             GameModel.single.SynthesisWeapon(this.currentSelect.cellId,weaponCellScript.weaponCell.cellId);
                         }else{
-                            GUIManager.single.Show(UIConst.FREE_UPGRADE_UI,{a:this.currentSelect,b:weaponCellScript.weaponCell});
+                            if(this.currentSelect.weaponId!=weaponCellScript.weaponCell.weaponId){
+                                NoticeManager.ShowPrompt("不同的武器无法合成!");
+                            }else{
+                                GUIManager.single.Show(UIConst.FREE_UPGRADE_UI,{a:this.currentSelect,b:weaponCellScript.weaponCell});
+                            }
                         }
                     }
                 }