帮助赔率界面使用节点池,减少消耗
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m21s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m21s
This commit is contained in:
parent
5532cdf8c2
commit
4344ea1698
@ -487,17 +487,17 @@ export class SlotBar extends Component {
|
|||||||
|
|
||||||
onClickRules() {
|
onClickRules() {
|
||||||
AudioManager.instance.playSFX("Click_Menu_menu");
|
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() {
|
onClickPaytable() {
|
||||||
AudioManager.instance.playSFX("Click_Menu_menu");
|
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() {
|
onClickHistory() {
|
||||||
AudioManager.instance.playSFX("Click_Menu_menu");
|
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;
|
isON = true;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { _decorator, Component, EventMouse, JsonAsset, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc';
|
import { _decorator, Component, EventMouse, JsonAsset, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc';
|
||||||
import { hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools';
|
import { hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools';
|
||||||
import { getLanguage } from 'db://assets/Main/Scripts/main/comm';
|
import { getLanguage } from 'db://assets/Main/Scripts/main/comm';
|
||||||
|
import { NodePoolManager } from 'db://assets/Main/Scripts/managers/NodePoolManager';
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ -45,7 +46,7 @@ export class Paytable extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clickClosePaytable() {
|
clickClosePaytable() {
|
||||||
hideToBottom(this.node, () => { this.node.destroy() })
|
hideToBottom(this.node, () => { NodePoolManager.instance.putNodeToPool('paytable', this.node) })
|
||||||
}
|
}
|
||||||
|
|
||||||
// onScrollEnded(scrollView: ScrollView) {
|
// onScrollEnded(scrollView: ScrollView) {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { _decorator, Component, EventMouse, JsonAsset, Label, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc';
|
import { _decorator, Component, EventMouse, JsonAsset, Label, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc';
|
||||||
import { getAllRichTexts, hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools';
|
import { getAllRichTexts, hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools';
|
||||||
import { getCsymbol, getLanguage } from 'db://assets/Main/Scripts/main/comm';
|
import { getCsymbol, getLanguage } from 'db://assets/Main/Scripts/main/comm';
|
||||||
|
import { NodePoolManager } from 'db://assets/Main/Scripts/managers/NodePoolManager';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass('Rules')
|
@ccclass('Rules')
|
||||||
@ -51,7 +52,7 @@ export class Rules extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clickCloseRules() {
|
clickCloseRules() {
|
||||||
hideToBottom(this.node, () => { this.node.destroy() })
|
hideToBottom(this.node, () => { NodePoolManager.instance.putNodeToPool('rules', this.node) })
|
||||||
}
|
}
|
||||||
|
|
||||||
onScrolling(scrollView: ScrollView) {
|
onScrolling(scrollView: ScrollView) {
|
||||||
|
|||||||
@ -425,7 +425,7 @@ export function showFromBottom(node: Node) {
|
|||||||
height = 1920;
|
height = 1920;
|
||||||
}
|
}
|
||||||
|
|
||||||
node.position = new Vec3(0, -height / 2)
|
node.position = new Vec3(0, -height)
|
||||||
tween(node).to(0.15, { position: new Vec3() }).start()
|
tween(node).to(0.15, { position: new Vec3() }).start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import { _decorator, director, find, Node, Tween, tween, v3, Vec3 } from 'cc';
|
|||||||
import { NodePoolManager } from './NodePoolManager';
|
import { NodePoolManager } from './NodePoolManager';
|
||||||
import { TipMessagePanel } from '../main/TipMessagePanel';
|
import { TipMessagePanel } from '../main/TipMessagePanel';
|
||||||
import { I18nManager } from './I18nManager';
|
import { I18nManager } from './I18nManager';
|
||||||
|
import { showFromBottom } from 'db://assets/Game/history/scripts/Tools';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass('UIManager')
|
@ccclass('UIManager')
|
||||||
@ -35,6 +36,7 @@ export class UIManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.uiLayer.addChild(prefab);
|
this.uiLayer.addChild(prefab);
|
||||||
|
showFromBottom(prefab)
|
||||||
|
|
||||||
let main = prefab.getChildByName('main');
|
let main = prefab.getChildByName('main');
|
||||||
if (!main) {
|
if (!main) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user