| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import { _decorator } from 'cc';
- import { dataMgr, EventDispatcher, ResMgr, tgxModuleContext, tgxUIController, tgxUIMgr } from '../core_tgx/tgx';
- import { GameUILayers } from './GameUILayers';
- import { gridDraw } from './Util/GridDraw';
- import { HeadIconMgr } from '../core_tgx/util/HeadIconMgr';
- import { UIControllerAnnotation } from '../core_tgx/UIAnnotation/UIControllerAnnotation';
- import { ch } from '../ch/ch';
- import { MySdk } from './MySdk';
- import { AudioManager } from './Audio/AudioManager';
- export namespace aa {
- export const UIcontroller = tgxUIController
- export const UILayers = GameUILayers
- export const uIMgr = tgxUIMgr.inst
- export const data = dataMgr.inst;
- export const moduleContext = tgxModuleContext
- export const Util = ({
- gridDraw: gridDraw,
- resMgr: new ResMgr(),
- headIconMgr: new HeadIconMgr,
- date: ch.date
- })
- export const eventDispatch = new EventDispatcher
- export const audio = new AudioManager
- export const sdk = new MySdk
- export const ch_util = ch.util
-
- export const info = { g_name: "" }
- }
- export function shuffle<T>(array: T[], start: number = 0, end: number = array.length): T[] {
- if (start > end) {
- let t = end
- end = start
- start = t
- }
- end = Math.floor(Math.min(array.length - 1, end))
- start = Math.floor(Math.max(0, start))
- for (let i = array.length - 1; i > start; i--) {
- let j = Math.floor(Math.random() * (i + 1) - start) + start;
- [array[i], array[j]] = [array[j], array[i]];
- }
- return array
- }
- export const UIController = UIControllerAnnotation.UI
- export const UIElement = UIControllerAnnotation.element
|