Commit 5593e933 authored by haiyoucuv's avatar haiyoucuv

init

parent 2cc7a7af
This diff is collapsed.
import { _decorator, Button, Label, Node, Sprite, SpriteFrame } from 'cc';
import { _decorator, Button, Label, Node } from 'cc';
import { AudioClipName, AudioMgr } from "db://assets/core/base/AudioMgr";
import Panel from "db://assets/core/Module/Panel";
import { changeScene } from "db://assets/core/Module/UIFast";
......@@ -7,6 +7,7 @@ import store from "db://assets/Scripts/store/store";
import gameStore from "db://assets/Scripts/store/gameStore";
import { MainGame } from "db://assets/Scripts/Scenes/MainGame/MainGame";
import { _asyncThrottle } from "db://assets/Scripts/Utils/Utils";
import { LOG_TYPE, sendLog } from "db://assets/Scripts/Utils/WebNet/WebNet";
const { ccclass, property } = _decorator;
......@@ -24,6 +25,7 @@ export class OverPanel extends Panel {
super.onLoad();
this.okBtn.on(Button.EventType.CLICK, this.ok, this);
this.closeBtn.on(Button.EventType.CLICK, this.cancel, this);
sendLog(LOG_TYPE.EXPOSURE, 17);
}
start(): void {
......@@ -42,6 +44,7 @@ export class OverPanel extends Panel {
}
ok = _asyncThrottle(async () => {
sendLog(LOG_TYPE.CLICK, 17);
AudioMgr.ins.playOneShot(AudioClipName.button_ok);
// changeScene(HomeScene);
......
import { _decorator, Button, Label, Node, Sprite, SpriteFrame } from 'cc';
import { AudioClipName, AudioMgr } from "db://assets/core/base/AudioMgr";
import Panel from "db://assets/core/Module/Panel";
import { showPanel, showShareGuide } from "db://assets/core/Module/UIFast";
import { showShareGuide } from "db://assets/core/Module/UIFast";
import { MainGame } from "db://assets/Scripts/Scenes/MainGame/MainGame";
import gameStore from "db://assets/Scripts/store/gameStore";
import { _asyncThrottle } from "db://assets/Scripts/Utils/Utils";
import { CarColorsGlobalInstance } from "db://assets/Scripts/Scenes/MainGame/CarColorsGlobalInstance";
import store from "db://assets/Scripts/store/store";
import { LOG_TYPE, sendLog } from "db://assets/Scripts/Utils/WebNet/WebNet";
const { ccclass, property } = _decorator;
......@@ -35,11 +36,13 @@ export class ReviewPanel extends Panel {
if (lockIndex == 4) {
if (gameStore.startInfo.shareUnlocked) {
this.type = "green";
sendLog(LOG_TYPE.EXPOSURE, 16);
} else {
this.type = "share";
}
} else {
this.type = "credits";
sendLog(LOG_TYPE.EXPOSURE, 15);
}
console.log("解锁类型", this.type);
......@@ -70,6 +73,12 @@ export class ReviewPanel extends Panel {
ok = _asyncThrottle(async () => {
const { type } = this;
if(type == "credits"){
sendLog(LOG_TYPE.CLICK, 15);
}else if(type == "green"){
sendLog(LOG_TYPE.CLICK, 16);
}
AudioMgr.ins.playOneShot(AudioClipName.button_ok);
const lockIndex = MainGame.ins.getLockPoints();
if (type == "share") {
......
......@@ -7,6 +7,7 @@ import Scene from "db://assets/core/Module/Scene";
import { changeScene } from "db://assets/core/Module/UIFast";
import { MainGame } from "db://assets/Scripts/Scenes/MainGame/MainGame";
import Svga from "db://assets/core/Component/Svga/Svga";
import { LOG_TYPE, sendLog } from "db://assets/Scripts/Utils/WebNet/WebNet";
const { ccclass, property } = _decorator;
......@@ -29,7 +30,10 @@ export class GuideScene extends Scene {
onLoad() {
this.nextGuide();
this.node.on(Node.EventType.TOUCH_END, this.nextGuide, this);
this.node.on(Node.EventType.TOUCH_END, ()=>{
sendLog(LOG_TYPE.CLICK, 6 + this.guideIndex);
this.nextGuide();
}, this);
// this.svga.node.on(Svga.EventType.END_FRAME, this.onSvgaEnd, this);
......@@ -41,9 +45,10 @@ export class GuideScene extends Scene {
nextGuide() {
if (!this.canNext) return;
this.canNext = false;
sendLog(LOG_TYPE.EXPOSURE, 6 + this.guideIndex);
this.svga.play();
tween(this.tipSp.getComponent(UIOpacity))
.set({ opacity: 0 })
......
......@@ -16,7 +16,7 @@ import store from "../store/store";
import { observer, render } from "../store/decorators";
import { _asyncThrottle } from "../Utils/Utils";
import { MainGame } from "./MainGame/MainGame";
import { sendWebNet, WebNetName } from "db://assets/Scripts/Utils/WebNet/WebNet";
import { LOG_TYPE, sendLog, sendWebNet, WebNetName } from "db://assets/Scripts/Utils/WebNet/WebNet";
import { BoxPanel } from "db://assets/Scripts/Panels/BoxPanel";
import gameStore from "db://assets/Scripts/store/gameStore";
import { GuideScene } from "db://assets/Scripts/Scenes/GuideScene";
......@@ -55,6 +55,11 @@ export class HomeScene extends Scene {
this.startBtn.on(Button.EventType.CLICK, this.clickStart, this);
this.ruleBtn.on(Button.EventType.CLICK, this.clickRule, this);
this.prizeBtn.on(Button.EventType.CLICK, this.clickPrize, this);
sendLog(LOG_TYPE.EXPOSURE, 2);
sendLog(LOG_TYPE.EXPOSURE, 3);
sendLog(LOG_TYPE.EXPOSURE, 4);
sendLog(LOG_TYPE.EXPOSURE, 5);
}
async start() {
......@@ -109,7 +114,10 @@ export class HomeScene extends Scene {
this.boxRoot.addChild(item);
item.setPosition(-500 / 2 + i / Math.max(1, len - 1) * 500, 0);
item.on(Button.EventType.CLICK, this.openBox.bind(this, boxConfigs[i]), this);
item.on(Button.EventType.CLICK, () => {
sendLog(LOG_TYPE.CLICK, 2 + i);
this.openBox.bind(this, boxConfigs[i])();
}, this);
}
this.progress.progress = maxIndex / Math.max(1, len - 1);
......@@ -127,6 +135,7 @@ export class HomeScene extends Scene {
}, 500)
clickStart = _asyncThrottle(async () => {
sendLog(LOG_TYPE.CLICK, 5);
if (!store.checkActTime()) return;
......
......@@ -26,6 +26,7 @@ import { UnlockPanel } from "db://assets/Scripts/Panels/UnlockPanel";
import { CarColorsGlobalInstance } from "db://assets/Scripts/Scenes/MainGame/CarColorsGlobalInstance";
import gameStore from "db://assets/Scripts/store/gameStore";
import { MainGame } from "db://assets/Scripts/Scenes/MainGame/MainGame";
import { LOG_TYPE, sendLog } from "db://assets/Scripts/Utils/WebNet/WebNet";
const { ccclass, property } = _decorator;
......@@ -48,6 +49,11 @@ export class GamePage extends Component {
this.smokePool.put(instantiate(smokeTemp));
this.smokePool.put(instantiate(smokeTemp));
}
sendLog(LOG_TYPE.EXPOSURE, 12);
sendLog(LOG_TYPE.EXPOSURE, 13);
sendLog(LOG_TYPE.EXPOSURE, 14);
}
getSmoke(): Node {
......@@ -89,10 +95,13 @@ export class GamePage extends Component {
const parkIndex = parkPoint.getSiblingIndex();
if (parkIndex === 4) {
sendLog(LOG_TYPE.CLICK, 12);
MainGame.ins.shareUnlock();
} else if (parkIndex === 5) {
sendLog(LOG_TYPE.CLICK, 13);
MainGame.ins.videoUnlock1();
} else if (parkIndex === 6) {
sendLog(LOG_TYPE.CLICK, 14);
MainGame.ins.videoUnlock2();
}
return;
......
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