Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
MingSnake_241120
Commits
1a5a4dfb
Commit
1a5a4dfb
authored
Dec 12, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
be225142
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
19 deletions
+28
-19
UIFast.ts
assets/Module/UIFast.ts
+2
-2
UIMgr.ts
assets/Module/UIMgr.ts
+8
-6
GameRevivePanel.ts
assets/Scripts/Panels/GameRevivePanel.ts
+16
-9
UICanvas.prefab
assets/Start/UICanvas.prefab
+2
-2
No files found.
assets/Module/UIFast.ts
View file @
1a5a4dfb
...
@@ -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
()
{
...
...
assets/Module/UIMgr.ts
View file @
1a5a4dfb
...
@@ -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
.
sh
ow
Guide
=
this
.
uiCanvas
.
getChildByName
(
"ShareGuide"
);
this
.
sh
are
Guide
=
this
.
uiCanvas
.
getChildByName
(
"ShareGuide"
);
this
.
hideShareGuide
();
this
.
hideShareGuide
();
this
.
sh
ow
Guide
.
on
(
Button
.
EventType
.
CLICK
,
this
.
hideShareGuide
,
this
);
this
.
sh
are
Guide
.
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 *********/
sh
ow
Guide
:
Node
=
null
;
sh
are
Guide
:
Node
=
null
;
showShareGuide
()
{
showShareGuide
(
guideTxt
=
""
)
{
this
.
showGuide
.
active
=
true
;
this
.
shareGuide
.
active
=
true
;
this
.
shareGuide
.
getChildByName
(
"label"
)
.
getComponent
(
Label
).
string
=
guideTxt
;
}
}
hideShareGuide
()
{
hideShareGuide
()
{
this
.
sh
ow
Guide
.
active
=
false
;
this
.
sh
are
Guide
.
active
=
false
;
}
}
/********* Share Guide *********/
/********* Share Guide *********/
...
...
assets/Scripts/Panels/GameRevivePanel.ts
View file @
1a5a4dfb
...
@@ -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
);
}
}
...
...
assets/Start/UICanvas.prefab
View file @
1a5a4dfb
...
@@ -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":
fals
e,
"_active":
tru
e,
"_components": [
"_components": [
{
{
"__id__": 44
"__id__": 44
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment