import { Laya } from "Laya" ; import { Loader } from "laya/net/Loader" ; import { Texture } from "laya/resource/Texture" ; import { Handler } from "laya/utils/Handler" ; export class Loader_SingleType { constructor ( ) { Laya . init ( 550 , 400 ) ; Laya . loader . load ( "res/apes/monkey0.png" , Handler . create ( this , this . onAssetLoaded1 ) ) ; Laya . loader . load ( [ "res/apes/monkey0.png" , "res/apes/monkey1.png" , "res/apes/monkey2.png" ] , Handler . create ( this , this . onAssetLoaded2 ) ) ; } private onAssetLoaded1 ( texture ) { } private onAssetLoaded2 ( ) { var pic1 = Loader . getRes ( "res/apes/monkey0.png" ) ; var pic2 = Loader . getRes ( "res/apes/monkey1.png" ) ; var pic3 = Loader . getRes ( "res/apes/monkey2.png" ) ; } }