Citrus преди 2 месеца
родител
ревизия
3df6d81f4e

+ 15 - 3
assets/Script/GameProp/GameProp1002.ts

@@ -48,14 +48,26 @@ export default class GameProp1002 extends Prop {
 
     //奖励的方法
     Reaward() {
-        console.error('ReawardGameProp1002');
 
-        cc.systemEvent.emit(EventName.Over);
         let RoundState = this.getComponentInChildren(sp.Skeleton).setAnimation(0, '奖杯', false);
         this.scheduleOnce(() => {
             let NextLevel = cc.Canvas.instance.node.getChildByName('Map').getComponent(MyMap).MapjsonData.NextLevel
             if (!NextLevel) {
-                cc.systemEvent.emit(EventName.Tips, `本关 地图没有设置下一关ID`)
+                console.log('通关');
+
+                if (LocalData.getInstance().getOverCount() == 0) {//首次通关
+                    LocalData.getInstance().setOverCount(1)
+                } else {
+                    LocalData.getInstance().setOverCount(LocalData.getInstance().getOverCount() + 1)
+                }
+                LocalData.getInstance().setMap(1)
+                
+                cc.systemEvent.emit(EventName.Over);
+
+                this.scheduleOnce(() => {
+                    cc.director.loadScene("Hall")
+                }, 3)
+
                 return
             }
             LocalData.getInstance().setMap(NextLevel)

+ 11 - 0
assets/Script/LocalData.ts

@@ -110,6 +110,17 @@ export default class LocalData {
         return this.$useParabolaSkin;
     }
 
+
+    ///////////////////////////////////////////////通关次数
+    private $OverCount: number = 0;
+    public setOverCount(Temp: number) {
+        this.$OverCount = Temp
+        this.save();
+    }
+    public getOverCount() {
+        return this.$OverCount;
+    }
+
     /////////////////////////////////////////////当前玩的关卡
 
     private $Map: number = 1;

+ 15 - 0
assets/Script/Over.ts

@@ -6,12 +6,19 @@
 //  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
 
 import EventName from "./EventName/EventName";
+import LocalData from "./LocalData";
 import MyComponent from "./Template/MyComponent";
 
 const { ccclass, property } = cc._decorator;
 
 @ccclass
 export default class Over extends MyComponent {
+
+
+    @property(cc.SpriteFrame)
+    Sp: cc.SpriteFrame[] = [];
+
+
     @property(cc.Label)
     Hight: cc.Label = null;
 
@@ -24,7 +31,15 @@ export default class Over extends MyComponent {
     Over() {
         this.node.opacity = 255
         this.label.string = this.Hight.string
+
+
+        if (LocalData.getInstance().getOverCount() == 0) {//首次通关
+            this.getComponent(cc.Sprite).spriteFrame = this.Sp[0]
+        } else {
+            this.getComponent(cc.Sprite).spriteFrame = this.Sp[1]
+        }
     }
 
+
     // update (dt) {}
 }

+ 8 - 0
assets/sub/Scene/Game.fire

@@ -5521,6 +5521,14 @@
       "__id__": 121
     },
     "_enabled": true,
+    "Sp": [
+      {
+        "__uuid__": "376439bb-0ceb-47c7-8105-5e894d1a1e01"
+      },
+      {
+        "__uuid__": "6a7119eb-4dfd-491a-b136-a34302c7f36d"
+      }
+    ],
     "Hight": {
       "__id__": 11
     },

+ 8 - 8
assets/sub/res/Pop/Shop.prefab

@@ -1047,8 +1047,8 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_string": "角色介绍",
-    "_N$string": "角色介绍",
+    "_string": "团队成员",
+    "_N$string": "团队成员",
     "_fontSize": 40,
     "_lineHeight": 40,
     "_enableWrapText": true,
@@ -1244,7 +1244,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 300,
-      "height": 31.5
+      "height": 81.5
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1307,8 +1307,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 280,
-      "height": 31.5
+      "width": 290.5,
+      "height": 81.5
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1359,8 +1359,8 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_string": "选择查看详情",
-    "_N$string": "选择查看详情",
+    "_string": "《随心》           《Jason.L》\n《Thresh》            《鱼鳍》\n《The sardine》 《呀哈哈》",
+    "_N$string": "《随心》           《Jason.L》\n《Thresh》            《鱼鳍》\n《The sardine》 《呀哈哈》",
     "_fontSize": 23,
     "_lineHeight": 25,
     "_enableWrapText": true,
@@ -1399,7 +1399,7 @@
     "_layoutSize": {
       "__type__": "cc.Size",
       "width": 300,
-      "height": 31.5
+      "height": 81.5
     },
     "_resize": 1,
     "_N$layoutType": 2,

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
assets/sub/res/json/map5.json


+ 1 - 1
settings/project.json

@@ -56,7 +56,7 @@
     "width": 960,
     "height": 640
   },
-  "last-module-event-record-time": 1741700322953,
+  "last-module-event-record-time": 1742824876662,
   "assets-sort-type": "name",
   "facebook": {
     "enable": false,

Някои файлове не бяха показани, защото твърде много файлове са промени