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

大约有 374 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0049 秒)

41. 子容器的事件问题 [ 80%]

...wTest(); //testUI.addChildAt(vhvt, 0); testUI.addChild(vhvt); vhvt.on(laya.events.Event.CLICK, this, (event: Laya.Event) => { console.log("为什么这里不进来"); }); } /**  * ViewHeadViewTest  */ class ViewHeadViewTest extends Laya.Sprite {     constructor() {         super();     ...

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

42. 模拟鼠标事件 [ 78%]

...: 手动调一下对应的事件即可。例如: package { import laya.events.Event; public class Main { public function Main() { //初始化引擎 Laya.init(600,400); //手动调stage的click事件 this.onClick(); //给stage监听点击事件 Laya.stage.on(Event.CLICK,this,onClick); } private fun...

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

43. 示例 骨骼动画换装 加不上点击事件 [ 78%]

.../mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); //mArmature.on(Event.LABEL, this, onEvent); mArmature.on(Event.STOPPED, this, completeHandler); mArmature.on(Event.CLICK, this, onChangeSkin); mArmature.showSkinByName(mSkinList[0]); play(); //changeSkin(); //Laya.timer.loop(1000, this, cha...

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

44. 事件函数作用域问题 [ 77%]

事件函数作用域问题 1. this.btn_Login.on(Laya.Event.CLICK, null, ()=>{ if (this.loginDig) { this.loginDig.removeSelf(); this.loginDig.destroy(); } 2.this.btn_ok.on(Laya.Event.RIGHT_CLICK, this, this.OnBut_Open); OnBut_Open() : void { this.removeSelf(); this.destroy(); } 就是这两个...

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

45. 关于UI与3D场景的问题 [ 77%]

...相关的链接 提交 3 个回复 Laya_Aaron 赞同来自: button.on(Laya.Event.CLICK, this, function(event:Laya.Event){ console.log("点击到了UI"); event.stopPropagation(); }); 完整代码 2018-05-30 0 17 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 你这个问题描述的很明确,...

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

46. import Event = laya.events.Event; 报错 [ 77%]

import Event = laya.events.Event; 报错 import Event = laya.events.Event; 报错 file: 'file:///e%3A/Web/GameA/client/src/GameMain.ts' severity: '错误' message: 'Import declaration conflicts with local declaration of 'Event'' at: '5,1' source: 'ts' 项目中没有其他地方写这个import, 但...

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

47. 分享:销毁龙骨动画! [ 77%]

...ton; import laya.ani.bone.Templet; import laya.display.Sprite; import laya.events.Event; import laya.utils.Browser; import laya.utils.Stat; import laya.webgl.WebGL; public class ASDemo { private var mAniPath:String; private var mFactory:Templet; private var mCurrIndex:int = 0; private var mArmature:...

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

48. 2D物理-仿生机器人 [ 77%]

...LE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.Construct(); this.eventListener(); } Construct() { let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let rigidbody = new Laya.RigidBody(); rigidbody.type = "static"; ground.addComponentIntance(rigidbody); let chainCollider = gr...

来源: Laya2.0_示例 发布时间: 20240929

49. 动画-新版骨骼动画 [ 77%]

...("../../res/threeDimen/skinModel/Zombie/new/Zombie.lh")); zombie.once(Laya.Event.HIERARCHY_LOADED, this, function () { //获取Animator动画组件 zombieAnimator = zombie.getChildAt(0).getComponentByType(Laya.Animator); loadUI(); }); function loadUI() { var clipName = ["walk","attack","left_fall","...

来源: Laya_示例 发布时间: 20240929

50. 新手入坑请教下各位大神关于LayaMaxUI问题 [ 77%]

...ic btnLogin:Laya.Button;  constructor(){ super();  this.btnLogin.on(Laya.Event.CLICK,this,()=>{ console.log('btnLogin click') }) }  createChildren(){ super.createChildren(); this.loadScene('LoginScene'); }   }     import LoginScene from "./script/LoginScene" /* * 游戏初始化配置; */ e...

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