import { Laya } from "Laya" ; import { Script3D } from "laya/d3/component/Script3D" ; import { Scene3D } from "laya/d3/core/scene/Scene3D" ; import { Sprite3D } from "laya/d3/core/Sprite3D" ; import { Stage } from "laya/display/Stage" ; import { Handler } from "laya/utils/Handler" ; import { Stat } from "laya/utils/Stat" ; import { Laya3D } from "Laya3D" ; author ...
  export class AnimationEventByUnity { constructor ( ) { Laya3D . init ( 0 , 0 ) ; Stat . show ( ) ; Laya . stage . scaleMode = Stage . SCALE_FULL ; Laya . stage . screenMode = Stage . SCREEN_NONE ; Scene3D . load ( "res/threeDimen/scene/LayaScene_AnimationEvent/Conventional/layaScene.ls" , Handler . create ( this , function ( scene ) : void { ( < Scene3D > Laya . stage . addChild ( scene ) ) ; var cube = scene . getChildByName ( "Cube" ) as Sprite3D ; cube . addComponent ( SceneScript ) ; } ) ) ; } } class SceneScript extends Script3D { constructor ( ) { super ( ) ; } ShowMsg ( ) { console . log ( "TTTTTTT" ) ; } }