帮助赔率界面使用节点池,减少消耗
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m21s

This commit is contained in:
TJH 2026-07-06 16:54:59 +08:00
parent 5532cdf8c2
commit 4344ea1698
5 changed files with 14 additions and 10 deletions

View File

@ -487,17 +487,17 @@ export class SlotBar extends Component {
onClickRules() {
AudioManager.instance.playSFX("Click_Menu_menu");
UIManager.instance.showPopup("WebView", "history/prefabs/rules", "Game", null);
UIManager.instance.showPopup("rules", "history/prefabs/rules", "Game", null);
}
onClickPaytable() {
AudioManager.instance.playSFX("Click_Menu_menu");
UIManager.instance.showPopup("WebView", "history/prefabs/paytable", "Game", null);
UIManager.instance.showPopup("paytable", "history/prefabs/paytable", "Game", null);
}
onClickHistory() {
AudioManager.instance.playSFX("Click_Menu_menu");
UIManager.instance.showPopup("WebView", "history/prefabs/history", "Game", null);
UIManager.instance.showPopup("history", "history/prefabs/history", "Game", null);
}
isON = true;

View File

@ -1,6 +1,7 @@
import { _decorator, Component, EventMouse, JsonAsset, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc';
import { hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools';
import { getLanguage } from 'db://assets/Main/Scripts/main/comm';
import { NodePoolManager } from 'db://assets/Main/Scripts/managers/NodePoolManager';
const { ccclass, property } = _decorator;
@ -45,7 +46,7 @@ export class Paytable extends Component {
}
clickClosePaytable() {
hideToBottom(this.node, () => { this.node.destroy() })
hideToBottom(this.node, () => { NodePoolManager.instance.putNodeToPool('paytable', this.node) })
}
// onScrollEnded(scrollView: ScrollView) {

View File

@ -1,6 +1,7 @@
import { _decorator, Component, EventMouse, JsonAsset, Label, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc';
import { getAllRichTexts, hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools';
import { getCsymbol, getLanguage } from 'db://assets/Main/Scripts/main/comm';
import { NodePoolManager } from 'db://assets/Main/Scripts/managers/NodePoolManager';
const { ccclass, property } = _decorator;
@ccclass('Rules')
@ -51,7 +52,7 @@ export class Rules extends Component {
}
clickCloseRules() {
hideToBottom(this.node, () => { this.node.destroy() })
hideToBottom(this.node, () => { NodePoolManager.instance.putNodeToPool('rules', this.node) })
}
onScrolling(scrollView: ScrollView) {

View File

@ -425,7 +425,7 @@ export function showFromBottom(node: Node) {
height = 1920;
}
node.position = new Vec3(0, -height / 2)
node.position = new Vec3(0, -height)
tween(node).to(0.15, { position: new Vec3() }).start()
}

View File

@ -2,6 +2,7 @@ import { _decorator, director, find, Node, Tween, tween, v3, Vec3 } from 'cc';
import { NodePoolManager } from './NodePoolManager';
import { TipMessagePanel } from '../main/TipMessagePanel';
import { I18nManager } from './I18nManager';
import { showFromBottom } from 'db://assets/Game/history/scripts/Tools';
const { ccclass, property } = _decorator;
@ccclass('UIManager')
@ -35,6 +36,7 @@ export class UIManager {
}
this.uiLayer.addChild(prefab);
showFromBottom(prefab)
let main = prefab.getChildByName('main');
if (!main) {