Commit e0897562 authored by haiyoucuv's avatar haiyoucuv

更改

parent 9a57c5d1
......@@ -36,6 +36,7 @@ export default class NoPrizePanel extends Panel {
clickAgain = async () => {
this.hidePanel();
if (store.homeInfo.leftTimes <= 0) {
changeScene(HomeScene);
showToast("没次数啦,明天再来吧!");
} else {
await GameMgr.ins.start();
......
......@@ -28,6 +28,9 @@ export class HomeScene extends Scene {
@property(Node)
ruleBtn: Node = null;
@property(Label)
leftTime: Label = null;
onLoad() {
this.startBtn.on(Button.EventType.CLICK, this.clickStart, this);
this.prizeBtn.on(Button.EventType.CLICK, this.clickPrize, this);
......@@ -40,7 +43,10 @@ export class HomeScene extends Scene {
@render
render() {
const {} = store.homeInfo || {};
const {leftTimes} = store.homeInfo || {};
this.leftTime.node.active = leftTimes <= 10;
this.leftTime.string = `剩余游戏次数:${leftTimes}`;
}
......
import { _decorator, Component, Node } from 'cc';
import { sendWebNetWithToken, WebNetName } from "../../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator;
......@@ -17,16 +18,20 @@ export class GuideLayer extends Component {
this.node.on(Node.EventType.TOUCH_END, this.onTouchEnd, this);
sendWebNetWithToken(WebNetName.guide, {
flag: 1,
}, null, null, false);
}
index = 0;
onTouchEnd() {
this.index++;
if(this.index == 1) {
if (this.index == 1) {
this.guide1.active = false;
this.guide2.active = true;
}else {
} else {
this.node.active = false;
}
......
......@@ -84,6 +84,7 @@ export const ERR_MESSAGE = {
"100001": "登录过期啦,请重新登录哦~",
"5001033": "该局使用该道具次数已达上限",
"5001041": "网络异常,请稍后再试",
"100018": "网络异常,刷新一下再试",
// "300001": "您的积分不足\n快去获取积分参与游戏吧~",
// "400001": "系统维护中,请稍后尝试",
// "400004": "您的积分不足\n快去获取积分参与游戏吧~",
......
......@@ -52,7 +52,7 @@
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 30
"__id__": 33
},
"_id": "04224ebd-adcd-4112-8010-da14ed5ea48a"
},
......@@ -84,22 +84,22 @@
"_active": true,
"_components": [
{
"__id__": 26
"__id__": 29
},
{
"__id__": 27
"__id__": 30
},
{
"__id__": 28
"__id__": 31
},
{
"__id__": 29
"__id__": 32
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 374.99999999999994,
"x": 375,
"y": 812,
"z": 0
},
......@@ -386,7 +386,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 340.99999999999994,
"x": 341,
"y": 278.7106,
"z": 0
},
......@@ -581,7 +581,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 340.99999999999994,
"x": 341,
"y": 147.8918,
"z": 0
},
......@@ -760,15 +760,18 @@
"_children": [
{
"__id__": 20
},
{
"__id__": 24
}
],
"_active": true,
"_components": [
{
"__id__": 24
"__id__": 27
},
{
"__id__": 25
"__id__": 28
}
],
"_prefab": null,
......@@ -965,6 +968,138 @@
},
"_id": "9aqrJdPU1GQKK/syjygRNs"
},
{
"__type__": "cc.Node",
"_name": "leftTime",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 19
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 25
},
{
"__id__": 26
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -80.672,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "ecHnEil4dGhJ9au181todZ"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 24
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 205.34765625,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "0eMGIdwidC074aO5RU5n58"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 24
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_string": "剩余游戏次数:0次",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 24,
"_fontSize": 24,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": false,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": "0dMUlB43tMzZLKN2wRRyTK"
},
{
"__type__": "cc.UITransform",
"_name": "",
......@@ -977,7 +1112,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 749.9999999999999,
"width": 750,
"height": 0
},
"_anchorPoint": {
......@@ -1029,7 +1164,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 749.9999999999999,
"width": 750,
"height": 1624
},
"_anchorPoint": {
......@@ -1105,33 +1240,36 @@
"ruleBtn": {
"__id__": 9
},
"leftTime": {
"__id__": 26
},
"_id": "30ywpmE6RNsozfsd/NXO0o"
},
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 31
"__id__": 34
},
"shadows": {
"__id__": 32
"__id__": 35
},
"_skybox": {
"__id__": 33
"__id__": 36
},
"fog": {
"__id__": 34
"__id__": 37
},
"octree": {
"__id__": 35
"__id__": 38
},
"skin": {
"__id__": 36
"__id__": 39
},
"lightProbeInfo": {
"__id__": 37
"__id__": 40
},
"postSettings": {
"__id__": 38
"__id__": 41
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
......
......@@ -7,7 +7,7 @@
"actEndTimestamp": 1735660799000,
"currentTimestamp": 1723000150448,
"addDailyFreeTimes": 30,
"leftTimes": 30,
"leftTimes": 10,
"newGuideFlag": 0
}
}
\ No newline at end of file
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