init git
This commit is contained in:
38
assets/FishSingle/script/engine/config/ManifestConfig.ts
Normal file
38
assets/FishSingle/script/engine/config/ManifestConfig.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { _decorator } from 'cc'
|
||||
import DateUtil from '../utils/DateUtil'
|
||||
import NetConfig from './NetConfig'
|
||||
|
||||
export default class ManifestConfig {
|
||||
public static packageUrl: string = ''
|
||||
public static remoteManifestUrl: string = ''
|
||||
public static remoteVersionUrl: string = ''
|
||||
public static version: string = '1.0.0' //更新包要更新这里
|
||||
public static assets: object = {}
|
||||
public static searchPaths: Array<any> = []
|
||||
public static getManifestStr(key: string) {
|
||||
let obj: Object = {}
|
||||
obj['packageUrl'] = `${NetConfig.hotupdateUrl}/hotupdate/${key}/`
|
||||
obj['remoteManifestUrl'] =
|
||||
NetConfig.hotupdateUrl +
|
||||
'/hotupdate/' +
|
||||
key +
|
||||
'/project.manifest?t=' +
|
||||
DateUtil.now()
|
||||
obj['remoteManifestUrl'] = `${
|
||||
NetConfig.hotupdateUrl
|
||||
}/hotupdate/${key}/project.manifest?t=${DateUtil.now()}`
|
||||
obj['remoteVersionUrl'] =
|
||||
NetConfig.hotupdateUrl +
|
||||
'/hotupdate/' +
|
||||
key +
|
||||
'/version.manifest?t=' +
|
||||
DateUtil.now()
|
||||
obj['remoteVersionUrl'] = `${
|
||||
NetConfig.hotupdateUrl
|
||||
}/hotupdate/${key}/version.manifest?t=${DateUtil.now()}`
|
||||
obj['version'] = ManifestConfig.version
|
||||
obj['assets'] = {}
|
||||
obj['searchPaths'] = []
|
||||
return JSON.stringify(obj)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user