优化若干代码
This commit is contained in:
@@ -1,18 +1,10 @@
|
||||
import {
|
||||
_decorator,
|
||||
Component,
|
||||
Label,
|
||||
Node,
|
||||
tween,
|
||||
Vec3,
|
||||
instantiate,
|
||||
} from 'cc'
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
import { _decorator, Component, instantiate, Label, Node, tween, Vec3 } from 'cc'
|
||||
import PrefabLoader from '../utils/PrefabLoader'
|
||||
import { GameConfig } from '../../game/config/GameConfig'
|
||||
import DialogBase from './DialogBase'
|
||||
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
@ccclass('CommonTips')
|
||||
export default class CommonTips extends Component {
|
||||
public static TipsZorderIndex: number = 999
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { _decorator, Component, Prefab, Widget, instantiate, Node } from 'cc'
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
import { _decorator, Component, instantiate, Node, Prefab, Widget } from 'cc'
|
||||
import PrefabLoader from '../utils/PrefabLoader'
|
||||
import { GameConfig } from '../../game/config/GameConfig'
|
||||
import DialogBase from './DialogBase'
|
||||
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
@ccclass('DarkLayer')
|
||||
export default class DarkLayer extends Component {
|
||||
private static prefab: Prefab
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { _decorator, Component, Node, Widget, director } from 'cc'
|
||||
const { ccclass } = _decorator
|
||||
|
||||
import { _decorator, Component, Node, Widget } from 'cc'
|
||||
import DarkLayer from './DarkLayer'
|
||||
import { UIRoot } from '../../game/utils/UIRoot'
|
||||
|
||||
const { ccclass } = _decorator
|
||||
|
||||
@ccclass('DialogBase')
|
||||
export default class DialogBase extends Component {
|
||||
private static LocalZOrder: number = 5
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
import {
|
||||
_decorator,
|
||||
Component,
|
||||
Node,
|
||||
Prefab,
|
||||
instantiate,
|
||||
math,
|
||||
Quat,
|
||||
Vec3,
|
||||
} from 'cc'
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
import { _decorator, Component, instantiate, Node, Prefab, Quat, Vec3 } from 'cc'
|
||||
import PrefabLoader from '../utils/PrefabLoader'
|
||||
import { GameConfig } from '../../game/config/GameConfig'
|
||||
import DialogBase from './DialogBase'
|
||||
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
@ccclass('LoadingPrefab')
|
||||
export default class LoadingPrefab extends Component {
|
||||
public static instance: Node
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { _decorator, Component, Node, Prefab, instantiate } from 'cc'
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
import { _decorator, Component, instantiate, Node, Prefab } from 'cc'
|
||||
import PrefabLoader from '../utils/PrefabLoader'
|
||||
import Progress from './Progress'
|
||||
import { GameConfig } from '../../game/config/GameConfig'
|
||||
import DialogBase from './DialogBase'
|
||||
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
@ccclass('LoadingScenePrefab')
|
||||
export default class LoadingScenePrefab extends Component {
|
||||
public static instance: Node
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
import {
|
||||
_decorator,
|
||||
Component,
|
||||
AssetManager,
|
||||
AudioClip,
|
||||
AudioSource,
|
||||
instantiate,
|
||||
Prefab,
|
||||
} from 'cc'
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
import { _decorator, AssetManager, AudioClip, AudioSource, Component, instantiate, Prefab } from 'cc'
|
||||
import { Logger } from '../utils/Logger'
|
||||
import PrefabLoader from '../utils/PrefabLoader'
|
||||
import LocalStorage from '../utils/LocalStorage'
|
||||
import MusicConfig from '../config/MusicConfig'
|
||||
import { GameConfig } from '../../game/config/GameConfig'
|
||||
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
/**
|
||||
* 背景音乐
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { _decorator, Component, Label, ProgressBar } from 'cc'
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
import { Logger } from '../utils/Logger'
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
@ccclass('Progress')
|
||||
export default class Progress extends Component {
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
import {
|
||||
_decorator,
|
||||
Component,
|
||||
Prefab,
|
||||
NodePool,
|
||||
Node,
|
||||
instantiate,
|
||||
AssetManager,
|
||||
AudioClip,
|
||||
AudioSource,
|
||||
} from 'cc'
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
import { _decorator, AssetManager, AudioClip, AudioSource, Component, instantiate, Node, NodePool, Prefab } from 'cc'
|
||||
import { Logger } from '../utils/Logger'
|
||||
import PrefabLoader from '../utils/PrefabLoader'
|
||||
import LocalStorage from '../utils/LocalStorage'
|
||||
@@ -18,6 +6,9 @@ import EventManager from '../utils/EventManager'
|
||||
import CommonEvent from '../config/CommonEvent'
|
||||
import MusicConfig from '../config/MusicConfig'
|
||||
import { GameConfig } from '../../game/config/GameConfig'
|
||||
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
// /**
|
||||
// * 音效
|
||||
// * Ios暂时有bug,弃用
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { _decorator, Component, SpriteFrame } from 'cc'
|
||||
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
@ccclass('TextureMgr')
|
||||
|
||||
Reference in New Issue
Block a user