Commit 753e913a authored by haiyoucuv's avatar haiyoucuv

init

parent 117681ee
......@@ -29,7 +29,7 @@ export default class GameMgr {
beautyEndTime: number,
delaySecond: number,
delayConsumeNum: number,
isBeauty: boolean,
isDouble: boolean,
} = {
startId: 0,
isUsedDelay: false,
......@@ -45,7 +45,7 @@ export default class GameMgr {
beautyEndTime: 0,
delaySecond: 30,
delayConsumeNum: 10,
isBeauty: false,
isDouble: false,
};
/**
......@@ -63,13 +63,13 @@ export default class GameMgr {
return false;
}
const isBeauty = (gameIndex.timeStamp >= gameIndex.data.beautyStartTime)
&& (gameIndex.timeStamp <= gameIndex.data.beautyEndTime);
const isDouble = (gameIndex.timeStamp >= gameIndex.data.hqStartTime)
&& (gameIndex.timeStamp <= gameIndex.data.hqEndTime);
this.gameInfo = {
...startRes.data,
...gameIndex.data,
isBeauty,
isDouble,
}
return true;
......
import Panel from "../../Module/Panel";
import { _decorator, Button, Label } from "cc";
import { _decorator, Button, Label, Node } from "cc";
import { getWebData, LOG_TYPE, sendLog, sendWebNet, sendWebNetWithToken, WebNetName } from "../Utils/WebNet/WebNet";
import { showToast } from "../../Module/UIFast";
import store from "../../store/store";
const { ccclass, property } = _decorator;
const {ccclass, property} = _decorator;
@ccclass('ToolBuyConfirmPanel')
export default class ToolBuyConfirmPanel extends Panel {
......@@ -12,31 +13,36 @@ export default class ToolBuyConfirmPanel extends Panel {
static skin = "ToolBuyConfirmPanel";
static group = "ToolBuyConfirmPanel";
@property(Label)
tip: Label = null;
@property(Node)
close: Node = null;
@property(Node)
okBtn: Node = null;
@property(Node)
cancelBtn: Node = null;
async start() {
const { data } = getWebData(WebNetName.index) || {}
// 购买天降财神道具所需苏银豆
const { buyRichSpSyd = 0 } = data
this.view["buyTip"].getComponent(Label).string = `确认使用${buyRichSpSyd}苏银豆购买\n天降财神道具*1 吗`;
this.view["close"].on(Button.EventType.CLICK, this.hidePanel, this);
this.view["confirmBtn"].on(Button.EventType.CLICK, this.buyHandle, this);
this.view["cancelBtn"].on(Button.EventType.CLICK, () => {
sendLog(LOG_TYPE.CLICK, 39)
this.hidePanel()
}, this);
sendLog(LOG_TYPE.EXPOSURE, 39)
sendLog(LOG_TYPE.EXPOSURE, 40)
const {buyRichSpCredits} = store.homeInfo;
this.tip.string = `确认使用${buyRichSpCredits}游园币购买\n天降财神道具*1 吗`;
this.okBtn.on(Button.EventType.CLICK, this.buyHandle, this);
this.cancelBtn.on(Button.EventType.CLICK, this.hidePanel, this);
this.close.on(Button.EventType.CLICK, this.hidePanel, this);
}
/** 确认购买 */
async buyHandle() {
sendLog(LOG_TYPE.CLICK, 40)
const res = await sendWebNetWithToken(WebNetName.buyRichSp);
if (res?.success) {
showToast("购买成功~快去使用吧")
this.hidePanel()
}
if (!res?.success) return;
showToast("购买成功~快去使用吧");
this.hidePanel();
}
}
import Panel from "../../Module/Panel";
import { _decorator, Button, Label, RichText } from "cc";
import { _decorator, Button, Label, Node, RichText } from "cc";
import { showPanel } from "../../Module/UIFast";
import ToolBuyConfirmPanel from "./ToolBuyConfirmPanel";
import { getWebData, LOG_TYPE, sendLog, WebNetName } from "../Utils/WebNet/WebNet";
import store from "../../store/store";
const { ccclass, property } = _decorator;
const {ccclass, property} = _decorator;
@ccclass('ToolBuyPanel')
export default class ToolBuyPanel extends Panel {
......@@ -13,22 +14,30 @@ export default class ToolBuyPanel extends Panel {
static skin = "ToolBuyPanel";
static group = "ToolBuyPanel";
@property(Label)
tip: Label = null;
@property(Node)
close: Node = null;
@property(Node)
buyBtn: Node = null;
async start() {
const { data } = getWebData(WebNetName.index) || {}
// 购买天降财神道具所需苏银豆
const { buyRichSpSyd = 0 } = data
// this.view["RichText"].getComponent(RichText).string = `<color=#C62F3A>您可消耗</color><color=#fe0114><size=34><b>${buyRichSpSyd}</b></size></color><color=#C62F3A>游园币购买道具~</color>`;
this.view["sydTip"].getComponent(Label).string = `您可消耗36${buyRichSpSyd}游园币购买道具~`;
this.view["close"].on(Button.EventType.CLICK, this.hidePanel, this);
this.view["buyBtn"].on(Button.EventType.CLICK, this.buyHandle, this);
const {buyRichSpCredits} = store.homeInfo;
// this.view["RichText"].getComponent(RichText).string = `<color=#C62F3A>您可消耗</color><color=#fe0114><size=34><b>${buyRichSpCredits}</b></size></color><color=#C62F3A>游园币购买道具~</color>`;
this.tip.string = `您可消耗${buyRichSpCredits}游园币购买道具~`;
this.close.on(Button.EventType.CLICK, this.hidePanel, this);
this.buyBtn.on(Button.EventType.CLICK, this.buyHandle, this);
}
/** 立即购买 */
async buyHandle() {
this.hidePanel()
showPanel(ToolBuyConfirmPanel)
showPanel(ToolBuyConfirmPanel);
}
}
......@@ -143,7 +143,7 @@ export class MainGame extends Scene {
handType: HAND_TYPE = HAND_TYPE.CAT;
loopType: LOOP_TYPE = LOOP_TYPE.CU;
isBeauty = false;
isDouble = false;
isUseGod = false;
......@@ -221,9 +221,9 @@ export class MainGame extends Scene {
this.handSpeed += Math.random() * 2 - 1;
const {loopType, handType, rongNum, targetNum, richManNum, isBeauty, newGuide} = GameMgr.ins.gameInfo;
const {loopType, handType, rongNum, targetNum, richManNum, isDouble, newGuide} = GameMgr.ins.gameInfo;
this.isBeauty = isBeauty;
this.isDouble = isDouble;
this.richManNum = 0;
this.initIp(rongNum);
this.initTarget(targetNum);
......@@ -405,7 +405,7 @@ export class MainGame extends Scene {
}
this.rongNum++;
this.score += BaseScore * (1 + LoopBuff[this.loopType]) * (this.isBeauty ? 2 : 1);
this.score += BaseScore * (1 + LoopBuff[this.loopType]) * (this.isDouble ? 2 : 1);
// this.stringScore
const pointNode = this.targetPoint.shift();
......
......@@ -648,7 +648,7 @@
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
......
......@@ -8,8 +8,8 @@
],
"subMetas": {},
"userData": {
"maxWidth": 1623,
"maxHeight": 1623,
"maxWidth": 2048,
"maxHeight": 2048,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
......
{"ver":"1.0.8","importer":"auto-atlas","imported":true,"uuid":"9a125283-6426-43bc-9fc1-5b367f773e4e","files":[".json"],"subMetas":{},"userData":{"maxWidth":1623,"maxHeight":1623,"padding":2,"allowRotation":true,"forceSquared":false,"powerOfTwo":false,"algorithm":"MaxRects","format":"png","quality":80,"contourBleed":true,"paddingBleed":true,"filterUnused":false,"removeTextureInBundle":false,"removeImageInBundle":false,"removeSpriteAtlasInBundle":false,"compressSettings":{},"textureSetting":{"wrapModeS":"repeat","wrapModeT":"repeat","minfilter":"linear","magfilter":"linear","mipfilter":"none","anisotropy":0}}}
{
"ver": "1.0.8",
"importer": "auto-atlas",
"imported": true,
"uuid": "9a125283-6426-43bc-9fc1-5b367f773e4e",
"files": [
".json"
],
"subMetas": {},
"userData": {
"maxWidth": 2048,
"maxHeight": 2048,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
"powerOfTwo": false,
"algorithm": "MaxRects",
"format": "png",
"quality": 80,
"contourBleed": true,
"paddingBleed": true,
"filterUnused": false,
"removeTextureInBundle": false,
"removeImageInBundle": false,
"removeSpriteAtlasInBundle": false,
"compressSettings": {},
"textureSetting": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
}
}
}
{"ver":"1.0.8","importer":"auto-atlas","imported":true,"uuid":"f32e21d1-5521-4b2e-a295-94351dc3920f","files":[".json"],"subMetas":{},"userData":{"maxWidth":1623,"maxHeight":1623,"padding":2,"allowRotation":true,"forceSquared":false,"powerOfTwo":false,"algorithm":"MaxRects","format":"png","quality":80,"contourBleed":true,"paddingBleed":true,"filterUnused":false,"removeTextureInBundle":false,"removeImageInBundle":false,"removeSpriteAtlasInBundle":false,"compressSettings":{},"textureSetting":{"wrapModeS":"repeat","wrapModeT":"repeat","minfilter":"linear","magfilter":"linear","mipfilter":"none","anisotropy":0}}}
{
"ver": "1.0.8",
"importer": "auto-atlas",
"imported": true,
"uuid": "f32e21d1-5521-4b2e-a295-94351dc3920f",
"files": [
".json"
],
"subMetas": {},
"userData": {
"maxWidth": 2048,
"maxHeight": 2048,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
"powerOfTwo": false,
"algorithm": "MaxRects",
"format": "png",
"quality": 80,
"contourBleed": true,
"paddingBleed": true,
"filterUnused": false,
"removeTextureInBundle": false,
"removeImageInBundle": false,
"removeSpriteAtlasInBundle": false,
"compressSettings": {},
"textureSetting": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
}
}
}
......@@ -8,8 +8,8 @@
],
"subMetas": {},
"userData": {
"maxWidth": 1623,
"maxHeight": 1623,
"maxWidth": 2048,
"maxHeight": 2048,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
......
{"ver":"1.0.8","importer":"auto-atlas","imported":true,"uuid":"1c117405-bc5f-4e95-b2d4-f3ddae7dffa5","files":[".json"],"subMetas":{},"userData":{"maxWidth":1623,"maxHeight":1623,"padding":2,"allowRotation":true,"forceSquared":false,"powerOfTwo":false,"algorithm":"MaxRects","format":"png","quality":80,"contourBleed":true,"paddingBleed":true,"filterUnused":false,"removeTextureInBundle":false,"removeImageInBundle":false,"removeSpriteAtlasInBundle":false,"compressSettings":{},"textureSetting":{"wrapModeS":"repeat","wrapModeT":"repeat","minfilter":"linear","magfilter":"linear","mipfilter":"none","anisotropy":0}}}
{
"ver": "1.0.8",
"importer": "auto-atlas",
"imported": true,
"uuid": "1c117405-bc5f-4e95-b2d4-f3ddae7dffa5",
"files": [
".json"
],
"subMetas": {},
"userData": {
"maxWidth": 2048,
"maxHeight": 2048,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
"powerOfTwo": false,
"algorithm": "MaxRects",
"format": "png",
"quality": 80,
"contourBleed": true,
"paddingBleed": true,
"filterUnused": false,
"removeTextureInBundle": false,
"removeImageInBundle": false,
"removeSpriteAtlasInBundle": false,
"compressSettings": {},
"textureSetting": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
}
}
}
{"ver":"1.0.8","importer":"auto-atlas","imported":true,"uuid":"ad600d6b-cb6b-4f83-b019-b577573f61f2","files":[".json"],"subMetas":{},"userData":{"maxWidth":1623,"maxHeight":1623,"padding":2,"allowRotation":true,"forceSquared":false,"powerOfTwo":false,"algorithm":"MaxRects","format":"png","quality":80,"contourBleed":true,"paddingBleed":true,"filterUnused":false,"removeTextureInBundle":false,"removeImageInBundle":false,"removeSpriteAtlasInBundle":false,"compressSettings":{},"textureSetting":{"wrapModeS":"repeat","wrapModeT":"repeat","minfilter":"linear","magfilter":"linear","mipfilter":"none","anisotropy":0}}}
{
"ver": "1.0.8",
"importer": "auto-atlas",
"imported": true,
"uuid": "ad600d6b-cb6b-4f83-b019-b577573f61f2",
"files": [
".json"
],
"subMetas": {},
"userData": {
"maxWidth": 2048,
"maxHeight": 2048,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
"powerOfTwo": false,
"algorithm": "MaxRects",
"format": "png",
"quality": 80,
"contourBleed": true,
"paddingBleed": true,
"filterUnused": false,
"removeTextureInBundle": false,
"removeImageInBundle": false,
"removeSpriteAtlasInBundle": false,
"compressSettings": {},
"textureSetting": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
}
}
}
......@@ -8,8 +8,8 @@
],
"subMetas": {},
"userData": {
"maxWidth": 1623,
"maxHeight": 1623,
"maxWidth": 2048,
"maxHeight": 2048,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
......
......@@ -23,7 +23,7 @@
"remainGameTime": 10,
"boolDayPlayLimit": false,
"boolBeauty": false,
"beautyLoginSend": 4,
"hqLoginSend": 4,
"rankPopInfo": {
"boolShowPop": false,
"rank": 95,
......@@ -32,6 +32,6 @@
"prizeImg": "https://yun.duiba.com.cn/polaris/WechatIMG612.abe30f1a9fb5be173d69e78dce6c94150b023b3b.jpg"
},
"boolChooseRankPrize": false,
"buyRichSpSyd": 445
"buyRichSpCredits": 445
}
}
\ No newline at end of file
......@@ -7,8 +7,8 @@
"richManNum": 1,
"loopType": 5,
"handType": 1,
"beautyStartTime": 1706688161917,
"beautyEndTime": 1705392157314,
"hqStartTime": 1706688161917,
"hqEndTime": 1705392157314,
"delaySecond": 30,
"delayConsumeNum": 10
}
......
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