zane 1 kuukausi sitten
vanhempi
commit
4d737a6429

+ 3 - 2
assets/resources/prefab/item/PlayGameItem.ts

@@ -9,6 +9,7 @@ import AB from "../../scripts/base/AB";
 import { Sprite } from "cc";
 import ConfigM, { ConfigGame } from "../../scripts/api/ConfigM";
 import { DebugM } from "../../scripts/mgr/DebugM";
+import { CritLayer } from "../layer/CritLayer";
 
 const { ccclass, property } = _decorator;
 
@@ -60,8 +61,8 @@ export class PlayGameItem extends BaseUI {
 
   protected simpleOnBtnClick(name: string): void {
     if (name === "btn_play") {
-      if (!DebugM.ins.isOpenPlayGame()) {
-        Tips.show("Coming soon");
+      if (DebugM.ins.isDebugPeople()) {
+        CritLayer.show(this.data.gameId, "123", this.data.remainPog);
         return;
       }
 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 189 - 1293
assets/resources/prefab/layer/CritLayer.prefab


+ 54 - 11
assets/resources/prefab/layer/CritLayer.ts

@@ -8,6 +8,9 @@ import { Tips } from "../../scripts/mgr/Tips";
 import GameM from "../../scripts/api/GameM";
 import ItemsM from "../../scripts/mgr/ItemsM";
 import UserM from "../../scripts/api/UserM";
+import UIUtils from "../../scripts/base/UIUtils";
+import { Vec3 } from "cc";
+import { isValid } from "cc";
 const { ccclass, property } = _decorator;
 
 export interface POGClaimLayerCallback {
@@ -36,20 +39,12 @@ export class CritLayer extends BaseUI {
 
     let result = await GameM.ins.getCritReward(gameId, spinId);
     if (!result) {
+      this.playAnim();
+
       return;
     }
 
-    // UserM.ins.addGoods(GoodsId.POG, result.critPog);
-
-    ItemsM.ins.itemChange(
-      [
-        {
-          id: GoodsId.POG,
-          count: result.critPog,
-        },
-      ],
-      result.goodList
-    );
+    UserM.ins.refreshGoods(result.goodList);
 
     this.critRewardPog = result.critPog;
 
@@ -58,8 +53,56 @@ export class CritLayer extends BaseUI {
       "lbl_crit_pog2",
       "" + Utils.formatNumber(pogValue + result.critPog, 2)
     );
+    this.playAnim();
+
+
   }
 
+  playAnim() {
+    let self=this;
+    this.a1.active = true;
+    this.a1.setPosition(0, -500, 0);
+    this.a2.setPosition(0, -500, 0);
+    this.a3.setPosition(0, -500, 0);
+    this.a3.setScale(0.5, 0.5, 0.5);
+    UIUtils.AnimBezierMoveAndScale(
+      this.a1,
+      new Vec3(0, 0, 0),
+      0.7,
+      0.5,
+      () => {}
+    );
+    setTimeout(() => {
+      this.a2.active = true;
+      UIUtils.AnimBezierMoveAndScale(this.a2, new Vec3(0, 0, 0), 1, 1, () => {});
+    }, 1000);
+    setTimeout(() => {
+      if (!isValid(self.node)) {
+        return;
+      }
+      this.a3.active = true;
+      UIUtils.AnimBezierMoveAndScale(
+        self.a3,
+        new Vec3(0, 0, 0),
+        1.4,
+        1,
+        () => {}
+      );
+    }, 1500);
+   
+  }
+  private a1: Node;
+  private a2: Node;
+  private a3: Node;
+  protected onLoad(): void {
+    super.onLoad();
+    this.a1 = this.FindNode("anim1").children[0];
+    this.a2 = this.FindNode("anim2").children[0];
+    this.a3 = this.FindNode("anim3").children[0];
+    this.a1.active = false;
+    this.a2.active = false;
+    this.a3.active = false;
+  }
   protected simpleOnBtnClick(name: string): void {
     switch (name) {
       case "btn_claim":

+ 32 - 15
assets/resources/prefab/play/GameTaskItem.prefab

@@ -34,20 +34,20 @@
         "__id__": 44
       },
       {
-        "__id__": 71
+        "__id__": 72
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 77
+        "__id__": 78
       },
       {
-        "__id__": 79
+        "__id__": 80
       }
     ],
     "_prefab": {
-      "__id__": 81
+      "__id__": 82
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -314,7 +314,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 18.59400000000005,
+      "x": 18.593999999999994,
       "y": -0.8450000000000273,
       "z": 0
     },
@@ -532,6 +532,8 @@
       "__id__": 0
     },
     "fileId": "dbT4jMuC5OobtDJKF6VMDa",
+    "instance": null,
+    "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
   {
@@ -829,6 +831,8 @@
       "__id__": 0
     },
     "fileId": "df04w4qopCaZsclaZfS8Sl",
+    "instance": null,
+    "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
   {
@@ -1210,6 +1214,9 @@
       },
       {
         "__id__": 69
+      },
+      {
+        "__id__": 71
       }
     ],
     "removedComponents": []
@@ -1361,7 +1368,7 @@
     "propertyPath": [
       "_string"
     ],
-    "value": "Claim"
+    "value": "Claim(213)"
   },
   {
     "__type__": "cc.TargetInfo",
@@ -1494,6 +1501,16 @@
       "c4qdgQdYlNfockmAh9acG0"
     ]
   },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 57
+    },
+    "propertyPath": [
+      "_overflow"
+    ],
+    "value": 2
+  },
   {
     "__type__": "cc.Node",
     "_name": "line",
@@ -1506,14 +1523,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 72
+        "__id__": 73
       },
       {
-        "__id__": 74
+        "__id__": 75
       }
     ],
     "_prefab": {
-      "__id__": 76
+      "__id__": 77
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1550,11 +1567,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 71
+      "__id__": 72
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 73
+      "__id__": 74
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1578,11 +1595,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 71
+      "__id__": 72
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 75
+      "__id__": 76
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1640,7 +1657,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 78
+      "__id__": 79
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1668,7 +1685,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 80
+      "__id__": 81
     },
     "_id": ""
   },

