Bläddra i källkod

Merge branch '0.6' of http://svn.ouj.com:3000/DWG/allstar into 0.6

SunnyLinSD 6 år sedan
förälder
incheckning
fdb6ea3448
2 ändrade filer med 12 tillägg och 7 borttagningar
  1. 3 3
      assets/resources/prefabs/change_job.prefab
  2. 9 4
      assets/scripts/job/ChangeJob.js

+ 3 - 3
assets/resources/prefabs/change_job.prefab

@@ -1117,8 +1117,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 36,
-      "height": 35
+      "width": 52,
+      "height": 58
     },
     "_rotationX": 0,
     "_rotationY": 0,
@@ -1145,7 +1145,7 @@
     },
     "_enabled": true,
     "_spriteFrame": {
-      "__uuid__": "e34c77b5-02c6-404c-b186-7f2377158618"
+      "__uuid__": "d70fee61-65c6-4d34-a71b-0557eba384b1"
     },
     "_type": 0,
     "_sizeMode": 1,

+ 9 - 4
assets/scripts/job/ChangeJob.js

@@ -185,21 +185,27 @@ cc.Class({
                 JobApi.changeJob(this.actorInfo.uid, job.id,
                     (response, msg) => {
                         this.onChangeJobSuccess(msg);
+                        GameModule.audioMng.playSignSuccess();
                     },
                     (code, msg) => {
                         this.onFail(msg);
+                        GameModule.audioMng.playSignFail();
+
                     });
                 break;
             case JobPageType.ChooseJob:
                 var job = this.pageView.getComponent('PVCtrl').getSelectedJob();
                 JobApi.chooseJob(this.actorInfo.uid, job.id,
                     (response) => {
+                        GameModule.audioMng.playSignSuccess();
                         this.onFail('选择成功', () => {
                             this.nextChoose();
                         });
                     },
                     (code, msg) => {
                         this.onFail(msg);
+                        GameModule.audioMng.playSignFail();
+
                     });
 
                 break;
@@ -207,9 +213,12 @@ cc.Class({
                 JobApi.levelUp(this.actorInfo.uid,
                     (response) => {
                         this.onLevelUpSuccess();
+                        GameModule.audioMng.playSignSuccess();
                     },
                     (code, msg) => {
                         this.onFail(msg);
+                        GameModule.audioMng.playSignFail();
+
                     });
                 break;
         }
@@ -254,7 +263,6 @@ cc.Class({
         });
         GameEvent.fire(GameNotificationKey.RefreshUserInformation);
         GameEvent.fire(GameNotificationKey.PlaySuccessAnimation);
-        GameModule.audioMng.playSignSuccess();
     },
 
 
@@ -268,15 +276,12 @@ cc.Class({
         });
         GameEvent.fire(GameNotificationKey.RefreshUserInformation);
         GameEvent.fire(GameNotificationKey.PlaySuccessAnimation);
-        GameModule.audioMng.playSignSuccess();
     },
 
     onFail(msg, callback) {
         this.fail = cc.instantiate(this.failPrefab);
         this.fail = this.fail.getComponent('JobPageFail');
         this.fail.show(this.node, msg, callback);
-
-        GameModule.audioMng.playSignFail();
     },
 
     setNeedChooseJobUsers(users) {