Перейти к основному содержанию

Resources

@remarks

Available in preloader scripts only!

Index

Functions

addRuntimePack

  • addRuntimePack(typeStr: string, name: string): string
  • Creatings runtime pack, that will be removed on next launching game stage. Useful for both: client and server.


    Parameters

    • typeStr: string

      one of: resource or behavior

    • name: string

      generated pack name that additionaly hashes

    Returns string

    Complete path to generated pack, it might be used to working with files and directories.

getAllMatchingResources

  • getAllMatchingResources(regex: string): string[]
  • @remarks

    Available in preloader scripts only!

    @since

    2.0.2b24


    Parameters

    • regex: string

    Returns string[]

getAllMatchingResourcesInDir

  • getAllMatchingResourcesInDir(directory: Object, regex: string): string[]
  • @remarks

    Available in preloader scripts only!


    Parameters

    • directory: Object
    • regex: string

    Returns string[]

getAllMatchingResourcesInPath

  • getAllMatchingResourcesInPath(directory: Object, regex: string): string[]
  • @remarks

    Available in preloader scripts only!


    Parameters

    • directory: Object
    • regex: string

    Returns string[]

getAllResourceDirectories

  • getAllResourceDirectories(): string[]
  • @remarks

    Available in preloader scripts only!


    Returns string[]

getAllResourceDirectoriesPaths

  • getAllResourceDirectoriesPaths(): string[]
  • @remarks

    Available in preloader scripts only!

    @since

    2.0.2b24


    Returns string[]

getResourcePath

  • getResourcePath(path: string): Nullable<string>
  • @remarks

    Available in preloader scripts only!

    @since

    2.0.2b24


    Parameters

    • path: string

    Returns Nullable<string>

getResourcePathNoVariants

  • getResourcePathNoVariants(path: string): Nullable<java.io.File>
  • @remarks

    Available in preloader scripts only!


    Parameters

    • path: string

    Returns Nullable<java.io.File>

searchFilesInDir

  • searchFilesInDir(result: string[], baseDir: File, file: File, regex: string): void
  • @remarks

    Available in preloader scripts only!


    Parameters

    • result: string[]
    • baseDir: File
    • file: File
    • regex: string

    Returns void