xujialiang 4 年之前
父节点
当前提交
57b5e0d028

+ 4 - 1
assets/resources/ui/FullScreenui.prefab

@@ -7467,7 +7467,7 @@
       "__id__": 1
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 239
@@ -7876,6 +7876,9 @@
       "__id__": 1
     },
     "_enabled": true,
+    "ContinueButton": {
+      "__id__": 227
+    },
     "_id": ""
   },
   {

+ 6 - 0
assets/resources/ui/GameOverUI.prefab

@@ -7472,6 +7472,12 @@
     "DefeatedGroup": {
       "__id__": 61
     },
+    "WinBackButton": {
+      "__id__": 47
+    },
+    "DefeatedBackButton": {
+      "__id__": 93
+    },
     "_id": ""
   },
   {

+ 3 - 0
assets/scripts/engines/gui/list/ExportItem.ts

@@ -1,5 +1,7 @@
 import { Component, EventTouch, ImageAsset, LabelComponent, loader, Node, SpriteComponent, SpriteFrame, _decorator } from 'cc';
+import { UIConst } from '../../../games/ui/UIConst';
 import { LiangLiangSDK } from '../../../libs/liangliangSDK';
+import { GUIManager } from '../GUIManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('ExportItem')
@@ -45,6 +47,7 @@ export class ExportItem extends Component {
                     LiangLiangSDK.CpaReport(self.data);
                 },
                 fail: (res) => {
+                    GUIManager.single.Show(UIConst.FULL_OUTPUT_UI);
                     console.log("跳转失败!");
                 },
                 complete: (res) => {},

+ 38 - 3
assets/scripts/games/ui/fullOutputs/FullOutputMediator.ts

@@ -2,16 +2,23 @@ import { _decorator, Component, Node } from 'cc';
 import { GUIManager } from '../../../engines/gui/GUIManager';
 import { GUIMediator } from '../../../engines/gui/GUIMediator';
 import { SceneManager } from '../../../engines/scenes/SceneManager';
+import { LiangLiangSDK } from '../../../libs/liangliangSDK';
 import { PlatformManager } from '../../../Platform/PlatformManager';
 import { UIConst } from '../UIConst';
 const { ccclass, property } = _decorator;
 
 @ccclass('FullOutputMediator')
 export class FullOutputMediator extends GUIMediator {
-    
+    continueShowBanner:boolean = true;
+    @property({
+        type:Node
+    })
+    ContinueButton:Node=null;
 
     start () {
         // Your initialization goes here.
+        this.ContinueButton.active = false;
+        this.scheduleOnce(this.showContinueButton.bind(this), 3);
     }
 
     OnShow(data?:any):void{
@@ -23,6 +30,10 @@ export class FullOutputMediator extends GUIMediator {
 
     }
 
+    showContinueButton():void{
+        this.ContinueButton.active = true;
+    }
+
     /**
      * 返回主界面
      */
@@ -32,8 +43,32 @@ export class FullOutputMediator extends GUIMediator {
     }
     
     ContinueGame():void{
-        GUIManager.single.Show(UIConst.FIGHTING_UI);
-        this.HideSelf();
+        if(LiangLiangSDK.CanWuChu() == true){
+            if(this.continueShowBanner == true){
+                this.__bannerWuChu();
+            }else{
+                // GUIManager.single.Show(UIConst.FIGHTING_UI);
+                SceneManager.single.Swicth("PrepareScene");
+                this.HideSelf();
+            }
+        }else{
+            // GUIManager.single.Show(UIConst.FIGHTING_UI);
+            SceneManager.single.Swicth("PrepareScene");
+            this.HideSelf();
+        }
+    }
+
+    /**
+     * 误触逻辑
+     */
+    private __bannerWuChu():void{
+        this.scheduleOnce(()=>{
+            PlatformManager.showBanner();
+            this.scheduleOnce(()=>{
+                PlatformManager.hideBanner();
+                this.continueShowBanner = false;
+            }, 1)
+        }, 1)
     }
     
     // update (deltaTime: number) {

+ 32 - 4
assets/scripts/games/ui/gameovers/GameOverMediator.ts

@@ -1,8 +1,9 @@
-import { _decorator, Component, Node, LabelComponent } from 'cc';
+import { _decorator, Component, Node, LabelComponent, Vec2, Vec3, view } from 'cc';
 import { GUIManager } from '../../../engines/gui/GUIManager';
 import { GUIMediator } from '../../../engines/gui/GUIMediator';
 import { NoticeManager } from '../../../engines/notices/NoticeManager';
 import { SceneManager } from '../../../engines/scenes/SceneManager';
+import { LiangLiangSDK } from '../../../libs/liangliangSDK';
 import { PlatformManager } from '../../../Platform/PlatformManager';
 import GameConfigManager from '../../models/GameConfigManager';
 import { GameModel } from '../../models/GameModel';
@@ -22,10 +23,18 @@ export class GameOverMediator extends GUIMediator {
 
     @property(Node)
     DefeatedGroup: Node = null;
+
+    @property(Node)
+    WinBackButton: Node = null;
+
+    @property(Node)
+    DefeatedBackButton: Node = null;
+
     private isWin: boolean;
     private award: number;
+
     onLoad() {
-        PlatformManager.showBanner()
+        // PlatformManager.showBanner()
     }
 
     OnShow(data?: any): void {
@@ -46,6 +55,25 @@ export class GameOverMediator extends GUIMediator {
             this.WinGroup.active = false;
             this.DefeatedGroup.active = true;
         }
+
+        this.backButtonHandle();
+    }
+
+    /**
+     * 返回按钮误触
+     */
+    backButtonHandle(): void {
+        if (LiangLiangSDK.CanWuChu() == true) {
+            this.WinBackButton.position = new Vec3(0, -(view.getVisibleSize().height / 2 - 50), 0);
+            this.DefeatedBackButton.position = new Vec3(0, -(view.getVisibleSize().height / 2 - 50), 0);
+            this.scheduleOnce(() => {
+                PlatformManager.showBanner();
+                this.WinBackButton.position = new Vec3(0, -375, 0);
+                this.DefeatedBackButton.position = new Vec3(0, -358, 0);
+            }, 3)
+        } else {
+            PlatformManager.showBanner();
+        }
     }
 
     /**
@@ -94,8 +122,8 @@ export class GameOverMediator extends GUIMediator {
     /**
      * 十倍之后去全屏界面
      */
-    getTenAward():void{
-        this.AddAdAward(10, ()=>{
+    getTenAward(): void {
+        this.AddAdAward(10, () => {
             GUIManager.single.Show(UIConst.FULL_OUTPUT_UI);
             this.HideSelf();
         });