• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 484 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0078 秒)

441. 使用typescript开发项目,解决文件引用顺序问题 [ 43%]

...-->在index.html里初始化Laya,因为main.js的引用文件会优先执行,所以Laya.init不能写在main.js里面 type="module"是chrome61的新功能,可以使用es6的import来加载模块<script> Laya.init(600,400); </script> <script type="module" src="js/main.js">&...

来源: Laya_社区 发布时间: 20171120

442. laya.ui.ComboBox_API3.0 [ 42%]

...tHandler = new Handler(this, onSelect);//设置 comboBox 选择项改变时执行的处理器。 Laya.stage.addChild(comboBox);//将此 comboBox 对象添加到显示列表。 } private function onSelect(index:int):void { trace("当前选中的项对象索引: ",index); } } } example Laya.init(640...

来源: Laya3.0_api 发布时间: 20231115

443. Laya2.6、2.7等支持async、await编译经验分享 [ 42%]

...一下代码是可以的。希望没漏。下面随便Main.ts启动时候执行一下this.testAsync()即可看看效果。async testAsync() { await this.testWait10s() } async testWait10s() { return new Promise((resolve,reject)=>{ Laya.timer.once(10000,this,()=>{ console.log("10s后") resolve()...

来源: Laya_社区 发布时间: 20200705

444. Timer Handler被覆盖 [ 42%]

...[handler.key] = handler; } 就这几行代码,试想下每次一个新的执行caller进来那对应的$_GID是不是就自增,但是method.$_TID这个就不一定会变了,那随着caller.$_GID的不断自增,本来(注意_map这玩意是个数组)_map[cid+mid]里一个不应该被...

来源: Laya_社区 发布时间: 20210701

445. laya.ui.RadioGroup_API3.0 [ 42%]

...new Handler(this, onSelect);//设置 radioGroup 的选择项发生改变时执行的处理器。 Laya.stage.addChild(radioGroup);//将 radioGroup 添加到显示列表。 } private function onSelect(index:int):void { trace("当前选择的单选按钮索引: index= ", index); } } } example Laya.init...

来源: Laya3.0_api 发布时间: 20231115

446. laya.ui.Tab_API3.0 [ 42%]

...dler = new Handler(this, onSelect);//设置 tab 的选择项发生改变时执行的处理器。 Laya.stage.addChild(tab);//将 tab 添到显示列表。 } private function onSelect(index:int):void { trace("当前选择的表情页索引: index= ", index); } } } example Laya.init(640, 800);//设置...

来源: Laya3.0_api 发布时间: 20231115

447. laya.ui.Dialog_API3.0 [ 42%]

...延迟计算数据。 see #runCallLater() Parameters method: Function 要执行的函数的名称。例如,functionName。 Default value args: any[] = null 传递给 method 函数的可选参数列表。 Returns void clearTimer clearTimer(caller: any, method: Function): void Inherited from Node.cl...

来源: Laya3.0_api 发布时间: 20231115

448. laya.ui.List_API3.0 [ 41%]

...t.selectHandler = new Handler(this, onSelect);//设置 list 改变选择项执行的处理器。 Laya.stage.addChild(list);//将 list 添加到显示列表。 } private function onSelect(index:int):void { trace("当前选择的项目索引: index= ", index); } } } import laya.ui.Box; import laya.u...

来源: Laya3.0_api 发布时间: 20231115

449. laya.display.Animation_API3.0 [ 41%]

...延迟计算数据。 see #runCallLater() Parameters method: Function 要执行的函数的名称。例如,functionName。 Default value args: any[] = null 传递给 method 函数的可选参数列表。 Returns void clear clear(): AnimationBase Overrides AnimationBase.clear Defined in laya/displa...

来源: Laya3.0_api 发布时间: 20231115

450. laya.ui.ColorPicker_API3.0 [ 41%]

...dler: Handler Defined in laya/ui/ColorPicker.ts:99 当颜色发生改变时执行的函数处理器。 默认返回参数color:颜色值字符串。 hitTestPrior hitTestPrior: boolean = false Inherited from Text.hitTestPrior Defined in laya/display/Sprite.ts:273 指定鼠标事件检测是优先...

来源: Laya3.0_api 发布时间: 20231115