chore:剔除无关内容

This commit is contained in:
2026-07-15 11:38:16 +08:00
parent 901df08646
commit 447f311e39
77 changed files with 1874 additions and 14022 deletions
+3 -38
View File
@@ -1,5 +1,5 @@
import { _decorator, Asset, Button, Component, debug, instantiate, Label, Node, Prefab, randomRange, Sprite, sys, Tween, tween, Vec3 } from 'cc';
import { _decorator, Asset, Button, Component, debug, instantiate, Label, Node, Prefab, randomRange, Sprite, Tween, tween, Vec3 } from 'cc';
import { LocalSaveMgr } from '../framework/data/LocalSaveMgr';
import { UIManager } from '../framework/ui/UIManager';
import { UISwitcher } from '../framework/ui/UISwitcher';
@@ -12,8 +12,6 @@ import { Weapon } from '../data/ConfigData';
import { AddHeartPanel } from './AddHeartPanel';
import { SdkMgr } from '../framework/sdk/SdkMgr';
import { EventCenter } from '../EventCenter';
import { SideTipPanel } from './SideTipPanel';
import { SharePanel } from './SharePanel';
const { ccclass, property } = _decorator;
@@ -64,9 +62,6 @@ export class MainPanel extends PanelBase {
@property({ type: Button })
addHeartBtn: Button = null;
@property({ type: Button })
shareBtn: Button = null;
@property({ type: Prefab })
weaponSelectPrefab: Prefab = null;
@@ -79,9 +74,6 @@ export class MainPanel extends PanelBase {
@property(Node)
fingerNode: Node = null;
@property({ type: Button })
sideTipBtn: Button = null;
weaponDatas: Array<Weapon> = []
private weaponOffset: number = 1000
@@ -110,18 +102,6 @@ export class MainPanel extends PanelBase {
}
}
if (sys.platform == sys.Platform.WECHAT_GAME) {
this.sideTipBtn.node.active = false
const date: Date = new Date();
const dayOfMonth: number = date.getDate();
if (LocalSaveMgr.instance.playerData.day != dayOfMonth) {
this.shareBtn.node.active = true
}
} else if (sys.platform == sys.Platform.BYTEDANCE_MINI_GAME) {
this.sideTipBtn.node.active = true
this.shareBtn.node.active = false
}
this.fingerNode.active = !LocalSaveMgr.instance.playerData.haveTutorial
@@ -255,7 +235,7 @@ export class MainPanel extends PanelBase {
clickAddMoneyBtn() {
AudioMgr.inst.playOneShot(AssetController.instance.click)
SdkMgr.instance.playerRewardAds(() => {
SdkMgr.instance.requestReward(() => {
let addPoint = 200
let fromeMoney = LocalSaveMgr.instance.playerData.coin
@@ -265,7 +245,7 @@ export class MainPanel extends PanelBase {
})
}
flyShareMoney(fromMoney: number, endMoney: number) {
flyRewardMoney(fromMoney: number, endMoney: number) {
AudioMgr.inst.playOneShot(AssetController.instance.getCoin)
for (let index = 0; index < 10; index++) {
let item = instantiate(this.flyMoneyPrefab)
@@ -339,20 +319,10 @@ export class MainPanel extends PanelBase {
MainPanel.instance.refreshToIndex()
}
clickSideTipBtn() {
AudioMgr.inst.playOneShot(AssetController.instance.click)
console.log("openPanel SideTipPanel")
UIManager.instance.openPanel(SideTipPanel)
}
protected onDestroy(): void {
EventCenter.coinCountChange.off("coinCountChange", this.onCoinCountChange)
}
clickShareBtn() {
UIManager.instance.openPanel(SharePanel)
}
onLoad() {
MainPanel.instance = this;
this.startBtn.node.on(Button.EventType.CLICK, this.startBtnCallBack, this);
@@ -360,11 +330,6 @@ export class MainPanel extends PanelBase {
this.right.node.on(Button.EventType.CLICK, this.clickRight, this);
this.equip.node.on(Button.EventType.CLICK, this.clickEquipBtn, this);
this.buy.node.on(Button.EventType.CLICK, this.clickBuyBtn, this);
this.sideTipBtn.node.on(Button.EventType.CLICK, this.clickSideTipBtn, this);
this.shareBtn.node.on(Button.EventType.CLICK, this.clickShareBtn, this);
this.clear.node.on(Button.EventType.CLICK, this.clickClear, this);
this.addHeartBtn.node.on(Button.EventType.CLICK, this.clickAddHeartBtn, this);
this.addMoneyBtn.node.on(Button.EventType.CLICK, this.clickAddMoneyBtn, this);