Commit 1a5a4dfb authored by haiyoucuv's avatar haiyoucuv

init

parent be225142
...@@ -33,8 +33,8 @@ export function hideToast() { ...@@ -33,8 +33,8 @@ export function hideToast() {
UIMgr.ins.hideToast(); UIMgr.ins.hideToast();
} }
export function showShareGuide() { export function showShareGuide(guideTxt = "") {
UIMgr.ins.showShareGuide(); UIMgr.ins.showShareGuide(guideTxt);
} }
export function hideShareGuide() { export function hideShareGuide() {
......
...@@ -76,9 +76,9 @@ export class UIMgr { ...@@ -76,9 +76,9 @@ export class UIMgr {
this.toastBg = this.toast.getChildByName("bg"); this.toastBg = this.toast.getChildByName("bg");
this.toastLabel = this.toastBg.getChildByName("label"); this.toastLabel = this.toastBg.getChildByName("label");
this.showGuide = this.uiCanvas.getChildByName("ShareGuide"); this.shareGuide = this.uiCanvas.getChildByName("ShareGuide");
this.hideShareGuide(); this.hideShareGuide();
this.showGuide.on(Button.EventType.CLICK, this.hideShareGuide, this); this.shareGuide.on(Button.EventType.CLICK, this.hideShareGuide, this);
this.waiting.active = false; this.waiting.active = false;
this.toast.active = false; this.toast.active = false;
...@@ -86,14 +86,16 @@ export class UIMgr { ...@@ -86,14 +86,16 @@ export class UIMgr {
/********* Share Guide *********/ /********* Share Guide *********/
showGuide: Node = null; shareGuide: Node = null;
showShareGuide() { showShareGuide(guideTxt = "") {
this.showGuide.active = true; this.shareGuide.active = true;
this.shareGuide.getChildByName("label")
.getComponent(Label).string = guideTxt;
} }
hideShareGuide() { hideShareGuide() {
this.showGuide.active = false; this.shareGuide.active = false;
} }
/********* Share Guide *********/ /********* Share Guide *********/
......
...@@ -6,6 +6,7 @@ import gameStore from "../store/gameStore"; ...@@ -6,6 +6,7 @@ import gameStore from "../store/gameStore";
import { MainGame } from "../Scenes/MainGame/MainGame"; import { MainGame } from "../Scenes/MainGame/MainGame";
import { hideShareGuide, showShareGuide, showToast } from "../../Module/UIFast"; import { hideShareGuide, showShareGuide, showToast } from "../../Module/UIFast";
import { unwatchPageVisibility, watchPageVisibility } from "../Utils/pageVisibilityNotify"; import { unwatchPageVisibility, watchPageVisibility } from "../Utils/pageVisibilityNotify";
import { UIMgr } from "../../Module/UIMgr";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
...@@ -35,19 +36,19 @@ export default class GameRevivePanel extends Panel { ...@@ -35,19 +36,19 @@ export default class GameRevivePanel extends Panel {
this.shareRevive.on(Button.EventType.CLICK, this.clickShare, this); this.shareRevive.on(Button.EventType.CLICK, this.clickShare, this);
this.overBtn.on(Button.EventType.CLICK, this.clickOver, this); this.overBtn.on(Button.EventType.CLICK, this.clickOver, this);
watchPageVisibility(this.onPageVisibility); // watchPageVisibility(this.onPageVisibility);
} }
onDestroy() { onDestroy() {
unwatchPageVisibility(this.onPageVisibility); // unwatchPageVisibility(this.onPageVisibility);
} }
onPageVisibility = (visible) => { // onPageVisibility = (visible) => {
if (visible && this.isClickShare && !this.isReview) { // if (visible && this.isClickShare && !this.isReview) {
hideShareGuide(); // hideShareGuide();
this.review(3); // this.review(3);
} // }
}; // };
async start() { async start() {
const { const {
...@@ -133,7 +134,13 @@ export default class GameRevivePanel extends Panel { ...@@ -133,7 +134,13 @@ export default class GameRevivePanel extends Panel {
this.clickFlag = true; this.clickFlag = true;
this.isClickShare = true; this.isClickShare = true;
this.cd.stop(); this.cd.stop();
showShareGuide(); showShareGuide("分享好友后,点击屏幕即可复活");
const clickGuide = () => {
UIMgr.ins.shareGuide.off(Button.EventType.CLICK, clickGuide, this);
hideShareGuide();
this.review(3);
};
UIMgr.ins.shareGuide.once(Button.EventType.CLICK, clickGuide, this);
} }
......
...@@ -782,7 +782,7 @@ ...@@ -782,7 +782,7 @@
"__prefab": { "__prefab": {
"__id__": 33 "__id__": 33
}, },
"_opacity": 178.5, "_opacity": 204,
"_id": "" "_id": ""
}, },
{ {
...@@ -986,7 +986,7 @@ ...@@ -986,7 +986,7 @@
"__id__": 24 "__id__": 24
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 44 "__id__": 44
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment