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
85356cab
Commit
85356cab
authored
Dec 10, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
7bebaf16
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
938 additions
and
181 deletions
+938
-181
UIFast.ts
assets/Module/UIFast.ts
+8
-0
UIMgr.ts
assets/Module/UIMgr.ts
+18
-1
Card.ts
assets/Scripts/Scenes/MainGame/Props/Card.ts
+2
-1
shareStore.ts
assets/Scripts/store/shareStore.ts
+7
-1
Start.ts
assets/Start/Start.ts
+1
-0
UICanvas.prefab
assets/Start/UICanvas.prefab
+767
-178
分享提示.png
assets/Start/png/分享提示.png
+0
-0
分享提示.png.meta
assets/Start/png/分享提示.png.meta
+134
-0
index.ejs
preview-template/index.ejs
+1
-0
No files found.
assets/Module/UIFast.ts
View file @
85356cab
...
...
@@ -32,3 +32,11 @@ export function showToast(content: string, mask: boolean = false) {
export
function
hideToast
()
{
UIMgr
.
ins
.
hideToast
();
}
export
function
showShareGuide
()
{
UIMgr
.
ins
.
showShareGuide
();
}
export
function
hideShareGuide
()
{
UIMgr
.
ins
.
hideShareGuide
();
}
assets/Module/UIMgr.ts
View file @
85356cab
import
{
AssetManager
,
assetManager
,
assetManager
,
Button
,
director
,
error
,
instantiate
,
...
...
@@ -76,11 +76,28 @@ export class UIMgr {
this
.
toastBg
=
this
.
toast
.
getChildByName
(
"bg"
);
this
.
toastLabel
=
this
.
toastBg
.
getChildByName
(
"label"
);
this
.
showGuide
=
this
.
uiCanvas
.
getChildByName
(
"ShareGuide"
);
this
.
hideShareGuide
();
this
.
showGuide
.
on
(
Button
.
EventType
.
CLICK
,
this
.
hideShareGuide
,
this
);
this
.
waiting
.
active
=
false
;
this
.
toast
.
active
=
false
;
}
/********* Share Guide *********/
showGuide
:
Node
=
null
;
showShareGuide
()
{
this
.
showGuide
.
active
=
true
;
}
hideShareGuide
()
{
this
.
showGuide
.
active
=
false
;
}
/********* Share Guide *********/
/********* Scene *********/
// 节省判断
...
...
assets/Scripts/Scenes/MainGame/Props/Card.ts
View file @
85356cab
...
...
@@ -2,6 +2,7 @@ import { _decorator } from "cc";
import
{
PropBase
}
from
"./PropBase"
;
import
{
Snake
}
from
"db://assets/Scripts/Scenes/MainGame/Snake"
;
import
{
CardManager
}
from
"../Manager/CardManager"
;
import
{
ECard
}
from
"../Common/Enums"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -13,7 +14,7 @@ export class Card extends PropBase {
}
beEaten
=
(
target
:
Snake
)
=>
{
target
.
addCard
(
this
.
tag
);
target
.
addCard
(
this
.
tag
as
ECard
);
};
recycle
()
{
...
...
assets/Scripts/store/shareStore.ts
View file @
85356cab
...
...
@@ -3,6 +3,7 @@ import { assetManager, ImageAsset, SpriteFrame, Texture2D } from "cc";
import
{
getUrlParams
}
from
"../Utils/WebNet/web/webTools"
;
import
{
sendWebNet
,
WebNetName
}
from
"../Utils/WebNet/WebNet"
;
import
store
from
"./store"
;
import
{
showShareGuide
}
from
"../../Module/UIFast"
;
const
{
makeAutoObservable
}
=
mobx
;
...
...
@@ -54,7 +55,12 @@ class ShareStore {
}
}
doShare
()
{
doShare
(
showGuide
=
true
)
{
if
(
showGuide
){
showShareGuide
();
}
const
{
title
,
content
,
thumbnail
}
=
store
.
frontVariable
?.
shareInfo
||
{};
// @ts-ignore
wx
.
miniProgram
.
postMessage
({
...
...
assets/Start/Start.ts
View file @
85356cab
...
...
@@ -53,6 +53,7 @@ export class Start extends Component{
await
store
.
updateFrontVariable
();
await
shareStore
.
genInviteInfo
();
shareStore
.
doShare
(
false
);
}
...
...
assets/Start/UICanvas.prefab
View file @
85356cab
This diff is collapsed.
Click to expand it.
assets/Start/png/分享提示.png
0 → 100644
View file @
85356cab
9.75 KB
assets/Start/png/分享提示.png.meta
0 → 100644
View file @
85356cab
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "31c06dcb-244b-4b8e-8434-c9bddee62de8",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "31c06dcb-244b-4b8e-8434-c9bddee62de8@6c48a",
"displayName": "分享提示",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "31c06dcb-244b-4b8e-8434-c9bddee62de8",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "31c06dcb-244b-4b8e-8434-c9bddee62de8@f9941",
"displayName": "分享提示",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 435,
"height": 79,
"rawWidth": 435,
"rawHeight": 79,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-217.5,
-39.5,
0,
217.5,
-39.5,
0,
-217.5,
39.5,
0,
217.5,
39.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
79,
435,
79,
0,
0,
435,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-217.5,
-39.5,
0
],
"maxPos": [
217.5,
39.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "31c06dcb-244b-4b8e-8434-c9bddee62de8@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "31c06dcb-244b-4b8e-8434-c9bddee62de8@6c48a"
}
}
preview-template/index.ejs
View file @
85356cab
...
...
@@ -16,6 +16,7 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./index.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./custom.css"
/>
<script
src=
"//res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
</head>
<body
style=
"overflow: hidden;"
>
<
%
-
include
(
cocosToolBar
,
{
config:
config
})
%
>
...
...
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