this.normalState.on(Laya.Event.MOUSE_DOWN,this,this.Hit);

上面的例子中,我们用on方法直接给对象添加一个MouseDown鼠标按下的事件,然后触发后面的Hit方法

关于添加事件监听的方法文档如下:

LayaBox怎么添加事件

相关文章:

  • 2022-12-23
  • 2021-09-22
  • 2021-11-29
  • 2021-05-21
  • 2022-12-23
  • 2021-07-09
  • 2022-02-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案