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

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

261. 分享一下自己的屏幕适配方案 [ 78%]

分享一下自己的屏幕适配方案 废话不多说 上代码 Laya.stage.scaleMode = Laya.Stage.SCALE_FULL nWidth:number; nHeight:number; ImgX:number; ImgY:number; Img:Laya.Image =new Laya.Image(); this.nWidth =this.bg.width; //背景图宽 this.nHeight =this.bg.height;//背景图的高 this....

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

262. 官方案例里摄像机绕物体旋转脚本的问题 [ 78%]

...Distance = Vector3.distance(this.transform.position, this.AroundPos); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouse...

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

263. 怎么给舞台设置焦点 [ 77%]

...台上有个文本框   我想默认焦点就在文本框上     Laya.stage.focus=文本框的var     这么写不好使 2017-11-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 4 个回复 ymsdandan 赞同来自: 监...

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

264. laya.events.Event [ 77%]

... 键是处于活动状态 (true) 还是非活动状态 (false)。 Event  stageX : Number[read-only] 鼠标在 Stage 上的 X 轴坐标Event  stageY : Number[read-only] 鼠标在 Stage 上的 Y 轴坐标Event  target : Sprite 事件目标触发对象。Event  touches : Array[read-only] 触摸...

来源: laya_api 发布时间: 20170929

265. laya.ui.UIEvent [ 77%]

...ft 键是处于活动状态 (true) 还是非活动状态 (false)。 Event stageX : Number[read-only] 鼠标在 Stage 上的 X 轴坐标Event stageY : Number[read-only] 鼠标在 Stage 上的 Y 轴坐标Event target : Sprite 事件目标触发对象。Event touches : Array[read-only] 触摸点列...

来源: Laya2.0_api 发布时间: 20190513

266. 经验分享:如何控制龙骨动画的播放索引! [ 77%]

...te function omTemLoaded():void { mArmature=mFactory.buildArmature(0); Laya.stage.addChild(mArmature); Laya.stage.on(Event.CLICK,this,onClick); mArmature.play(0,false);//设置初始位置 mArmature.index=this.index; mArmature.pos(500,500) } private function onClick():void { mArmature.play("stand",tr...

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

267. 小米手机三指点击后,后续获得的触摸点失效 [ 77%]

...的触摸点失效,单点的情况下会获得三个触摸点信息Laya.stage.on(Laya.Event.MOUSE_DOWN, this, (data: Laya.Event) => { let str = ""; if (data.touches) { for (let i = 0; i < data.touches.length; i++) { str += ` {${i} : ${data.touches[i].pos.toString()}}`; } } console.log("drag ...

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

268. laya.ui.TextInput [ 77%]

...,设置为true后,会变灰并且禁用鼠标。Component displayedInStage : Boolean[read-only] 表示是否在显示列表中显示。Node displayHeight : Number[read-only] 对象的显示高度(以像素为单位)。 Component displayWidth : Number[read-only] 对象的显示宽度(以...

来源: laya_api 发布时间: 20170929

269. 精灵 · LayaAir3.0文档 · LAYABOX [ 77%]

...检测本节点。当值为false时,会优先检测子节点,一直到stage上的全部节点都递归检测完毕。 1. Mouse Enabled: 默认为false,如果在脚本代码中监听鼠标事件,则会自动设置本对象及父节点的MouseEnabled属性值都为 true。但若将父节点...

来源: Laya3.0_文档 发布时间: 20240528

270. 3D射线穿透UI问题 [ 77%]

...上面,我给UI设置了名字,加到舞台 Laya.Button button = Laya.stage.addChild(new Laya.Button("res/layabox.png", "切换动作")) as Laya.Button; button.name = "abc"; Laya.Button.on(Laya.Event.CLICK, this, function:void{ 具体实现  });     在另一个方法里面 Laya.stage.on(Lay...

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