Laya中第三方库的使用

Laya中第三方库的使用

以puremvc作为第三方库来做例子

一  加入Puremvc第三方库文件

 将puremvc.min.js放入项目目录bin/libs下

 将puremvc.d.ts放入项目目录libs下

 Laya的UI编辑器下,F9,勾选puremvc.min.js

这样代码中可以使用puremvc框架了

private initDemo():void{
     console.log(puremvc.Controller.getInstance().hasCommand("test"));
 }

原文地址:https://www.cnblogs.com/kootimloe/p/13363145.html