+ 16 - 16
assets/resources/prefab/play/WheelDialog.prefab

@@ -4981,8 +4981,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 42.4072265625,
-      "height": 31.5
+      "width": 46.4072265625,
+      "height": 35.5
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -5030,11 +5030,11 @@
     "_isSystemFontUsed": true,
     "_spacingX": 0,
     "_isItalic": false,
-    "_isBold": false,
+    "_isBold": true,
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
-    "_enableOutline": false,
+    "_enableOutline": true,
     "_outlineColor": {
       "__type__": "cc.Color",
       "r": 0,
@@ -5990,8 +5990,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 42.4072265625,
-      "height": 31.5
+      "width": 46.4072265625,
+      "height": 35.5
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -6039,11 +6039,11 @@
     "_isSystemFontUsed": true,
     "_spacingX": 0,
     "_isItalic": false,
-    "_isBold": false,
+    "_isBold": true,
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
-    "_enableOutline": false,
+    "_enableOutline": true,
     "_outlineColor": {
       "__type__": "cc.Color",
       "r": 0,
@@ -7221,8 +7221,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 42.4072265625,
-      "height": 31.5
+      "width": 46.4072265625,
+      "height": 35.5
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -7270,11 +7270,11 @@
     "_isSystemFontUsed": true,
     "_spacingX": 0,
     "_isItalic": false,
-    "_isBold": false,
+    "_isBold": true,
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
-    "_enableOutline": false,
+    "_enableOutline": true,
     "_outlineColor": {
       "__type__": "cc.Color",
       "r": 0,
@@ -8452,8 +8452,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 42.4072265625,
-      "height": 31.5
+      "width": 46.4072265625,
+      "height": 35.5
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -8501,11 +8501,11 @@
     "_isSystemFontUsed": true,
     "_spacingX": 0,
     "_isItalic": false,
-    "_isBold": false,
+    "_isBold": true,
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
-    "_enableOutline": false,
+    "_enableOutline": true,
     "_outlineColor": {
       "__type__": "cc.Color",
       "r": 0,

+ 10 - 11
assets/resources/prefab/play/WheelDialog.ts

@@ -239,10 +239,10 @@ export class WheelDialog extends BaseUI {
     let first_value = this.data.spinPog;
     this.setText("lbl_add_value_1", "+" + first_value);
 
-    let rank_percent = this.data.ranKAddition / 100;
-    this.setText("lbl_add_value_rank_percent", rank_percent * 100 + "%");
-    let pass_percent = this.data.gamePassAddition / 100;
-    this.setText("lbl_add_value_pass_percent", pass_percent * 100 + "%");
+    // let rank_percent = this.data.ranKAddition / 100;
+    this.setText("lbl_add_value_rank_percent", this.data.ranKAddition+ "%");
+    // let pass_percent = this.data.gamePassAddition / 100;
+    this.setText("lbl_add_value_pass_percent",  this.data.gamePassAddition + "%");
 
     this.setText(
       "lbl_add_value_2",
@@ -281,12 +281,9 @@ export class WheelDialog extends BaseUI {
           return;
         }
 
-        let changeGoodList = [
-          {
-            id: GoodsId.POG,
-            count: self.data.totalPog,
-          },
-        ];
+        // let changeGoodList = [
+          
+        // ];
 
         // UserM.ins.data.goodList.forEach((item) => {
         //   if (item.id == GoodsId.POG) {
@@ -294,7 +291,9 @@ export class WheelDialog extends BaseUI {
         //   }
         // });
 
-        ItemsM.ins.itemChange(changeGoodList,self.data.goodList );
+        UserM.ins.refreshGoods(self.data.goodList);
+
+        // ItemsM.ins.itemChange(changeGoodList,self.data.goodList );
       });
     }, 1000);
   }

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä