Commit 05cd1b79 authored by haiyoucuv's avatar haiyoucuv

更改

parent e0897562
......@@ -2,6 +2,7 @@ import Panel from "../../Module/Panel";
import {_decorator, Button, Node} from "cc";
import {changeScene} from "db://assets/Module/UIFast";
import {HomeScene} from "db://assets/Scripts/Scenes/HomeScene";
import { LOG_TYPE, sendLog } from "../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator;
......@@ -21,17 +22,25 @@ export default class BackPanel extends Panel {
close: Node = null;
async start() {
sendLog(LOG_TYPE.EXPOSURE, 6);
sendLog(LOG_TYPE.EXPOSURE, 7);
this.ok.on(Button.EventType.CLICK, this.clickOk, this);
this.cancel.on(Button.EventType.CLICK, this.clickCancel, this);
this.close.on(Button.EventType.CLICK, this.onClose, this);
}
clickOk() {
sendLog(LOG_TYPE.CLICK, 6);
this.hidePanel();
changeScene(HomeScene);
}
clickCancel() {
sendLog(LOG_TYPE.CLICK, 7);
this.hidePanel();
}
......
import Panel from "../../Module/Panel";
import { _decorator, Button, Label, Node } from "cc";
import { _decorator, Button, Node } from "cc";
import { changeScene, showToast } from "db://assets/Module/UIFast";
import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
import GameMgr from "../GameMgr";
import store from "../../store/store";
import { MainGame } from "../Scenes/MainGame/MainGame";
import { LOG_TYPE, sendLog } from "../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator;
......@@ -21,6 +22,9 @@ export default class NoPrizePanel extends Panel {
again: Node = null!;
async start() {
sendLog(LOG_TYPE.EXPOSURE, 5);
this.close.on(Button.EventType.CLICK, this.onClose, this);
this.again.on(Button.EventType.CLICK, this.clickAgain, this);
}
......@@ -34,6 +38,9 @@ export default class NoPrizePanel extends Panel {
}
clickAgain = async () => {
sendLog(LOG_TYPE.CLICK, 5);
this.hidePanel();
if (store.homeInfo.leftTimes <= 0) {
changeScene(HomeScene);
......
......@@ -4,6 +4,7 @@ import { changeScene } from "db://assets/Module/UIFast";
import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
import { strFormat } from "../Utils/Utils";
import { PrizeScene } from "../Scenes/PrizeScene/PrizeScene";
import { LOG_TYPE, sendLog } from "../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator;
......@@ -26,6 +27,9 @@ export default class PrizePanel extends Panel {
img: Sprite = null!;
async start() {
sendLog(LOG_TYPE.EXPOSURE, 4);
this.close.on(Button.EventType.CLICK, this.onClose, this);
this.get.on(Button.EventType.CLICK, this.clickGet, this);
......@@ -40,6 +44,9 @@ export default class PrizePanel extends Panel {
}
clickGet = () => {
sendLog(LOG_TYPE.CLICK, 4);
this.hidePanel();
changeScene(PrizeScene);
}
......
......@@ -35,6 +35,9 @@ export class HomeScene extends Scene {
this.startBtn.on(Button.EventType.CLICK, this.clickStart, this);
this.prizeBtn.on(Button.EventType.CLICK, this.clickPrize, this);
this.ruleBtn.on(Button.EventType.CLICK, this.clickRule, this);
sendLog(LOG_TYPE.EXPOSURE, 1);
}
async start() {
......@@ -74,6 +77,9 @@ export class HomeScene extends Scene {
/** 去挑战 */
clickStart = async () => {
sendLog(LOG_TYPE.CLICK, 1);
if (!this.checkActStatus()) return false;
const {
leftTimes = 0, // 剩余挑战次数
......
import {
_decorator, Collider2D, Contact2DType, EPhysics2DDrawFlags,
EventTouch, Node, input,
Input, instantiate, IPhysics2DContact,
_decorator,
Animation,
PhysicsSystem2D, Prefab, v2, PHYSICS_2D_PTM_RATIO, UITransform, v3, Vec3, Vec2, tween, Tween, misc,
clamp, view, Button, Label, PhysicsGroup, Sprite, Color, color, UIOpacity
Button,
clamp,
Collider2D,
Color,
Contact2DType,
EventTouch,
instantiate,
IPhysics2DContact,
Label,
Node,
PHYSICS_2D_PTM_RATIO,
PhysicsGroup,
PhysicsSystem2D,
Prefab,
Sprite,
tween,
UIOpacity,
UITransform,
v2,
v3,
Vec2,
Vec3,
view
} from "cc";
import Scene from "db://assets/Module/Scene";
import { Ball } from "./Ball";
......@@ -14,6 +33,7 @@ import MergeMaxPanel from "../../Panels/MergeMaxPanel";
import NoPrizePanel from "../../Panels/NoPrizePanel";
import BackPanel from "../../Panels/BackPanel";
import store from "../../../store/store";
import { LOG_TYPE, sendLog } from "../../Utils/WebNet/WebNet";
const {ccclass, property} = _decorator;
......@@ -90,6 +110,10 @@ export class MainGame extends Scene {
newBall: Node = null;
onLoad() {
sendLog(LOG_TYPE.EXPOSURE, 2);
sendLog(LOG_TYPE.EXPOSURE, 3);
this.isUseHammer = false;
if (store.homeInfo.newGuideFlag === 0) {
......@@ -160,6 +184,8 @@ export class MainGame extends Scene {
}
clickHammer = () => {
sendLog(LOG_TYPE.CLICK, 3);
if (this.hammerCount <= 0) {
showToast("暂无道具");
return;
......@@ -172,6 +198,8 @@ export class MainGame extends Scene {
* 点击万能球
*/
clickProtean = () => {
sendLog(LOG_TYPE.CLICK, 2);
if (this.isOver) return;
if (this.proteanCount <= 0) {
......
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