import { delay , loadRes } from './delay.js' ; import { Laya } from 'Laya.js' ; import { Sprite } from 'laya/display/Sprite.js' ; import { Text } from 'laya/display/Text.js' ; class Main { constructor ( ) { Laya . init ( 800 , 600 ) ; Laya . stage . screenMode = 'none' ; this . test1 ( ) ; } /**
     * 几个文字效果
     */ async test1 ( ) { var sp = new Sprite ( ) ; sp . scale ( 7.6 , 7.6 ) ; Laya . stage . addChild ( sp ) ; var t1 = new Text ( ) ; t1 . fontSize = 22 ; t1 . text = '排行' ; t1 . color = 'red' ; sp . addChild ( t1 ) ; await delay ( 100 ) ; await delay ( 10 ) ; ( window as any ) . testEnd = true ; } } new Main ( ) ;