This commit is contained in:
2024-05-01 19:13:01 +08:00
parent cf008327aa
commit 80a32d9b1b
150 changed files with 8561 additions and 5045 deletions

View File

@@ -1,4 +1,5 @@
import { _decorator, Component, instantiate, Material, Node, Prefab } from 'cc'
import { Component, Material, Node, Prefab, _decorator, instantiate } from 'cc'
import PrefabLoader from '../../engine/utils/PrefabLoader'
import { GameConfig } from '../config/GameConfig'
@@ -13,29 +14,36 @@ export default class ShaderMaterialPrefab extends Component {
@property({ type: Material })
public grayMaterial: Material | null = null
@property({ type: Material })
public oldPhoto: Material | null = null
@property({ type: Material })
public glowInner: Material | null = null
@property({ type: Material })
public mosaic: Material | null = null
@property({ type: Material })
public roundCornerCrop: Material | null = null
@property({ type: Material })
public flashLight: Material | null = null
@property({ type: Material })
public flag: Material | null = null
@property({ type: Material })
public gaussian: Material | null = null
public static preLoad(): Promise<void> {
return new Promise((resolve, reject) => {
PrefabLoader.loadPrefab(
GameConfig.GameName + '/' + 'game/prefab/ShaderMaterialPrefab',
`${GameConfig.GameName}/game/prefab/ShaderMaterialPrefab`,
(loadedResource: Prefab) => {
ShaderMaterialPrefab.instance = instantiate(loadedResource)
resolve()
}
},
)
})
}