Commit 85356cab authored by haiyoucuv's avatar haiyoucuv

init

parent 7bebaf16
......@@ -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();
}
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 *********/
// 节省判断
......
......@@ -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() {
......
......@@ -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({
......
......@@ -53,6 +53,7 @@ export class Start extends Component{
await store.updateFrontVariable();
await shareStore.genInviteInfo();
shareStore.doShare(false);
}
......
This diff is collapsed.
{
"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"
}
}
......@@ -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}) %>
......
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