Browse Source

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

SunnyLinSD 6 years ago
parent
commit
96b4a9092e

+ 2 - 2
assets/prefabs/user_pack_item.prefab

@@ -382,7 +382,7 @@
     "_enabled": true,
     "_enabled": true,
     "_spriteFrame": null,
     "_spriteFrame": null,
     "_type": 0,
     "_type": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillType": 0,
     "_fillType": 0,
     "_fillCenter": {
     "_fillCenter": {
       "__type__": "cc.Vec2",
       "__type__": "cc.Vec2",
@@ -391,7 +391,7 @@
     },
     },
     "_fillStart": 0,
     "_fillStart": 0,
     "_fillRange": 0,
     "_fillRange": 0,
-    "_isTrimmedMode": true,
+    "_isTrimmedMode": false,
     "_srcBlendFactor": 770,
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_dstBlendFactor": 771,
     "_atlas": null
     "_atlas": null

+ 16 - 1
assets/scripts/levelHome/LevelHomePropItem.js

@@ -2,6 +2,7 @@
 const HomeApi = require("../net/HomeApi");
 const HomeApi = require("../net/HomeApi");
 const DWTool = require("../utils/DWTool");
 const DWTool = require("../utils/DWTool");
 const itemList = require('../data/item');
 const itemList = require('../data/item');
+const GameModule = require("../utils/GameModule");
 
 
 cc.Class({
 cc.Class({
     extends: cc.Component,
     extends: cc.Component,
@@ -46,8 +47,22 @@ cc.Class({
         // this.node.x = 150;
         // this.node.x = 150;
 
 
         this.node.on(cc.Node.EventType.TOUCH_END, _.debounce(() => {
         this.node.on(cc.Node.EventType.TOUCH_END, _.debounce(() => {
+            // 上报领取
             HomeApi.itemCollect(this.buildingId, () => {
             HomeApi.itemCollect(this.buildingId, () => {
-
+                // 钻石
+                if(this.propData.id == 10002) {
+                    GameModule.userInfo.updateUserRes({
+                        diamond: this.propData.count 
+                    })
+                }
+
+                // 艺人券
+                if(this.propData.id == 10003) {
+                    GameModule.userInfo.updateUserRes({
+                        ticket: this.propData.count 
+                    })
+                }
+ 
                 this.pickupCallback();
                 this.pickupCallback();
                 let showFrame = this.propSprite.spriteFrame;
                 let showFrame = this.propSprite.spriteFrame;
                 let showText = `${this.propData.name} x ${this.propData.count}`
                 let showText = `${this.propData.name} x ${this.propData.count}`